Skip to contentSkip to conversation

ARM: shmobile: lager, koelsch: set .debounce_interval

PATCH New Simon Horman 2 participants 4 messages Oct 29, 2013 – Oct 31, 2013

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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
#1 lore raw

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
index 78a31b6..fcf06fd 100644
@@ -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
#2 lore raw

PATCH 2/2 ARM: shmobile: koelsch: set .debounce_interval

In reply to Simon Horman

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.

Based on work for the lager board by Shinya Kuribayashi.

Cc Shinya Kuribayashi <[email protected]>
---
 arch/arm/mach-shmobile/board-koelsch.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-shmobile/board-koelsch.c +2 -1
index 59fa0b9..5b81a34 100644
@@ -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
#3 lore raw

cover ARM: shmobile: lager, koelsch: set .debounce_interval

In reply to Simon Horman
Quoted 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.