Skip to content
Commit 3abb1ada authored by Simon Guinot's avatar Simon Guinot Committed by Alexandre Belloni
Browse files

rtc: ds1307: fix alarm reading at probe time



With the actual code, read_alarm() always returns -EINVAL when called
during the RTC device registration. This prevents from retrieving an
already configured alarm in hardware.

This patch fixes the issue by moving the HAS_ALARM bit configuration
(if supported by the hardware) above the rtc_device_register() call.

Signed-off-by: default avatarSimon Guinot <simon.guinot@sequanux.org>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent 51c4cfef
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment