]> git.baikalelectronics.ru Git - kernel.git/commit
Input: omap4-keypad - implement errata check for lost key-up events
authorTony Lindgren <tony@atomide.com>
Mon, 11 Jan 2021 06:20:25 +0000 (22:20 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 11 Jan 2021 06:23:04 +0000 (22:23 -0800)
commit4ef6b6a542b2f5298e5956c6a1b256cdfaa28cc8
treed02b0ebf084857b73d404199721147da571d10ac
parent21bf03d7295f317195b41c09da3cd0f26a468e33
Input: omap4-keypad - implement errata check for lost key-up events

We are still missing handling for errata i689 related issues for the
case where we never see a key up interrupt for the last pressed key.

To fix the issue, we must scan the key state again after the keyboard
controller has idled to check if a key up event was missed. This is
described in the omap4 silicon errata documentation for Errata ID i689
"1.32 Keyboard Key Up Event Can Be Missed":

"When a key is released for a time shorter than the debounce time,
 in-between 2 key press (KP1 and KP2), the keyboard state machine will go
 to idle mode and will never detect the key release (after KP1, and also
 after KP2), and thus will never generate a new IRQ indicating the key
 release."

We can use PM runtime autosuspend features to check the keyboard state
after it enters idle.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/X/vrygoBxzGyXhfc@atomide.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/omap4-keypad.c