Hi,
You can do this inside the board config file. Check the gpio_keys_button structure entries, more specifically the .wakeup member:
[quote]/* Configure GPIOs for GPIO Keys */
static struct gpio_keys_button am335x_evm_gpio_buttons[] = {
{
.code = BTN_0,
.gpio = GPIO_TO_PIN(2, 3),
.desc = "SW1",
},
{
.code = BTN_1,
.gpio = GPIO_TO_PIN(2, 2),
.desc = "SW2",
},
{
.code = BTN_2,
.gpio = GPIO_TO_PIN(0, 30),
.desc = "SW3",
.wakeup = 1,
},
{
.code = BTN_3,
.gpio = GPIO_TO_PIN(2, 5),
.desc = "SW4",
},
};[/quote]
Best regards,
Miroslav