]> Git Repo - linux.git/commitdiff
gpio: max77620: Use correct unit for debounce times
authorThierry Reding <[email protected]>
Wed, 2 Oct 2019 12:28:23 +0000 (14:28 +0200)
committerLinus Walleij <[email protected]>
Fri, 4 Oct 2019 21:58:10 +0000 (23:58 +0200)
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Linus Walleij <[email protected]>
drivers/gpio/gpio-max77620.c

index 47d05e357e61a05b742fd75d892fa3d3e5506af0..faf86ea9c51ab15dcddedae72a2ddb168b469cfe 100644 (file)
@@ -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:
This page took 0.057843 seconds and 4 git commands to generate.