]> git.baikalelectronics.ru Git - kernel.git/commit
Input: mt6779-keypad - match hardware matrix organization
authorMattijs Korpershoek <mkorpershoek@baylibre.com>
Fri, 8 Jul 2022 21:57:31 +0000 (14:57 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 8 Jul 2022 21:58:36 +0000 (14:58 -0700)
commit941c3bfd3acc92c5288a488771a35eecda6114c8
treea230d7fabc040cddda3e1cf98437d10267f89e07
parent64dd1ceba0b07f3a9f6427379c9a0ad5eaa763cc
Input: mt6779-keypad - match hardware matrix organization

The MediaTek keypad has a set of bits representing keys,
from KEY0 to KEY77, arranged in 5 chunks of 15 bits split into 5 32-bit
registers.

In our implementation, we simply decided to use register number as row
and offset in the register as column when encoding our "matrix".

Because of this, we can have a 5x32 matrix which does not match the
hardware at all, which is confusing.

Change the row/column calculation to match the hardware.

Fixes: 6567cc62ec0f ("Input: mt6779-keypad - add MediaTek keypad driver")
Co-developed-by: Fabien Parent <fparent@baylibre.com>
Signed-off-by: Fabien Parent <fparent@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20220707075236.126631-2-mkorpershoek@baylibre.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/mt6779-keypad.c