aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ds1511.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2024-02-28 00:13:55 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2024-02-29 22:16:52 +0100
commit50891bd19f1ec23fa8cefbabc1f0e55d94925933 (patch)
tree9a8f2ffdf4339215bf5cbc4cfb6c489c49cb7402 /drivers/rtc/rtc-ds1511.c
parente40512a4f5cbfbbe034efc2d556283a470f97bf5 (diff)
downloadlinux-50891bd19f1ec23fa8cefbabc1f0e55d94925933.tar.gz
rtc: ds1511: set alarm offset limit
The ds1511 can only support alarms up to a month in the future (which we currently limit to 28 days). Link: https://lore.kernel.org/r/20240227231356.1840523-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-ds1511.c')
-rw-r--r--drivers/rtc/rtc-ds1511.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-ds1511.c b/drivers/rtc/rtc-ds1511.c
index 6869d28d34cc9..8b087d9556bee 100644
--- a/drivers/rtc/rtc-ds1511.c
+++ b/drivers/rtc/rtc-ds1511.c
@@ -323,6 +323,7 @@ static int ds1511_rtc_probe(struct platform_device *pdev)
ds1511->rtc->ops = &ds1511_rtc_ops;
ds1511->rtc->range_max = RTC_TIMESTAMP_END_2099;
+ ds1511->rtc->alarm_offset_max = 28 * 24 * 60 * 60 - 1;
/*
* if the platform has an interrupt in mind for this device,