Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: input: microchip,cap11xx: Convert txt bindings to yaml

Convert binding for the Microchip CAP11xx series HW to the YAML syntax.

Signed-off-by: David Heidelberg <david@ixit.cz>
Link: https://lore.kernel.org/r/20211019234816.32060-1-david@ixit.cz
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

David Heidelberg and committed by
Rob Herring
a8bc0707 14d9f6b0

+148 -78
-78
Documentation/devicetree/bindings/input/cap11xx.txt
··· 1 - Device tree bindings for Microchip CAP11xx based capacitive touch sensors 2 - 3 - The node for this device must be a child of a I2C controller node, as the 4 - device communication via I2C only. 5 - 6 - Required properties: 7 - 8 - compatible: Must contain one of: 9 - "microchip,cap1106" 10 - "microchip,cap1126" 11 - "microchip,cap1188" 12 - 13 - reg: The I2C slave address of the device. 14 - 15 - interrupts: Property describing the interrupt line the 16 - device's ALERT#/CM_IRQ# pin is connected to. 17 - The device only has one interrupt source. 18 - 19 - Optional properties: 20 - 21 - autorepeat: Enables the Linux input system's autorepeat 22 - feature on the input device. 23 - 24 - microchip,sensor-gain: Defines the gain of the sensor circuitry. This 25 - effectively controls the sensitivity, as a 26 - smaller delta capacitance is required to 27 - generate the same delta count values. 28 - Valid values are 1, 2, 4, and 8. 29 - By default, a gain of 1 is set. 30 - 31 - microchip,irq-active-high: By default the interrupt pin is active low 32 - open drain. This property allows using the active 33 - high push-pull output. 34 - 35 - linux,keycodes: Specifies an array of numeric keycode values to 36 - be used for the channels. If this property is 37 - omitted, KEY_A, KEY_B, etc are used as 38 - defaults. The array must have exactly six 39 - entries. 40 - 41 - Example: 42 - 43 - i2c_controller { 44 - cap1106@28 { 45 - compatible = "microchip,cap1106"; 46 - interrupt-parent = <&gpio1>; 47 - interrupts = <0 0>; 48 - reg = <0x28>; 49 - autorepeat; 50 - microchip,sensor-gain = <2>; 51 - 52 - linux,keycodes = <103>, /* KEY_UP */ 53 - <106>, /* KEY_RIGHT */ 54 - <108>, /* KEY_DOWN */ 55 - <105>, /* KEY_LEFT */ 56 - <109>, /* KEY_PAGEDOWN */ 57 - <104>; /* KEY_PAGEUP */ 58 - 59 - #address-cells = <1>; 60 - #size-cells = <0>; 61 - 62 - usr@0 { 63 - label = "cap11xx:green:usr0"; 64 - reg = <0>; 65 - }; 66 - 67 - usr@1 { 68 - label = "cap11xx:green:usr1"; 69 - reg = <1>; 70 - }; 71 - 72 - alive@2 { 73 - label = "cap11xx:green:alive"; 74 - reg = <2>; 75 - linux,default_trigger = "heartbeat"; 76 - }; 77 - }; 78 - }
+148
Documentation/devicetree/bindings/input/microchip,cap11xx.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: "http://devicetree.org/schemas/input/microchip,cap11xx.yaml#" 5 + $schema: "http://devicetree.org/meta-schemas/core.yaml#" 6 + 7 + title: Device tree bindings for Microchip CAP11xx based capacitive touch sensors 8 + 9 + description: | 10 + The Microchip CAP1xxx Family of RightTouchTM multiple-channel capacitive 11 + touch controllers and LED drivers. The device communication via I2C only. 12 + 13 + maintainers: 14 + - Rob Herring <robh@kernel.org> 15 + 16 + properties: 17 + compatible: 18 + enum: 19 + - microchip,cap1106 20 + - microchip,cap1126 21 + - microchip,cap1188 22 + 23 + reg: 24 + maxItems: 1 25 + 26 + '#address-cells': 27 + const: 1 28 + 29 + '#size-cells': 30 + const: 0 31 + 32 + interrupts: 33 + maxItems: 1 34 + description: | 35 + Property describing the interrupt line the 36 + device's ALERT#/CM_IRQ# pin is connected to. 37 + The device only has one interrupt source. 38 + 39 + autorepeat: 40 + description: | 41 + Enables the Linux input system's autorepeat feature on the input device. 42 + 43 + linux,keycodes: 44 + minItems: 6 45 + maxItems: 6 46 + description: | 47 + Specifies an array of numeric keycode values to 48 + be used for the channels. If this property is 49 + omitted, KEY_A, KEY_B, etc are used as defaults. 50 + The array must have exactly six entries. 51 + 52 + microchip,sensor-gain: 53 + $ref: /schemas/types.yaml#/definitions/uint32 54 + default: 1 55 + enum: [1, 2, 4, 8] 56 + description: | 57 + Defines the gain of the sensor circuitry. This 58 + effectively controls the sensitivity, as a 59 + smaller delta capacitance is required to 60 + generate the same delta count values. 61 + 62 + microchip,irq-active-high: 63 + type: boolean 64 + description: | 65 + By default the interrupt pin is active low 66 + open drain. This property allows using the active 67 + high push-pull output. 68 + 69 + patternProperties: 70 + "^led@[0-7]$": 71 + type: object 72 + description: CAP11xx LEDs 73 + $ref: /schemas/leds/common.yaml# 74 + 75 + properties: 76 + reg: 77 + enum: [0, 1, 2, 3, 4, 5, 6, 7] 78 + 79 + label: true 80 + 81 + linux,default-trigger: true 82 + 83 + default-state: true 84 + 85 + required: 86 + - reg 87 + 88 + additionalProperties: false 89 + 90 + allOf: 91 + - $ref: input.yaml 92 + - if: 93 + properties: 94 + compatible: 95 + contains: 96 + enum: 97 + - microchip,cap1106 98 + then: 99 + patternProperties: 100 + "^led@[0-7]$": false 101 + 102 + required: 103 + - compatible 104 + - interrupts 105 + 106 + additionalProperties: false 107 + 108 + examples: 109 + - | 110 + i2c { 111 + #address-cells = <1>; 112 + #size-cells = <0>; 113 + 114 + cap1188@28 { 115 + compatible = "microchip,cap1188"; 116 + interrupt-parent = <&gpio1>; 117 + interrupts = <0 0>; 118 + reg = <0x28>; 119 + autorepeat; 120 + microchip,sensor-gain = <2>; 121 + 122 + linux,keycodes = <103>, /* KEY_UP */ 123 + <106>, /* KEY_RIGHT */ 124 + <108>, /* KEY_DOWN */ 125 + <105>, /* KEY_LEFT */ 126 + <109>, /* KEY_PAGEDOWN */ 127 + <104>; /* KEY_PAGEUP */ 128 + 129 + #address-cells = <1>; 130 + #size-cells = <0>; 131 + 132 + led@0 { 133 + label = "cap11xx:green:usr0"; 134 + reg = <0>; 135 + }; 136 + 137 + led@1 { 138 + label = "cap11xx:green:usr1"; 139 + reg = <1>; 140 + }; 141 + 142 + led@2 { 143 + label = "cap11xx:green:alive"; 144 + reg = <2>; 145 + linux,default-trigger = "heartbeat"; 146 + }; 147 + }; 148 + };