Enable wake up from sleep via GPIO signal

I need to wake up a BeagleBone device running Angstrom OS from sleep via GPIO signal.

I read that using /sys/class/gpio/gpioXX/power/wakeup

is the way to do it. The problem is that there is no "wake up" file in Power Power. So how should I start activating it? Is there any solution without kernel recompilation?

I can read fine from the GPIO value, so the sysfs GPIOs work.

+3


source to share


1 answer


Inside the GPIO driver, an error occurred in the OMAP4xxx kernel when the GPIO banks were initialized before the mux subsystem was initialized. This effectively prevented pins from waking up in GPIO mode.

You can check this by reading the mux[]

fields of the struct gpio_bank

(files / omap / gpio-omap.c). They must not contain NULL values.

There void omap_gpio_mod_init(struct gpio_bank *bank)

is a for loop at the end of the function . You need to remove it and initialize the pointer mux

at the end of the function static int omap_gpio_request(struct gpio_chip *chip, unsigned offset)

.



This will ensure that you enter it correctly.

Also, as far as I remember it was a debounce clock issue. If my first tip doesn't work, try disabling debounce for this output.

+2


source







All Articles