Thread (3 messages) 3 messages, 2 authors, 2021-10-07

Re: [PATCH] input: keyboard-matrix: add a function to reset input states

flat view

From: Angelo Dureghello <hidden>
Date: 2021-10-07 12:20:44

Hi Dimitry,

On Wed, Oct 6, 2021 at 10:03 PM Dmitry Torokhov
[off-list ref] wrote:
Hi Angelo,

On Sun, Sep 26, 2021 at 05:18:47PM +0200, Angelo Dureghello wrote:
quoted
In some cases, at open(), when matrix_keypad_start() schedules
matrix_keypad_scan(), some events may be fired, but they can't be
grabbed from the event queue by evtest later on, since this
condition causes a continuous event triggered.
I am not quite sure what you mean by "continuous event triggered". Could
you please explain in more detail?
sure, mainly, without this fix, by using evtest, i get
continuously the same key event (last key of the keypad),
even if evtest is supposed to remove the event from the queue,
the event is always there. Then, pressing a key of the matrix
keypad, things get fixed, i get the key press event, then events
stop, queue is now empty, no other events are detected.

Honestly couldn't go much deeper, but the behavior described above
is originated from calling:
matrix_keypad_start() ->
  scheduled_delayed_work() ->
     matrix_keypad_scan(), that detects some initial key pressed state
        and fires an event, and interrupts are not enabled still.

Cleaning key states before enabling them solved the issue (i am on
a sun8i H2+).
Thanks.
YW, available for any test in case.

Regards,
angelo

--
Dmitry


-- 
Angelo Dureghello
Timesys
e. angelo.dureghello@timesys.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help