From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout4.w1.samsung.com (mailout4.w1.samsung.com. [210.118.77.14]) by gmr-mx.google.com with ESMTPS id ui7si443896pab.0.2016.01.21.17.02.18 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 21 Jan 2016 17:02:19 -0800 (PST) Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O1B00HQ7XJQRB50@mailout4.w1.samsung.com> for rtc-linux@googlegroups.com; Fri, 22 Jan 2016 01:02:14 +0000 (GMT) Subject: [rtc-linux] Re: [PATCH v2 03/10] rtc: max77686: Use usleep_range() instead of msleep() To: Javier Martinez Canillas , linux-kernel@vger.kernel.org References: <1453407813-14646-1-git-send-email-javier@osg.samsung.com> <1453407813-14646-4-git-send-email-javier@osg.samsung.com> Cc: Kukjin Kim , rtc-linux@googlegroups.com, Chanwoo Choi , Alexandre Belloni , Laxman Dewangan , linux-samsung-soc@vger.kernel.org From: Krzysztof Kozlowski Message-id: <56A17F99.6080903@samsung.com> Date: Fri, 22 Jan 2016 10:02:17 +0900 MIME-version: 1.0 In-reply-to: <1453407813-14646-4-git-send-email-javier@osg.samsung.com> Content-type: text/plain; charset=UTF-8 Reply-To: rtc-linux@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , On 22.01.2016 05:23, Javier Martinez Canillas wrote: > Documentation/timers/timers-howto.txt suggest to use usleep_range() > instead of msleep() for small msec (1ms - 20ms) since msleep() will > often sleep for 20ms for any value in that range. > > This is fine in this case since 16ms is the _minimum_ delay required > by max77686 for an RTC update but by using usleep_range() instead of > msleep(), the driver can support other RTC IP blocks with a shorter > minimum delay (i.e: in the range of usecs instead of msecs). > > Signed-off-by: Javier Martinez Canillas > Reviewed-by: Krzysztof Kozlowski > > --- > > Changes in v2: > - Add Krzysztof Kozlowski's Reviewed-by tag to patch #3. > - Fix typo error in changelog. Suggested by Krzysztof Kozlowski. > > drivers/rtc/rtc-max77686.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > Tested on Trats2 board with max77686: Tested-by: Krzysztof Kozlowski Best regards, Krzysztof -- -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Krzysztof Kozlowski Subject: Re: [PATCH v2 03/10] rtc: max77686: Use usleep_range() instead of msleep() Date: Fri, 22 Jan 2016 10:02:17 +0900 Message-ID: <56A17F99.6080903@samsung.com> References: <1453407813-14646-1-git-send-email-javier@osg.samsung.com> <1453407813-14646-4-git-send-email-javier@osg.samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: Received: from mailout4.w1.samsung.com ([210.118.77.14]:64952 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750951AbcAVBCR (ORCPT ); Thu, 21 Jan 2016 20:02:17 -0500 In-reply-to: <1453407813-14646-4-git-send-email-javier@osg.samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org List-Id: linux-samsung-soc@vger.kernel.org To: Javier Martinez Canillas , linux-kernel@vger.kernel.org Cc: Kukjin Kim , rtc-linux@googlegroups.com, Chanwoo Choi , Alexandre Belloni , Laxman Dewangan , linux-samsung-soc@vger.kernel.org On 22.01.2016 05:23, Javier Martinez Canillas wrote: > Documentation/timers/timers-howto.txt suggest to use usleep_range() > instead of msleep() for small msec (1ms - 20ms) since msleep() will > often sleep for 20ms for any value in that range. > > This is fine in this case since 16ms is the _minimum_ delay required > by max77686 for an RTC update but by using usleep_range() instead of > msleep(), the driver can support other RTC IP blocks with a shorter > minimum delay (i.e: in the range of usecs instead of msecs). > > Signed-off-by: Javier Martinez Canillas > Reviewed-by: Krzysztof Kozlowski > > --- > > Changes in v2: > - Add Krzysztof Kozlowski's Reviewed-by tag to patch #3. > - Fix typo error in changelog. Suggested by Krzysztof Kozlowski. > > drivers/rtc/rtc-max77686.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > Tested on Trats2 board with max77686: Tested-by: Krzysztof Kozlowski Best regards, Krzysztof