mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/3] gpio: max77620: Use correct unit for debounce times
@ 2019-10-02 12:28 Thierry Reding
  2019-10-02 12:28 ` [PATCH 2/3] gpio: max77620: Do not allocate IRQs upfront Thierry Reding
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Thierry Reding @ 2019-10-02 12:28 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Timo Alho, linux-gpio, linux-tegra, linux-kernel

From: Thierry Reding <treding@nvidia.com>

The gpiod_set_debounce() function takes the debounce time in
microseconds. Adjust the switch/case values in the MAX77620 GPIO to use
the correct unit.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpio/gpio-max77620.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-max77620.c b/drivers/gpio/gpio-max77620.c
index 47d05e357e61..faf86ea9c51a 100644
--- a/drivers/gpio/gpio-max77620.c
+++ b/drivers/gpio/gpio-max77620.c
@@ -192,13 +192,13 @@ static int max77620_gpio_set_debounce(struct max77620_gpio *mgpio,
 	case 0:
 		val = MAX77620_CNFG_GPIO_DBNC_None;
 		break;
-	case 1 ... 8:
+	case 1000 ... 8000:
 		val = MAX77620_CNFG_GPIO_DBNC_8ms;
 		break;
-	case 9 ... 16:
+	case 9000 ... 16000:
 		val = MAX77620_CNFG_GPIO_DBNC_16ms;
 		break;
-	case 17 ... 32:
+	case 17000 ... 32000:
 		val = MAX77620_CNFG_GPIO_DBNC_32ms;
 		break;
 	default:
-- 
2.23.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-10-04 22:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-02 12:28 [PATCH 1/3] gpio: max77620: Use correct unit for debounce times Thierry Reding
2019-10-02 12:28 ` [PATCH 2/3] gpio: max77620: Do not allocate IRQs upfront Thierry Reding
2019-10-04 22:01   ` Linus Walleij
2019-10-02 12:28 ` [PATCH 3/3] gpio: max77620: Fix interrupt handling Thierry Reding
2019-10-04 22:03   ` Linus Walleij
2019-10-04 21:58 ` [PATCH 1/3] gpio: max77620: Use correct unit for debounce times Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®