Skip to content
Commit b3a50169 authored by Alexandre Belloni's avatar Alexandre Belloni
Browse files

rtc: ds1307: properly handle oscillator failure flags



Stop enabling the oscillator and removing the oscillator failure flags in
probe. Instead, return -EINVAL in .read_time when the oscillaotr is not
start or when it failed at some point. The oscillator gets enabled on the
first .set_time after failure and the failure flags are cleared.

This also removes the possibility of an infinite loop at probe where a
failing RTC will make the goto read_rtc to be taken every time.

Tested on mcp79411.

Reported-by: default avatarMastro Gippo <gipmad@gmail.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 097aa24b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment