Skip to content

Commit f88c117

Browse files
thierryredingbrgl
authored andcommitted
gpio: bd70528: Use correct unit for debounce times
The debounce time passed to gpiod_set_debounce() is specified in microseconds, so make sure to use the correct unit when computing the register values, which denote delays in milliseconds. Signed-off-by: Thierry Reding <[email protected]> Cc: <[email protected]> Fixes: 18bc64b ("gpio: Initial support for ROHM bd70528 GPIO block") [Bartosz: fixed a typo in commit message] Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent b039147 commit f88c117

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpio/gpio-bd70528.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ static int bd70528_set_debounce(struct bd70528_gpio *bdgpio,
2525
case 0:
2626
val = BD70528_DEBOUNCE_DISABLE;
2727
break;
28-
case 1 ... 15:
28+
case 1 ... 15000:
2929
val = BD70528_DEBOUNCE_15MS;
3030
break;
31-
case 16 ... 30:
31+
case 15001 ... 30000:
3232
val = BD70528_DEBOUNCE_30MS;
3333
break;
34-
case 31 ... 50:
34+
case 30001 ... 50000:
3535
val = BD70528_DEBOUNCE_50MS;
3636
break;
3737
default:

0 commit comments

Comments
 (0)