This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Disable partilcular gpio interrupt to wake system from low power mode

Other Parts Discussed in Thread: AM3352

Hi,

I need a small help. In our customized design with AM3352 Soc, We want to disable some gpio interrupt to wake up system from low power state. We are using sitara evm as reference sdk. Linux kernel version is 3.2.0.

I have google it and found that we can disable the wake from sysfs entry as shown below,

echo disabled > /sys/class/gpio/gpioN/power/wakeup, where N is gpio number.

But I didn't find any wakeup entry in sysfs. Is it possible to do this ? if yes then how ?

Thanks and Regards,

Shabbir Limdiwala

  • Hi,

    You can do this inside the board config file. Check the gpio_keys_button structure entries, more specifically the .wakeup member:

    /* 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",
        },
    };

    Best regards,
    Miroslav

  • Hi Miroslav,

    I have tried this in sitara evm. I changed to .wakeup=0, but the system stills wakes up when I press it.

    .wakeup=0 or .wakeup=1 is not making any effect.

    Thanks and Regards,

    Shabbir Limdiwala

  • Any update ?

    Shabbir Limdiwala