Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable wake-up from sleep mode through GPIO signal

Tags:

linux

arm

gpio

I need to wake up my BeagleBone device, running Angstrom OS, from sleep mode through GPIO signal.

I read that using /sys/class/gpio/gpioXX/power/wakeup is the way to do. The problem is that there isn't any "wakeup" file under power directory. So, how I should proceed to activate it? Is there any solution without recompiling kernel?

I can read fine from GPIO value, so GPIO sysfs is working.

like image 206
David Avatar asked Jan 21 '26 02:01

David


1 Answers

There was issue inside GPIO driver in OMAP4xxx kernel, when GPIO banks was initialized before mux subsystem initialisation. This effectively prevented wakeups by pins in GPIO mode.

You can check this, by reading mux[] fields of struct gpio_bank (file drivers/omap/gpio-omap.c). They should not hold NULL values.

There is a for loop at end of void omap_gpio_mod_init(struct gpio_bank *bank) function. You need to remove it, and initialize mux pointer at end of static int omap_gpio_request(struct gpio_chip *chip, unsigned offset) function.

This will ensure, that it will be inited correctly.

Also, as far as I remember, the was some issue with debounce clocks. If my first advice wont work, try to disable debounce for that pin.

like image 103
werewindle Avatar answered Jan 23 '26 16:01

werewindle