summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2023-08-17 15:55:35 -0700
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2023-08-27 23:50:22 +0200
commit3637bbdc8a446b8edb369383d2abc816c96ee864 (patch)
tree0e4f9aeb8d8e4e69b4ffdb9c0bd183ce082c00c0 /drivers/rtc
parent2546e7083f2ea96bdd6157961dc2748d65a9e487 (diff)
rtc: tps6586x: Report maximum alarm limit to rtc core
tps6586x only supports alarms up to 16,383 seconds in the future. Report the limit to the RTC core. Cc: Brian Norris <briannorris@chromium.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20230817225537.4053865-6-linux@roeck-us.net Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-tps6586x.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-tps6586x.c b/drivers/rtc/rtc-tps6586x.c
index 9f14e2475747..20faf08c254c 100644
--- a/drivers/rtc/rtc-tps6586x.c
+++ b/drivers/rtc/rtc-tps6586x.c
@@ -252,6 +252,7 @@ static int tps6586x_rtc_probe(struct platform_device *pdev)
rtc->rtc->ops = &tps6586x_rtc_ops;
rtc->rtc->range_max = (1ULL << 30) - 1; /* 30-bit seconds */
+ rtc->rtc->alarm_offset_max = ALM1_VALID_RANGE_IN_SEC;
rtc->rtc->start_secs = mktime64(2009, 1, 1, 0, 0, 0);
rtc->rtc->set_start_time = true;