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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux