Re: [PATCH 4.19 078/149] gpio: max77620: Use correct unit for debounce times

From: Pavel Machek
Date: Wed Nov 06 2019 - 14:01:27 EST


Hi!

> 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.


> +++ b/drivers/gpio/gpio-max77620.c
> @@ -163,13 +163,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;

AFAICT the range should be 1 ... 8000, then 8001 ... 16000 etc below...

> - 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:

Best regards,
Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachment: signature.asc
Description: Digital signature