]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: bq32k: Fix handling of oscillator failure flag
authorJan Östlund <jao@hms.se>
Thu, 11 Aug 2016 11:31:44 +0000 (13:31 +0200)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Wed, 31 Aug 2016 16:21:35 +0000 (18:21 +0200)
commit0c1cce90b4c9146cd37b316607b6f11cbf4042fa
tree0b620b64c90e540777d555411e0790d10f9ed6ed
parent54a88f3abbd2998aec4d14eaac5b19ca6ca2a4dc
rtc: bq32k: Fix handling of oscillator failure flag

While the oscillator failure flag is set, the RTC registers
should be considered invalid. bq32k_rtc_read_time() now
returns an error instead of an invalid time.

The failure flag is cleared the next time the clock is set.

Signed-off-by: Jan Östlund <jao@hms.se>
Signed-off-by: Daniel Romell <daro@hms.se>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-bq32k.c