summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml
diff options
context:
space:
mode:
authorMichal Vokáč <michal.vokac@ysoft.com>2019-10-15 17:17:29 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2019-10-15 17:43:54 -0700
commitee358cb45984f4569098d3a97edfd0067576ad2f (patch)
tree2895abad910e4b8b3386bb59812b8e89dcd88167 /Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml
parentdef10ec7992f037140f3bd9542d1242cfd2027d4 (diff)
Input: mpr121 - add polling mode
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áč <michal.vokac@ysoft.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml')
-rw-r--r--Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml25
1 files changed, 24 insertions, 1 deletions
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:
<KEY_8>, <KEY_9>, <KEY_A>, <KEY_B>;
};
};
+
+ - |
+ // 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 = <KEY_0>, <KEY_1>, <KEY_2>, <KEY_3>,
+ <KEY_4>, <KEY_5>, <KEY_6>, <KEY_7>,
+ <KEY_8>, <KEY_9>, <KEY_A>, <KEY_B>;
+ };
+ };