Skip to content

Commit e71087e

Browse files
Markus Burridtor
authored andcommitted
Input: matrix_keypad - use fsleep for delays after activating columns
The delay is specified in a device property, so the duration can be arbitrarily large. fsleep() determines the best way of delaying (sleep vs spin) based on duration. see Documentation/timers/delay_sleep_functions.rst Signed-off-by: Markus Burri <markus.burri@mt.com> Reviewed-by: Manuel Traut <manuel.traut@mt.com> Link: https://lore.kernel.org/r/20250110054906.354296-2-markus.burri@mt.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 90a0a63 commit e71087e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/keyboard/matrix_keypad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static void activate_col(struct matrix_keypad *keypad, int col, bool on)
6969
__activate_col(keypad, col, on);
7070

7171
if (on && keypad->col_scan_delay_us)
72-
udelay(keypad->col_scan_delay_us);
72+
fsleep(keypad->col_scan_delay_us);
7373
}
7474

7575
static void activate_all_cols(struct matrix_keypad *keypad, bool on)

0 commit comments

Comments
 (0)