Skip to content

Commit 83c0711

Browse files
rtc: rv8803: add wakeup-source support
The RV8803 can be wired directly to a PMIC that can wake up an SoC without the CPU getting interrupts. Link: https://lore.kernel.org/r/20240108004357.602918-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent eea7615 commit 83c0711

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Documentation/devicetree/bindings/rtc/epson,rx8900.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ properties:
2929
3030
trickle-diode-disable: true
3131

32+
wakeup-source: true
33+
3234
required:
3335
- compatible
3436
- reg

drivers/rtc/rtc-rv8803.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,9 +712,12 @@ static int rv8803_probe(struct i2c_client *client)
712712
if (err)
713713
dev_err(&client->dev, "failed to set wake IRQ\n");
714714
}
715+
} else {
716+
if (device_property_read_bool(&client->dev, "wakeup-source"))
717+
device_init_wakeup(&client->dev, true);
718+
else
719+
clear_bit(RTC_FEATURE_ALARM, rv8803->rtc->features);
715720
}
716-
if (!client->irq)
717-
clear_bit(RTC_FEATURE_ALARM, rv8803->rtc->features);
718721

719722
if (of_property_read_bool(client->dev.of_node, "epson,vdet-disable"))
720723
rv8803->backup |= RX8900_FLAG_VDETOFF;

0 commit comments

Comments
 (0)