From patchwork Thu Sep 29 13:47:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 116952 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ww0-f56.google.com (mail-ww0-f56.google.com [74.125.82.56]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 891E8B6F88 for ; Thu, 29 Sep 2011 23:47:29 +1000 (EST) Received: by wwe3 with SMTP id 3sf1354678wwe.11 for ; Thu, 29 Sep 2011 06:47:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:from:to:cc:subject:date:message-id :x-mailer:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=ZBDz8BWFekIL3YNjqzGOIHNp0zhW37e7OHtmfNS6YlU=; b=Q7JESR9jMMYcEDyHZkYG4axeaLJjRjq8xA8AEEjmEKt9Jos+a8OiBlWssbE9Ay780T 34xz8yQY6feXGOb4PAuA5fHP9grk1bzyEAEovbg6Dj+pMsnBZjRrNECMmg1uRGtG52/b SmbTM6fIQe1cvpWeU9XKzR3lS8xTumYJl0zT4= Received: by 10.216.133.219 with SMTP id q69mr427529wei.12.1317304045007; Thu, 29 Sep 2011 06:47:25 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.14.40.155 with SMTP id f27ls537589eeb.4.gmail; Thu, 29 Sep 2011 06:47:24 -0700 (PDT) Received: by 10.14.7.212 with SMTP id 60mr2301488eep.14.1317304041205; Thu, 29 Sep 2011 06:47:21 -0700 (PDT) Received: by 10.14.7.212 with SMTP id 60mr2301487eep.14.1317304041188; Thu, 29 Sep 2011 06:47:21 -0700 (PDT) Received: from eu1sys200aog104.obsmtp.com (eu1sys200aog104.obsmtp.com. [207.126.144.117]) by gmr-mx.google.com with SMTP id 17si1040503eev.1.2011.09.29.06.47.19 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 29 Sep 2011 06:47:21 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.117 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.117; Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob104.postini.com ([207.126.147.11]) with SMTP ID DSNKToR252l5eLvJjdonqGzrMMSWY9gS/ZH/@postini.com; Thu, 29 Sep 2011 13:47:21 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id EE907160; Thu, 29 Sep 2011 13:47:17 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id ABCD8231E; Thu, 29 Sep 2011 13:47:17 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 1FDA924C07C; Thu, 29 Sep 2011 15:47:10 +0200 (CEST) Received: from localhost.localdomain (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Thu, 29 Sep 2011 15:47:17 +0200 From: Linus Walleij To: Alessandro Zummo , Cc: Lee Jones , Jonas Aaberg , Linus Walleij Subject: [rtc-linux] [PATCH 3/3] rtc/ab8500: change to mdelay Date: Thu, 29 Sep 2011 15:47:15 +0200 Message-ID: <1317304035-29072-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.3.2 MIME-Version: 1.0 X-Original-Sender: linus.walleij@stericsson.com X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 207.126.144.117 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , From: Jonas Aaberg The resolution of msleep is related to HZ, so with HZ set to 100 any msleep of less than 10ms will become ~10ms. This does not work for us, so stick to mdelay(1). Signed-off-by: Jonas Aaberg Signed-off-by: Linus Walleij --- drivers/rtc/rtc-ab8500.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-ab8500.c b/drivers/rtc/rtc-ab8500.c index 82a3480..326a1a5 100644 --- a/drivers/rtc/rtc-ab8500.c +++ b/drivers/rtc/rtc-ab8500.c @@ -90,7 +90,7 @@ static int ab8500_rtc_read_time(struct device *dev, struct rtc_time *tm) /* Early AB8500 chips will not clear the rtc read request bit */ if (abx500_get_chip_id(dev) == 0) { - msleep(1); + mdelay(1); } else { /* Wait for some cycles after enabling the rtc read in ab8500 */ while (time_before(jiffies, timeout)) { @@ -102,7 +102,7 @@ static int ab8500_rtc_read_time(struct device *dev, struct rtc_time *tm) if (!(value & RTC_READ_REQUEST)) break; - msleep(1); + mdelay(1); } } @@ -295,7 +295,7 @@ static int __devinit ab8500_rtc_probe(struct platform_device *pdev) return err; /* Wait for reset by the PorRtc */ - msleep(1); + mdelay(1); err = abx500_get_register_interruptible(&pdev->dev, AB8500_RTC, AB8500_RTC_STAT_REG, &rtc_ctrl);