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

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

 



Hi Dimitry,

On Wed, Oct 6, 2021 at 10:03 PM Dmitry Torokhov
<dmitry.torokhov@xxxxxxxxx> wrote:
>
> Hi Angelo,
>
> On Sun, Sep 26, 2021 at 05:18:47PM +0200, Angelo Dureghello wrote:
> > 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@xxxxxxxxxxx



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux