ARM: shmobile: lager, koelsch: set .debounce_interval
cover ARM: shmobile: lager, koelsch: set .debounce_interval
This short series sets .debounce_interval for GPIO keys for the lager and koelsch boards.
This resolves a problem on the lager board reported, tested and fixed by Kuribayashi-san. I have extended the solution to the koelsch board.
Shinya Kuribayashi (1):
ARM: shmobile: lager: set .debounce_interval
Simon Horman (1):
ARM: shmobile: koelsch: set .debounce_interval
arch/arm/mach-shmobile/board-koelsch.c | 3 ++- arch/arm/mach-shmobile/board-lager.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.4
PATCH 1/2 ARM: shmobile: lager: set .debounce_interval
From: Shinya Kuribayashi <[email protected]>
In R-Car GPIO hardware block, 'chattering removal' feature can be enabled on GPIO-n-[3:0] pins, but it's not supported on rest of pins GPIO-n-[31:4].
Set an appropriate debounce interval, instead. We could confirm that spurious/unnecessary GPIO interrupts are prevented by this settings.
--- arch/arm/mach-shmobile/board-lager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-shmobile/board-lager.c +2 -1
@@ -120,7 +120,8 @@ static const struct gpio_led_platform_data lager_leds_pdata __initconst = {/* GPIO KEY */ #define GPIO_KEY (c, g, d, ...) \ - { .code = c, .gpio = g, .desc = d, .active_low = 1 } + { .code = c, .gpio = g, .desc = d, .active_low = 1, \ + .debounce_interval = 20 }static struct gpio_keys_button gpio_buttons[] = {GPIO_KEY (KEY_4 ,RCAR_GP_PIN (1 ,28 ),"SW2-pin4" ),
Signature · 1 line
1.8.4
PATCH 2/2 ARM: shmobile: koelsch: set .debounce_interval
In reply to Simon HormanIn R-Car GPIO hardware block, 'chattering removal' feature can be enabled on GPIO-n-[3:0] pins, but it's not supported on rest of pins GPIO-n-[31:4].
Set an appropriate debounce interval, instead. We could confirm that spurious/unnecessary GPIO interrupts are prevented by this settings.
Based on work for the lager board by Shinya Kuribayashi.
--- arch/arm/mach-shmobile/board-koelsch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-shmobile/board-koelsch.c +2 -1
@@ -56,7 +56,8 @@ static const struct gpio_led_platform_data koelsch_leds_pdata __initconst = {/* GPIO KEY */ #define GPIO_KEY (c, g, d, ...) \ - { .code = c, .gpio = g, .desc = d, .active_low = 1 } + { .code = c, .gpio = g, .desc = d, .active_low = 1, \ + .debounce_interval = 20 }static struct gpio_keys_button gpio_buttons[] = {GPIO_KEY (KEY_4 ,RCAR_GP_PIN (5 ,3 ),"SW2-pin4" ),
Signature · 1 line
1.8.4
cover ARM: shmobile: lager, koelsch: set .debounce_interval
In reply to Simon HormanQuoted 5 lines · Simon Horman
This short series sets .debounce_interval for GPIO keys for the lager and koelsch boards.
This resolves a problem on the lager board reported, tested and fixed by Kuribayashi-san. I have extended the solution to the koelsch board.
I have queued up these patches.