In my application I would like to get some notification when system goes to sleep (suspend) or wakes up. I couldn’t find any tools or events that provide such a notification.
Could you please advise what tools, programs can I use to get notified when systems goes to suspend mode or wakes up?
on cc6ul the mca/linux is currently:
o when a short press is done in the power button, it is calling mca_pwrkey_sleep_irq_handler() in drivers/input/misc/pwrkey-mca.c
The implementation that Digi does here signals the KEY_SLEEP press so the system goes to sleep.
o when a long press is done in the power button, it is calling mca_pwrkey_power_off_irq_handler() in drivers/input/misc/pwrkey-mca.c
The implementation that Digi does here signals the KEY_POWER press so the system goes to power-off.
thank you for your response. Could you please provide some more details, what should I do in order to fix this?
Is this correct that I have to rebuilt a new yocto image with new driver functionality as you mentioned? Is this possible at all to build this pwrkey-mca-cc6ul driver separately and load it afterwards?
Is there any possibility to obtain the information about KEY_SLEPP and KEY_POWER events from user space application?