Here is an example:
These MCA gpio pins are IRQ capable: MCA_IO0/1/2/5 (index 504,505,505,509).
In this case you don“t need to enable the wakeup register, once you configure the MCA GPIO edge the IRQ will be avaible.
So to configure the MCA_IO1
root@ccimx6ulsbc:~# cat /proc/interrupts | grep gpiolib
root@ccimx6ulsbc:~# echo 505 > /sys/class/gpio/export
root@ccimx6ulsbc:~# echo in > /sys/class/gpio/gpio505/direction
root@ccimx6ulsbc:~# echo rising > /sys/class/gpio/gpio505/edge
Once you have done this, you are done and the GPIO will be used as a wakeup source
root@ccimx6ulsbc:~# cat /proc/interrupts | grep gpiolib
246: 0 mca-gpio-irq 1 Edge gpiolib