Message ID | 20250107135659.185293-2-markus.burri@mt.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Input: matrix-keypad: Various performance improvements | expand |
On 2025-01-07 14:56:53+0100, Markus Burri wrote: > The delay is retrieved from a device-tree property, so the duration is > variable. fsleep guesses the best delay function based on duration. > > Link: https://www.kernel.org/doc/html/latest/timers/timers-howto.html timers-howto.rst was removed in commit 1f455f601e20 ("timers/Documentation: Cleanup delay/sleep documentation"). Also inside the kernel tree refer to documentation files by their location inside the tree instead of the website. > Signed-off-by: Markus Burri <markus.burri@mt.com> > > --- > drivers/input/keyboard/matrix_keypad.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c > index 2a3b3bf..5571d2e 100644 > --- a/drivers/input/keyboard/matrix_keypad.c > +++ b/drivers/input/keyboard/matrix_keypad.c > @@ -68,7 +68,7 @@ static void activate_col(struct matrix_keypad *keypad, int col, bool on) > __activate_col(keypad, col, on); > > if (on && keypad->col_scan_delay_us) > - udelay(keypad->col_scan_delay_us); > + fsleep(keypad->col_scan_delay_us); > } > > static void activate_all_cols(struct matrix_keypad *keypad, bool on) > -- > 2.39.5 >
diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c index 2a3b3bf..5571d2e 100644 --- a/drivers/input/keyboard/matrix_keypad.c +++ b/drivers/input/keyboard/matrix_keypad.c @@ -68,7 +68,7 @@ static void activate_col(struct matrix_keypad *keypad, int col, bool on) __activate_col(keypad, col, on); if (on && keypad->col_scan_delay_us) - udelay(keypad->col_scan_delay_us); + fsleep(keypad->col_scan_delay_us); } static void activate_all_cols(struct matrix_keypad *keypad, bool on)
The delay is retrieved from a device-tree property, so the duration is variable. fsleep guesses the best delay function based on duration. Link: https://www.kernel.org/doc/html/latest/timers/timers-howto.html Signed-off-by: Markus Burri <markus.burri@mt.com> --- drivers/input/keyboard/matrix_keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)