diff options
author | Chris Zhong <[email protected]> | 2015-02-13 14:40:54 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2015-02-13 21:21:43 -0800 |
commit | c412c6034aaf38ff718296f3b77cb8e76b541985 (patch) | |
tree | 8714c27538a638e3a927609b9a6d4bf195aa7cef /tools/perf/util/scripting-engines/trace-event-perl.c | |
parent | 1ef2816f26a1d962d6317f7545218fa2ae3643bb (diff) |
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
[[email protected]: tweak comment per review discussion]
Signed-off-by: Chris Zhong <[email protected]>
Reviewed-by: Doug Anderson <[email protected]>
Cc: Sonny Rao <[email protected]>
Cc: Heiko Stübner <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c')
0 files changed, 0 insertions, 0 deletions