Merge tag 'mvebu-fixes-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gcleme...
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / input / fsl,mpr121-touchkey.yaml
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/input/fsl,mpr121-touchkey.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Freescale MPR121 capacitive touch sensor controller
8
9 maintainers:
10   - Dmitry Torokhov <dmitry.torokhov@gmail.com>
11
12 description: |
13   The MPR121 supports up to 12 completely independent electrodes/capacitance
14   sensing inputs in which 8 are multifunctional for LED driving and GPIO.
15   https://www.nxp.com/docs/en/data-sheet/MPR121.pdf
16
17 allOf:
18   - $ref: input.yaml#
19
20 anyOf:
21   - required: [ interrupts ]
22   - required: [ poll-interval ]
23
24 properties:
25   compatible:
26     const: fsl,mpr121-touchkey
27
28   reg:
29     maxItems: 1
30
31   interrupts:
32     maxItems: 1
33
34   vdd-supply:
35     maxItems: 1
36
37   linux,keycodes:
38     minItems: 1
39     maxItems: 12
40
41   wakeup-source:
42     description: Use any event on keypad as wakeup event.
43     type: boolean
44
45 required:
46   - compatible
47   - reg
48   - vdd-supply
49   - linux,keycodes
50
51 unevaluatedProperties: false
52
53 examples:
54   - |
55     // Example with interrupts
56     #include "dt-bindings/input/input.h"
57     i2c {
58         #address-cells = <1>;
59         #size-cells = <0>;
60
61         mpr121@5a {
62             compatible = "fsl,mpr121-touchkey";
63             reg = <0x5a>;
64             interrupt-parent = <&gpio1>;
65             interrupts = <28 2>;
66             autorepeat;
67             vdd-supply = <&ldo4_reg>;
68             linux,keycodes = <KEY_0>, <KEY_1>, <KEY_2>, <KEY_3>,
69                              <KEY_4>, <KEY_5>, <KEY_6>, <KEY_7>,
70                              <KEY_8>, <KEY_9>, <KEY_A>, <KEY_B>;
71         };
72     };
73
74   - |
75     // Example with polling
76     #include "dt-bindings/input/input.h"
77     i2c {
78         #address-cells = <1>;
79         #size-cells = <0>;
80
81         mpr121@5a {
82             compatible = "fsl,mpr121-touchkey";
83             reg = <0x5a>;
84             poll-interval = <20>;
85             autorepeat;
86             vdd-supply = <&ldo4_reg>;
87             linux,keycodes = <KEY_0>, <KEY_1>, <KEY_2>, <KEY_3>,
88                              <KEY_4>, <KEY_5>, <KEY_6>, <KEY_7>,
89                              <KEY_8>, <KEY_9>, <KEY_A>, <KEY_B>;
90         };
91     };