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.

Linux/AM4378: gpio-keys debounce limit

Part Number: AM4378

Tool/software: Linux

using SDK 4.03.0.5

in my dts file i have:

HookSwitch {
label = "HookSwitch";
linux,code = <0x88>;
debounce-interval = <100>;
gpios = <&gpio5 20 0>;
};

LineInUse {
label = "LineInUse";
linux,code = <0x89>;
debounce-interval = <1000>;
gpios = <&gpio5 5 0>;
};

and in my boot message i have this:

omap_gpio 48322000.gpio: Could not set line 20 debounce to 100000 microseconds (-22)
[ 2.543651] omap_gpio 48322000.gpio: Could not set line 5 debounce to 1000000 microseconds (-22)

what is the limit on debounce times for this driver? 

  • Hi Cobsonchael,

    The max debounce value is 7936 microseconds, while you are using 100000 and 1000000. Refer to the below pointers for details:

    AM437x TRM, section 28.3.4.4 Debouncing Time

    linux-kernel/drivers/input/keyboard/gpio_keys.c

    linux-kernel/drivers/gpio/gpio-omap.c

    Regards,
    Pavel