[PATCH] rtc: rtc-pm8xxx: control default alarm wake up capability
From: Anvesh Jain P
Date: Tue Aug 01 2023 - 07:46:42 EST
Enable & disable rtc alarm wake up capability based on
default parameter passed from device tree.
Signed-off-by: Venkata Rao Kakani <quic_vkakani@xxxxxxxxxxx>
Signed-off-by: Anvesh Jain P <quic_ajainp@xxxxxxxxxxx>
---
drivers/rtc/rtc-pm8xxx.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c
index f6b779c12ca7..bed57be602b6 100644
--- a/drivers/rtc/rtc-pm8xxx.c
+++ b/drivers/rtc/rtc-pm8xxx.c
@@ -523,6 +523,9 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev)
if (rc)
return rc;
+ if (of_property_read_bool(pdev->dev.of_node, "disable-alarm-wakeup"))
+ device_set_wakeup_capable(&pdev->dev, false);
+
rc = dev_pm_set_wake_irq(&pdev->dev, rtc_dd->alarm_irq);
if (rc)
return rc;
base-commit: 0a8db05b571ad5b8d5c8774a004c0424260a90bd
--
2.17.1