Skip to contentSkip to conversation

rtc: rv8803: add wakeup-source support

PATCH Superseded [email protected] 1 participant 1 message Jan 8, 2024 Real time clock (RTC)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 rtc: rv8803: add wakeup-source support

From: Alexandre Belloni <[email protected]>

The RV8803 can be wired directly to a PMIC that can wake up an SoC without the CPU getting interrupts.

---
 drivers/rtc/rtc-rv8803.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/rtc/rtc-rv8803.c +5 -2
index 11e6b0d31f5d..1327251e527c 100644
@@ -712,9 +712,12 @@ static int rv8803_probe(struct i2c_client *client)
 			if (err)
 				dev_err(&client->dev, "failed to set wake IRQ\n");
 		}
+	} else {
+		if (device_property_read_bool(&client->dev, "wakeup-source"))
+			device_init_wakeup(&client->dev, true);
+		else
+			clear_bit(RTC_FEATURE_ALARM, rv8803->rtc->features);
 	}
-	if (!client->irq)
-		clear_bit(RTC_FEATURE_ALARM, rv8803->rtc->features);
 
 	if (of_property_read_bool(client->dev.of_node, "epson,vdet-disable"))
 		rv8803->backup |= RX8900_FLAG_VDETOFF;
Signature · 1 line
2.43.0