We are using imx6sx custom board and we need sleep and wakeup functionality based on GPIO interrupt.
1) put linux into sleep mode using echo mem > /sys/power/state command,
2) Wakeup A9 core linux when GPIO interrupt occurs.
we have use GPIO7_IO8.
for that I have created node in imx6sx-sdb.dtsi file as below:
compatible = "gpio-keys";
label = "wake-up";
gpios = <&gpio7 8 1>;
linux,code = <116>;
using above changes in .dtsi file i get below node:
then, I use below command to enable it
echo enabled > /sys/devices/soc0/gpio-keys/power/wakeup
using below command I put linux into sleep mode
echo mem > /sys/power/state
then, we give interrupt on GPIO7_IO8, using button switch but I am not able wake-up linux.
So, Please provide your expert advice to fix this issue.