Add matrix keypad driver support for Mediatek SoCs
Subsystems (4)
PATCH v18 1/1 Add matrix keypad driver support for Mediatek SoCs
Change since v17:
- modify how to get keycode in keypad isr function
- update keypad, num-columns and keypad, num-rows descriptions
- replace variable ret as error in probe function
fengping.yu (3):
dt-bindings: Add bindings for Mediatek matrix keypad
drivers: input:keyboard: Add mtk keypad driver
configs: defconfig: Add CONFIG_KEYBOARD_MTK_KPD=m
.../devicetree/bindings/input/mtk-kpd.yaml | 83 +++++++ arch/arm64/configs/defconfig | 1 + drivers/input/keyboard/Kconfig | 11 + drivers/input/keyboard/Makefile | 1 + drivers/input/keyboard/mtk-kpd.c | 218 ++++++++++++++++++ 5 files changed, 314 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/mtk-kpd.yaml create mode 100644 drivers/input/keyboard/mtk-kpd.c
--
2.18.0
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v18 1/3 dt-bindings: Add bindings for Mediatek matrix keypad
From: "fengping.yu" <[email protected]>
This patch add devicetree bindings for Mediatek matrix keypad driver.
Signed-off-by fengping.yu <[email protected]>
--- .../devicetree/bindings/input/mtk-kpd.yaml | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/mtk-kpd.yaml
Documentation/devicetree/bindings/input/mtk-kpd.yaml new file +83 -0
@@ -0,0 +1,83 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +version: 1 + +$id: http://devicetree.org/schemas/input/mtk-keypad.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek's Keypad Controller device tree bindings + +maintainer: + - Fengping Yu <[email protected]> + +description: | + Mediatek's Keypad controller is used to interface a SoC with a matrix-type + keypad device. The keypad controller supports multiple row and column lines. + A key can be placed at each intersection of a unique row and a unique column. + The keypad controller can sense a key-press and key-release and report the + event using a interrupt to the cpu. + +properties: + compatible: + oneOf: + - const: "mediatek,mt6779-keypad" + - const: "mediatek,mt6873-keypad" + + clock-names: + description: Names of the clocks listed in clocks property in the same order + maxItems: 1 + items: + - const: kpd + + clocks: + description: Must contain one entry, for the module clock + refs: devicetree/bindings/clocks/clock-bindings.txt for details. + + interrupts: + description: A single interrupt specifier + maxItems: 1 + + linux,keymap: + description: The keymap for keys as described in the binding document + refs: devicetree/bindings/input/matrix-keymap.txt + minItems: 1 + + reg: + description: The base address of the Keypad register bank + maxItems: 1 + + wakeup-source: + description: use any event on keypad as wakeup event + type: boolean + + keypad,num-columns: + description: Number of column lines connected to the keypad controller. + + keypad,num-rows: + description: Number of row lines connected to the keypad controller. + + mediatek,debounce-us: + description: Debounce interval in microseconds, if not specified, the default + value is 16000 + maximum: 256000 + +required: + - compatible + - reg + - interrupts + - linux,keymap + - clocks + - clock-names + +examples: + - | + + kp@10010000 { + compatible = "mediatek,kp"; + reg = <0 0x10010000 0 0x1000>; + linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_VOLUMEDOWN) >; + interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_FALLING>; + clocks = <&clk26m>; + clock-names = "kpd"; + };
Signature · 5 lines
2.18.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel