Skip to content
Commit 46b79ac0 authored by Guenter Roeck's avatar Guenter Roeck Committed by Alexandre Belloni
Browse files

rtc: ds1305: Report maximum alarm limit to rtc core



DS1305 only supports alarms up to 24 hours in the future.
Report the limit to the RTC core, and use the reported limit
to validate the requested alarm time when setting it.

If the alarm is too large when trying to set an alarm, return -ERANGE
instead of -EDOM to align with error codes returned by other rtc drivers.

Cc: Brian Norris <briannorris@chromium.org>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230817225537.4053865-7-linux@roeck-us.net


Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 3637bbdc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment