summaryrefslogtreecommitdiff
path: root/recipes-kernel/linux/linux-yocto/0001-rtc-isl1208-mark-as-not-supporting-UIE-mode-if-no-in.patch
blob: 57f0ae25bc1ad12f3d49c5a99a769563432feb38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From a3fadd25ae623f1b02bc4f6de1658d76a5380309 Mon Sep 17 00:00:00 2001
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Date: Tue, 17 May 2022 15:45:58 +0200
Subject: [PATCH] rtc: isl1208: mark as not supporting UIE mode if no interrupt
 routed

If the rtc does not have any interrupt line routed, it cannot generate
one. Therefore, if during the probe no interrupt is found, mark the rtc
as not supporting UIE mode.

Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
 drivers/rtc/rtc-isl1208.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/rtc/rtc-isl1208.c b/drivers/rtc/rtc-isl1208.c
index ebb691fa48a6b..91c940cba92fa 100644
--- a/drivers/rtc/rtc-isl1208.c
+++ b/drivers/rtc/rtc-isl1208.c
@@ -882,6 +882,9 @@ isl1208_probe(struct i2c_client *client, const struct i2c_device_id *id)
 
 	if (client->irq > 0)
 		rc = isl1208_setup_irq(client, client->irq);
+	else
+		isl1208->rtc->uie_unsupported = 1;
+
 	if (rc)
 		return rc;
 
-- 
2.35.3