Reputation: 17312
I'm trying to enable wakeup event for GPIO on embedded Linux, after searching for a while I figured how to do it, but when I try this:
echo enabled > /sys/class/gpio/gpio<n>/power/wakeup
I get
write error: Invalid argument
Does this mean that it's not supported by the hardware ? or do I need to enable something in the kernel ?
Edit:
Just for the record, sysfs GPIO is enabled and working fine, I can read/write the GPIO values, but I can't seem to be able to enable the wakeup event, I've been reading the kernel documentation and it says:
"Inputs can often be used as IRQ signals, often edge triggered but sometimes level triggered. Such IRQs may be configurable as system wakeup events, to wake the system from a low power state."
So I'm wondering, do I need to configure wakeup events for GPIO in the kernel ? and if the hardware doesn't support it, why do I have a wakeup file under sysfs/class/gpio/gpio#/power/wakeup ?
Upvotes: 1
Views: 5132
Reputation: 1319
Make sure your GPIO driver, which might specific for your board, handles the wakeup feature.
Upvotes: 1