On 01/22/2016 06:41 AM, Laxman Dewangan wrote:
On Friday 22 January 2016 01:53 AM, Javier Martinez Canillas wrote:
RTC_SEC = 0,
@@ -130,7 +130,8 @@ static int max77686_rtc_update(struct max77686_rtc_info *info,
__func__, ret, data);
/* Minimum 16ms delay required before RTC update. */
+ MAX77686_RTC_UPDATE_DELAY * 2);
Instead of making usleep_range(16000, 32000), can we make small range as
Yes, I also didn't know how to make the delay smaller. If I do for example
usleep_range(delay, delay + 10000), then the 10000 delta would be too big
for max77802 (50 times the minimum required 200 delay).
So I used delay * 2 for two reasons:
1) That way is generic enough and can work for any delay
2) My understanding is that most of times the delay should be precise and
is not that bad if sometimes the delay is the worst case (2 * X) since
after all the delay is the minimum required.
I also see that usleep_range(X, X * 2) is a used pattern across the kernel.