Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/input/fsl,mpr121-touchkey.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Freescale MPR121 capacitive touch sensor controller
0008 
0009 maintainers:
0010   - Dmitry Torokhov <dmitry.torokhov@gmail.com>
0011 
0012 description: |
0013   The MPR121 supports up to 12 completely independent electrodes/capacitance
0014   sensing inputs in which 8 are multifunctional for LED driving and GPIO.
0015   https://www.nxp.com/docs/en/data-sheet/MPR121.pdf
0016 
0017 allOf:
0018   - $ref: input.yaml#
0019 
0020 anyOf:
0021   - required: [ interrupts ]
0022   - required: [ poll-interval ]
0023 
0024 properties:
0025   compatible:
0026     const: fsl,mpr121-touchkey
0027 
0028   reg:
0029     maxItems: 1
0030 
0031   interrupts:
0032     maxItems: 1
0033 
0034   vdd-supply: true
0035 
0036   linux,keycodes:
0037     minItems: 1
0038     maxItems: 12
0039 
0040   wakeup-source:
0041     description: Use any event on keypad as wakeup event.
0042     type: boolean
0043 
0044 required:
0045   - compatible
0046   - reg
0047   - vdd-supply
0048   - linux,keycodes
0049 
0050 unevaluatedProperties: false
0051 
0052 examples:
0053   - |
0054     // Example with interrupts
0055     #include "dt-bindings/input/input.h"
0056     i2c {
0057         #address-cells = <1>;
0058         #size-cells = <0>;
0059 
0060         touchkey@5a {
0061             compatible = "fsl,mpr121-touchkey";
0062             reg = <0x5a>;
0063             interrupt-parent = <&gpio1>;
0064             interrupts = <28 2>;
0065             autorepeat;
0066             vdd-supply = <&ldo4_reg>;
0067             linux,keycodes = <KEY_0>, <KEY_1>, <KEY_2>, <KEY_3>,
0068                              <KEY_4>, <KEY_5>, <KEY_6>, <KEY_7>,
0069                              <KEY_8>, <KEY_9>, <KEY_A>, <KEY_B>;
0070         };
0071     };
0072 
0073   - |
0074     // Example with polling
0075     #include "dt-bindings/input/input.h"
0076     i2c {
0077         #address-cells = <1>;
0078         #size-cells = <0>;
0079 
0080         touchkey@5a {
0081             compatible = "fsl,mpr121-touchkey";
0082             reg = <0x5a>;
0083             poll-interval = <20>;
0084             autorepeat;
0085             vdd-supply = <&ldo4_reg>;
0086             linux,keycodes = <KEY_0>, <KEY_1>, <KEY_2>, <KEY_3>,
0087                              <KEY_4>, <KEY_5>, <KEY_6>, <KEY_7>,
0088                              <KEY_8>, <KEY_9>, <KEY_A>, <KEY_B>;
0089         };
0090     };