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/microchip,cap11xx.yaml#"
0005 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
0006 
0007 title: Device tree bindings for Microchip CAP11xx based capacitive touch sensors
0008 
0009 description: |
0010   The Microchip CAP1xxx Family of RightTouchTM multiple-channel capacitive
0011   touch controllers and LED drivers. The device communication via I2C only.
0012 
0013 maintainers:
0014   - Rob Herring <robh@kernel.org>
0015 
0016 properties:
0017   compatible:
0018     enum:
0019       - microchip,cap1106
0020       - microchip,cap1126
0021       - microchip,cap1188
0022       - microchip,cap1206
0023 
0024   reg:
0025     maxItems: 1
0026 
0027   '#address-cells':
0028     const: 1
0029 
0030   '#size-cells':
0031     const: 0
0032 
0033   interrupts:
0034     maxItems: 1
0035     description: |
0036       Property describing the interrupt line the
0037       device's ALERT#/CM_IRQ# pin is connected to.
0038       The device only has one interrupt source.
0039 
0040   autorepeat:
0041     description: |
0042       Enables the Linux input system's autorepeat feature on the input device.
0043 
0044   linux,keycodes:
0045     minItems: 6
0046     maxItems: 6
0047     description: |
0048       Specifies an array of numeric keycode values to
0049       be used for the channels. If this property is
0050       omitted, KEY_A, KEY_B, etc are used as defaults.
0051       The array must have exactly six entries.
0052 
0053   microchip,sensor-gain:
0054     $ref: /schemas/types.yaml#/definitions/uint32
0055     default: 1
0056     enum: [1, 2, 4, 8]
0057     description: |
0058       Defines the gain of the sensor circuitry. This
0059       effectively controls the sensitivity, as a
0060       smaller delta capacitance is required to
0061       generate the same delta count values.
0062 
0063   microchip,irq-active-high:
0064     type: boolean
0065     description: |
0066       By default the interrupt pin is active low
0067       open drain. This property allows using the active
0068       high push-pull output.
0069 
0070 patternProperties:
0071   "^led@[0-7]$":
0072     type: object
0073     description: CAP11xx LEDs
0074     $ref: /schemas/leds/common.yaml#
0075 
0076     properties:
0077       reg:
0078         enum: [0, 1, 2, 3, 4, 5, 6, 7]
0079 
0080       label: true
0081 
0082       linux,default-trigger: true
0083 
0084       default-state: true
0085 
0086     required:
0087       - reg
0088 
0089     additionalProperties: false
0090 
0091 allOf:
0092   - $ref: input.yaml
0093   - if:
0094       properties:
0095         compatible:
0096           contains:
0097             enum:
0098               - microchip,cap1106
0099     then:
0100       patternProperties:
0101         "^led@[0-7]$": false
0102 
0103 required:
0104   - compatible
0105   - interrupts
0106 
0107 additionalProperties: false
0108 
0109 examples:
0110   - |
0111     i2c {
0112       #address-cells = <1>;
0113       #size-cells = <0>;
0114 
0115       touch@28 {
0116         compatible = "microchip,cap1188";
0117         interrupt-parent = <&gpio1>;
0118         interrupts = <0 0>;
0119         reg = <0x28>;
0120         autorepeat;
0121         microchip,sensor-gain = <2>;
0122 
0123         linux,keycodes = <103>, /* KEY_UP */
0124                          <106>, /* KEY_RIGHT */
0125                          <108>, /* KEY_DOWN */
0126                          <105>, /* KEY_LEFT */
0127                          <109>, /* KEY_PAGEDOWN */
0128                          <104>; /* KEY_PAGEUP */
0129 
0130         #address-cells = <1>;
0131         #size-cells = <0>;
0132 
0133         led@0 {
0134                 label = "cap11xx:green:usr0";
0135                 reg = <0>;
0136         };
0137 
0138         led@1 {
0139                 label = "cap11xx:green:usr1";
0140                 reg = <1>;
0141         };
0142 
0143         led@2 {
0144                 label = "cap11xx:green:alive";
0145                 reg = <2>;
0146                 linux,default-trigger = "heartbeat";
0147         };
0148       };
0149     };