Message ID | 20220720-mt8183-keypad-v2-0-6d42c357cb76@baylibre.com |
---|---|
Headers | show |
Series | Input: mt6779-keypad - double keys support | expand |
Il 26/07/22 14:56, Mattijs Korpershoek ha scritto: > The MediaTek keypad can operate in two modes: single key or double key. > The driver only supports single key mode. In double key mode, the > row/column calculation based on the key is different. > > Add a calc_row_col function pointer which will be different based on > single/double key mode. > > No functional change. > > Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> > Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Il 26/07/22 14:56, Mattijs Korpershoek ha scritto: > MediaTek keypad has 2 modes of detecting key events: > - single key: each (row, column) can detect one key > - double key: each (row, column) is a group of 2 keys > > Double key support exists to minimize cost, since it reduces the number > of pins required for physical keys. > > Double key is configured by setting BIT(0) of the KP_SEL register. > > Enable double key matrix support based on the mediatek,keys-per-group > device tree property. > > Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
On Tue, Jul 26, 2022 at 02:56:05PM +0200, Mattijs Korpershoek wrote: > The MediaTek keypad controller has multiple operating modes: > * single key detection (currently implemented) > * double key detection > > With double key detection, each (row,column) is a group that can detect > two keys in the key matrix. > This minimizes the overall pin counts for cost reduction. > However, pressing multiple keys in the same group will not be > detected properly. > > On some boards, like mt8183-pumpkin, double key detection is used. > > Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Applied patches 1 through 5 (leaving dts patches out), thank you. > > --- > Changes in v2: > - bindings: add matrix-keymap justification in commit message (Krzysztof) > - bindings: switch from double-keys(boolean) to keys-per-group(uint32) (Krzysztof) > - driver: add a function pointer for row/column calculation (Angelo) > - Link to v1: https://lore.kernel.org/r/20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com > > --- > Fabien Parent (2): > arm64: dts: mediatek: mt8183: add keyboard node > arm64: dts: mediatek: mt8183-pumpkin: add keypad support > > Mattijs Korpershoek (5): > MAINTAINERS: input: add mattijs for mt6779-keypad > dt-bindings: mediatek,mt6779-keypad: use unevaluatedProperties > dt-bindings: mediatek,mt6779-keypad: add mediatek,keys-per-group > Input: mt6779-keypad - prepare double keys support with calc_row_col > Input: mt6779-keypad - support double keys matrix > > .../bindings/input/mediatek,mt6779-keypad.yaml | 8 ++++- > MAINTAINERS | 6 ++++ > arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts | 21 +++++++++++ > arch/arm64/boot/dts/mediatek/mt8183.dtsi | 9 +++++ > drivers/input/keyboard/mt6779-keypad.c | 41 ++++++++++++++++++++-- > 5 files changed, 82 insertions(+), 3 deletions(-) > --- > base-commit: 668af1b6548837b44a2bfe65dcbae6b250adbf63 > change-id: 20220720-mt8183-keypad-20aa77106ff0 > > Best regards, > -- > Mattijs Korpershoek <mkorpershoek@baylibre.com>
On 11/08/2022 00:53, Dmitry Torokhov wrote: > On Tue, Jul 26, 2022 at 02:56:05PM +0200, Mattijs Korpershoek wrote: >> The MediaTek keypad controller has multiple operating modes: >> * single key detection (currently implemented) >> * double key detection >> >> With double key detection, each (row,column) is a group that can detect >> two keys in the key matrix. >> This minimizes the overall pin counts for cost reduction. >> However, pressing multiple keys in the same group will not be >> detected properly. >> >> On some boards, like mt8183-pumpkin, double key detection is used. >> >> Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> > > Applied patches 1 through 5 (leaving dts patches out), thank you. > Applied 6 and 7 now. Thanks! >> >> --- >> Changes in v2: >> - bindings: add matrix-keymap justification in commit message (Krzysztof) >> - bindings: switch from double-keys(boolean) to keys-per-group(uint32) (Krzysztof) >> - driver: add a function pointer for row/column calculation (Angelo) >> - Link to v1: https://lore.kernel.org/r/20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com >> >> --- >> Fabien Parent (2): >> arm64: dts: mediatek: mt8183: add keyboard node >> arm64: dts: mediatek: mt8183-pumpkin: add keypad support >> >> Mattijs Korpershoek (5): >> MAINTAINERS: input: add mattijs for mt6779-keypad >> dt-bindings: mediatek,mt6779-keypad: use unevaluatedProperties >> dt-bindings: mediatek,mt6779-keypad: add mediatek,keys-per-group >> Input: mt6779-keypad - prepare double keys support with calc_row_col >> Input: mt6779-keypad - support double keys matrix >> >> .../bindings/input/mediatek,mt6779-keypad.yaml | 8 ++++- >> MAINTAINERS | 6 ++++ >> arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts | 21 +++++++++++ >> arch/arm64/boot/dts/mediatek/mt8183.dtsi | 9 +++++ >> drivers/input/keyboard/mt6779-keypad.c | 41 ++++++++++++++++++++-- >> 5 files changed, 82 insertions(+), 3 deletions(-) >> --- >> base-commit: 668af1b6548837b44a2bfe65dcbae6b250adbf63 >> change-id: 20220720-mt8183-keypad-20aa77106ff0 >> >> Best regards, >> -- >> Mattijs Korpershoek <mkorpershoek@baylibre.com> >
The MediaTek keypad controller has multiple operating modes: * single key detection (currently implemented) * double key detection With double key detection, each (row,column) is a group that can detect two keys in the key matrix. This minimizes the overall pin counts for cost reduction. However, pressing multiple keys in the same group will not be detected properly. On some boards, like mt8183-pumpkin, double key detection is used. Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> --- Changes in v2: - bindings: add matrix-keymap justification in commit message (Krzysztof) - bindings: switch from double-keys(boolean) to keys-per-group(uint32) (Krzysztof) - driver: add a function pointer for row/column calculation (Angelo) - Link to v1: https://lore.kernel.org/r/20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com --- Fabien Parent (2): arm64: dts: mediatek: mt8183: add keyboard node arm64: dts: mediatek: mt8183-pumpkin: add keypad support Mattijs Korpershoek (5): MAINTAINERS: input: add mattijs for mt6779-keypad dt-bindings: mediatek,mt6779-keypad: use unevaluatedProperties dt-bindings: mediatek,mt6779-keypad: add mediatek,keys-per-group Input: mt6779-keypad - prepare double keys support with calc_row_col Input: mt6779-keypad - support double keys matrix .../bindings/input/mediatek,mt6779-keypad.yaml | 8 ++++- MAINTAINERS | 6 ++++ arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts | 21 +++++++++++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 9 +++++ drivers/input/keyboard/mt6779-keypad.c | 41 ++++++++++++++++++++-- 5 files changed, 82 insertions(+), 3 deletions(-) --- base-commit: 668af1b6548837b44a2bfe65dcbae6b250adbf63 change-id: 20220720-mt8183-keypad-20aa77106ff0 Best regards,