Hi, we are using iMX8M plus evk. We want to implement graceful shut down when ONOFF button is pressed. The current implementation in the default BSP is, when the ONOFF button is held more than 5s then the system is going to turn off (forceful shut down)
We want to implement a graceful shut down where if we hold the ONOFF button less than 5s then processor should send a PMIC_ON_REQ to external PMIC chip so that system can be turned off. But it should be like graceful shutdown where software can get time to close all the background tasks before system gets tuned off.
How exactly we can implement this? In which are the files we need to modify?
Thanks in advance.