diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-04-02 06:26:36 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-04-02 17:33:09 -0400 |
commit | 882c5e552ffd06856de42261460f46e18319d259 (patch) | |
tree | a74b42eb5d5f9739287027fd33a5aa34d800b1b5 | |
parent | 22e7d5148d9a0b2e5bd20913f55cce89b58cd990 (diff) |
rtc: da9063: set uie_unsupported when relevant
The DA9063AD doesn't support alarms on any seconds and its granularity is
the minute. Set uie_unsupported in that case.
Reported-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r-- | drivers/rtc/rtc-da9063.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-da9063.c b/drivers/rtc/rtc-da9063.c index b4e054c64bad..69b54e5556c0 100644 --- a/drivers/rtc/rtc-da9063.c +++ b/drivers/rtc/rtc-da9063.c | |||
@@ -480,6 +480,13 @@ static int da9063_rtc_probe(struct platform_device *pdev) | |||
480 | da9063_data_to_tm(data, &rtc->alarm_time, rtc); | 480 | da9063_data_to_tm(data, &rtc->alarm_time, rtc); |
481 | rtc->rtc_sync = false; | 481 | rtc->rtc_sync = false; |
482 | 482 | ||
483 | /* | ||
484 | * TODO: some models have alarms on a minute boundary but still support | ||
485 | * real hardware interrupts. Add this once the core supports it. | ||
486 | */ | ||
487 | if (config->rtc_data_start != RTC_SEC) | ||
488 | rtc->rtc_dev->uie_unsupported = 1; | ||
489 | |||
483 | irq_alarm = platform_get_irq_byname(pdev, "ALARM"); | 490 | irq_alarm = platform_get_irq_byname(pdev, "ALARM"); |
484 | ret = devm_request_threaded_irq(&pdev->dev, irq_alarm, NULL, | 491 | ret = devm_request_threaded_irq(&pdev->dev, irq_alarm, NULL, |
485 | da9063_alarm_event, | 492 | da9063_alarm_event, |