Chris Zhong
c412c6034a
drivers/rtc/rtc-rk808.c: fix rtc time reading issue
...
After we set the GET_TIME bit, the rtc time can't be read immediately. We
should wait up to 31.25 us, about one cycle of 32khz. Otherwise reading
RTC time will return a old time. If we clear the GET_TIME bit after
setting, the time of i2c transfer is certainly more than 31.25us.
Doug said:
: I think we are safe. At 400kHz (the max speed of this part) each bit can
: be transferred no faster than 2.5us. In order to do a valid i2c
: transaction we need to _at least_ write the address of the device and the
: data onto the bus, which is 16 bits. 16 * 2.5us = 40us. That's above the
: 31.25us
[akpm@linux-foundation.org: tweak comment per review discussion]
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Cc: Sonny Rao <sonnyrao@chromium.org>
Cc: Heiko Stübner <heiko@sntech.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-13 21:21:43 -08:00
..
2014-11-21 12:00:00 -08:00
2015-01-23 17:21:57 -08:00
2015-01-23 17:21:55 -08:00
2014-12-11 17:48:14 -08:00
2014-11-17 18:04:01 +11:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-12-14 16:10:09 -08:00
2014-04-03 16:21:22 -07:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2015-02-13 21:21:43 -08:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-29 16:33:14 -07:00
2014-10-20 16:21:31 +02:00
2014-10-14 02:18:19 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2015-01-23 17:21:56 -08:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-04-03 16:21:16 -07:00
2014-12-10 17:41:15 -08:00
2014-08-08 15:57:19 -07:00
2014-04-03 16:21:23 -07:00
2014-12-10 17:41:15 -08:00
2014-04-03 16:21:17 -07:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-04-03 16:21:16 -07:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-04-03 16:21:22 -07:00
2014-08-08 15:57:19 -07:00
2015-01-29 19:16:40 +01:00
2013-07-03 16:07:56 -07:00
2014-10-20 16:21:31 +02:00
2013-07-03 16:07:56 -07:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-06-06 16:08:08 -07:00
2015-02-13 21:21:43 -08:00
2013-11-13 12:09:27 +09:00
2014-10-14 02:18:17 +02:00
2015-02-13 21:21:43 -08:00
2014-10-20 16:21:31 +02:00
2014-11-21 12:00:00 -08:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-06-06 16:08:07 -07:00
2013-07-03 16:07:56 -07:00
2013-07-03 16:07:57 -07:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2013-11-13 12:09:27 +09:00
2013-07-03 16:07:57 -07:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-06-06 16:08:08 -07:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2013-11-13 12:09:27 +09:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-12-14 16:10:09 -08:00
2014-11-17 18:04:01 +11:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2015-02-13 21:21:42 -08:00
2014-01-23 16:37:00 -08:00
2014-05-06 13:04:58 -07:00
2014-12-10 17:41:15 -08:00
2014-10-14 02:18:17 +02:00
2014-08-08 15:57:20 -07:00
2013-11-13 12:09:31 +09:00
2013-11-13 12:09:31 +09:00
2014-11-03 19:53:56 -08:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-06-06 16:08:09 -07:00
2014-10-20 16:21:31 +02:00
2015-02-13 21:21:43 -08:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2013-11-13 12:09:29 +09:00
2014-10-14 02:18:19 +02:00
2014-04-03 16:21:24 -07:00
2013-07-03 16:07:58 -07:00
2014-04-03 16:21:18 -07:00
2014-01-23 16:37:00 -08:00
2014-11-03 19:53:56 -08:00
2015-01-26 13:37:19 -08:00
2014-06-06 16:08:09 -07:00
2014-10-20 16:21:31 +02:00
2014-12-14 16:10:09 -08:00
2014-12-14 16:10:09 -08:00
2014-04-03 16:21:18 -07:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-09-19 12:39:19 +02:00
2014-10-20 16:21:31 +02:00
2013-07-29 13:10:58 -07:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2014-10-20 16:21:31 +02:00
2013-07-03 16:07:59 -07:00
2014-04-03 16:21:16 -07:00
2014-10-20 16:21:31 +02:00
2015-01-23 17:21:57 -08:00