I am new to this community, so HI EVERYONE .
I am working on an i.MX6S (Solo, without X or Lite) attached to a module attached to a carrier board. It's running Yocto 2.2.3.
I am trying to wake it up from one of the available standby states (freeze/mem/standby) by plugging in an USB Device.
To do so, I have tried to simply enable all available wakeup devices by executing
"for i in $(find /sys/devices/soc0/ -name wakeup);do echo enabled > $i;done", which should enable
"find /sys/devices/soc0/ -name wakeup
/sys/devices/soc0/soc/2100000.aips-bus/2184000.usb/ci_hdrc.0/power/wakeup" (first one has already been enabled by default, it's the board's wake button)
This is the method I've found in several documents** about wakeup on linux in general or, more specific, on Yocto on i.MX6.
But for some reason, it doesn't wake up from freeze or standby when I plug in/out an usb stick or keyboard or press a button on that keybard whose additional wakeup devices I've enabled previously (it adds some on connect).
For "mem" the behaviour is strange: As long as "/sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/power/wakeup" is enabled, the board doesn't go asleep (for a noteworthy time). The LEDs just flicker and no "Suspended for *.* seconds" message is given. Also if no external usb devices are connected.
Wakeup_on_serial_Input on the other hand works as expected after "echo enabled > /sys/devices/soc0/soc/2000000.aips-bus/2000000.spba-bus/2020000.serial/tty/ttymxc0/power/wakeup", from freeze/mem/standby.
Do you have any idea what's my mistake or what is wrong and how I can make Wakeup_On_USB_Device_Plug_In work?
** The most promising documents were https://community.nxp.com/thread/446856#comments including an i.MX Reference Manual and testing scripts for wake on usb that do the same as I do, and Wakeup from USB on mx6 — Linux USB , a technician of our board/module supplier sent to me. Both basically describe to echo-pipe "enabled" into the wakeup files of several devices.