From ee358cb45984f4569098d3a97edfd0067576ad2f Mon Sep 17 00:00:00 2001 From: Michal Vokáč Date: Tue, 15 Oct 2019 17:17:29 -0700 Subject: Input: mpr121 - add polling mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In case the interrupt line is not available, polling can be used to read out the state of the keys. Period of the polling needs to be configured by the poll-interval DT property. Signed-off-by: Michal Vokáč Reviewed-by: Rob Herring Signed-off-by: Dmitry Torokhov --- .../bindings/input/fsl,mpr121-touchkey.yaml | 25 +++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml') diff --git a/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml b/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml index c6fbcdf78556..5b37be0be4e9 100644 --- a/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml +++ b/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml @@ -17,6 +17,10 @@ description: | allOf: - $ref: input.yaml# +anyOf: + - required: [ interrupts ] + - required: [ poll-interval ] + properties: compatible: const: fsl,mpr121-touchkey @@ -41,12 +45,12 @@ properties: required: - compatible - reg - - interrupts - vdd-supply - linux,keycodes examples: - | + // Example with interrupts #include "dt-bindings/input/input.h" i2c { #address-cells = <1>; @@ -64,3 +68,22 @@ examples: , , , ; }; }; + + - | + // Example with polling + #include "dt-bindings/input/input.h" + i2c { + #address-cells = <1>; + #size-cells = <0>; + + mpr121@5a { + compatible = "fsl,mpr121-touchkey"; + reg = <0x5a>; + poll-interval = <20>; + autorepeat; + vdd-supply = <&ldo4_reg>; + linux,keycodes = , , , , + , , , , + , , , ; + }; + }; -- cgit