by megous · 4y ago · 0 comments
On Pinephone, the RTC(has alarm support) is in the SoC and is always powered by PMIC even when the phone is off. PMIC can be configured to power up on interrupt signal, and SoC can be configured to pulldown the interrupt line on RTC alarm.
On Pro RTC is inside PMIC directly.
HW can do it. Alarm app just has to use the HW correctly.
(Tested on my PinePhone on Mobian: it works!)
Then timer firing will wake the system.
That's pretty much it. Standard Linux feature across all systems that support system suspend and RTC wakeup.
man timerfd_create
I wonder if waked writing directly to RTC doesn't break the kernel alarm functionality used by timerfd, but hopefully not https://gitlab.com/seath1/waked/-/blob/master/src/main.cpp#L...
But why not, it's FOSS. :)