AnsweredAssumed Answered

How to run a function after power key press?

Question asked by Sujay S on Sep 12, 2019
Latest reply on Sep 13, 2019 by igorpadykov

I'm using am imx6slevk with yocto bsp, on leaving the board idle for 10 minutes the console goes off(wait mode) and it turns back on when I press the power button,

The requirement is to run a function when the power button is pressed (the function merely turns on 2 gpios). 

I'm not sure how to detect a power key press and which header file to include for the same, does anyone have any idea how to integrate this?

Thanks in advance