Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+7 -2
+2
Documentation/devicetree/bindings/rtc/epson,rx8900.yaml
··· 29 29 30 30 trickle-diode-disable: true 31 31 32 + wakeup-source: true 33 + 32 34 required: 33 35 - compatible 34 36 - reg
+5 -2
drivers/rtc/rtc-rv8803.c
··· 712 712 if (err) 713 713 dev_err(&client->dev, "failed to set wake IRQ\n"); 714 714 } 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); 715 720 } 716 - if (!client->irq) 717 - clear_bit(RTC_FEATURE_ALARM, rv8803->rtc->features); 718 721 719 722 if (of_property_read_bool(client->dev.of_node, "epson,vdet-disable")) 720 723 rv8803->backup |= RX8900_FLAG_VDETOFF;