Skip to content
Commit 31789f35 authored by Mattijs Korpershoek's avatar Mattijs Korpershoek Committed by Dmitry Torokhov
Browse files

Input: mt6779-keypad - implement row/column selection



The MediaTek keypad has a total of 6 input rows and 6 input columns.
By default, rows/columns 0-2 are enabled.

This is controlled by the KP_SEL register:
- bits[9:4]   control row selection
- bits[15:10] control column selection

Each bit enables the corresponding row/column number (e.g KP_SEL[4]
enables ROW0)

Depending on how the keypad is wired, this may result in wrong readings
of the keypad state.

Program the KP_SEL register to limit the key detection to n_rows,
n_cols we retrieve from the device tree.

Signed-off-by: default avatarMattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20220707075236.126631-3-mkorpershoek@baylibre.com


Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent d6ed5258
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment