91 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/input/fsl,mpr121-touchkey.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Freescale MPR121 capacitive touch sensor controller8 9maintainers:10 - Dmitry Torokhov <dmitry.torokhov@gmail.com>11 12description: |13 The MPR121 supports up to 12 completely independent electrodes/capacitance14 sensing inputs in which 8 are multifunctional for LED driving and GPIO.15 https://www.nxp.com/docs/en/data-sheet/MPR121.pdf16 17allOf:18 - $ref: input.yaml#19 20anyOf:21 - required: [ interrupts ]22 - required: [ poll-interval ]23 24properties:25 compatible:26 const: fsl,mpr121-touchkey27 28 reg:29 maxItems: 130 31 interrupts:32 maxItems: 133 34 vdd-supply: true35 36 linux,keycodes:37 minItems: 138 maxItems: 1239 40 wakeup-source:41 description: Use any event on keypad as wakeup event.42 type: boolean43 44required:45 - compatible46 - reg47 - vdd-supply48 - linux,keycodes49 50unevaluatedProperties: false51 52examples:53 - |54 // Example with interrupts55 #include "dt-bindings/input/input.h"56 i2c {57 #address-cells = <1>;58 #size-cells = <0>;59 60 touchkey@5a {61 compatible = "fsl,mpr121-touchkey";62 reg = <0x5a>;63 interrupt-parent = <&gpio1>;64 interrupts = <28 2>;65 autorepeat;66 vdd-supply = <&ldo4_reg>;67 linux,keycodes = <KEY_0>, <KEY_1>, <KEY_2>, <KEY_3>,68 <KEY_4>, <KEY_5>, <KEY_6>, <KEY_7>,69 <KEY_8>, <KEY_9>, <KEY_A>, <KEY_B>;70 };71 };72 73 - |74 // Example with polling75 #include "dt-bindings/input/input.h"76 i2c {77 #address-cells = <1>;78 #size-cells = <0>;79 80 touchkey@5a {81 compatible = "fsl,mpr121-touchkey";82 reg = <0x5a>;83 poll-interval = <20>;84 autorepeat;85 vdd-supply = <&ldo4_reg>;86 linux,keycodes = <KEY_0>, <KEY_1>, <KEY_2>, <KEY_3>,87 <KEY_4>, <KEY_5>, <KEY_6>, <KEY_7>,88 <KEY_8>, <KEY_9>, <KEY_A>, <KEY_B>;89 };90 };91