]>
Commit | Line | Data |
---|---|---|
b28724f3 SL |
1 | From 710cf8dd462dbab9e67a9e1af219c2a8435ae8dc Mon Sep 17 00:00:00 2001 |
2 | From: Alexandre Belloni <alexandre.belloni@bootlin.com> | |
3 | Date: Tue, 2 Apr 2019 12:26:36 +0200 | |
4 | Subject: rtc: da9063: set uie_unsupported when relevant | |
5 | ||
6 | [ Upstream commit 882c5e552ffd06856de42261460f46e18319d259 ] | |
7 | ||
8 | The DA9063AD doesn't support alarms on any seconds and its granularity is | |
9 | the minute. Set uie_unsupported in that case. | |
10 | ||
11 | Reported-by: Wolfram Sang <wsa+renesas@sang-engineering.com> | |
12 | Reported-by: Geert Uytterhoeven <geert+renesas@glider.be> | |
13 | Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> | |
14 | Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> | |
15 | Acked-by: Steve Twiss <stwiss.opensource@diasemi.com> | |
16 | Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> | |
17 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
18 | --- | |
19 | drivers/rtc/rtc-da9063.c | 7 +++++++ | |
20 | 1 file changed, 7 insertions(+) | |
21 | ||
22 | diff --git a/drivers/rtc/rtc-da9063.c b/drivers/rtc/rtc-da9063.c | |
23 | index f85cae240f12..7e92e491c2e7 100644 | |
24 | --- a/drivers/rtc/rtc-da9063.c | |
25 | +++ b/drivers/rtc/rtc-da9063.c | |
26 | @@ -480,6 +480,13 @@ static int da9063_rtc_probe(struct platform_device *pdev) | |
27 | da9063_data_to_tm(data, &rtc->alarm_time, rtc); | |
28 | rtc->rtc_sync = false; | |
29 | ||
30 | + /* | |
31 | + * TODO: some models have alarms on a minute boundary but still support | |
32 | + * real hardware interrupts. Add this once the core supports it. | |
33 | + */ | |
34 | + if (config->rtc_data_start != RTC_SEC) | |
35 | + rtc->rtc_dev->uie_unsupported = 1; | |
36 | + | |
37 | irq_alarm = platform_get_irq_byname(pdev, "ALARM"); | |
38 | ret = devm_request_threaded_irq(&pdev->dev, irq_alarm, NULL, | |
39 | da9063_alarm_event, | |
40 | -- | |
41 | 2.20.1 | |
42 |