Skip to contentSkip to conversation

dt-bindings: input: atmel,captouch: convert bindings to YAML

PATCH Superseded Dharma Balasubiramani 2 participants 5 messages Feb 7, 2024 – Feb 8, 2024

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: input: atmel,captouch: convert bindings to YAML

Convert the Atmel capacitive touchscreen bindings to YAML format.

---
 .../bindings/input/atmel,captouch.txt         | 36 -----------
 .../bindings/input/atmel,captouch.yaml        | 62 +++++++++++++++++++
 2 files changed, 62 insertions(+), 36 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/input/atmel,captouch.txt
 create mode 100644 Documentation/devicetree/bindings/input/atmel,captouch.yaml
Documentation/devicetree/bindings/input/atmel,captouch.txt deleted +0 -36
deleted file mode 100644
index fe9ee5c53bcc..000000000000
@@ -1,36 +0,0 @@
-Device tree bindings for Atmel capacitive touch device, typically
-an Atmel touch sensor connected to AtmegaXX MCU running firmware
-based on Qtouch library.
-
-The node for this device must be a child of a I2C controller node, as the
-device communicates via I2C.
-
-Required properties:
-
-	compatible:	Must be "atmel,captouch".
-	reg:		The I2C slave address of the device.
-	interrupts:	Property describing the interrupt line the device
-			is connected to. The device only has one interrupt
-			source.
-	linux,keycodes:	Specifies an array of numeric keycode values to
-			be used for reporting button presses. The array can
-			contain up to 8 entries.
-
-Optional properties:
-
-	autorepeat:	Enables the Linux input system's autorepeat
-			feature on the input device.
-
-Example:
-
-	atmel-captouch@51 {
-		compatible = "atmel,captouch";
-		reg = <0x51>;
-		interrupt-parent = <&tlmm>;
-		interrupts = <67 IRQ_TYPE_EDGE_FALLING>;
-		linux,keycodes = <BTN_0>, <BTN_1>,
-			<BTN_2>, <BTN_3>,
-			<BTN_4>, <BTN_5>,
-			<BTN_6>, <BTN_7>;
-		autorepeat;
-	};
Documentation/devicetree/bindings/input/atmel,captouch.yaml new file +62 -0

62 lines not on this page · raw message

Signature · 1 line
2.25.1
#1 lore raw
Quoted 3 lines · Dharma Balasubiramani

Convert the Atmel capacitive touchscreen bindings to YAML format.

Thank you for your patch. There is something to discuss/improve.

Quoted 7 lines
Documentation/devicetree/bindings/input/atmel,captouch.yaml new file +7 -0
+
+properties:
+  compatible:
+    const: atmel,captouch
+
+  reg:
+    maxItems: 1

Documentation/devicetree/bindings/input/atmel,captouch.yaml line 34

Quoted 10 lines
Documentation/devicetree/bindings/input/atmel,captouch.yaml new file +10 -0
+
+  interrupts:
+    maxItems: 1
+
+  linux,keycodes:
+    minItems: 1
+    maxItems: 8
+
+  autorepeat:
+    type: boolean

You can drop entire property, coming from input.yaml.

Documentation/devicetree/bindings/input/atmel,captouch.yaml line 42

Quoted 8 lines
Documentation/devicetree/bindings/input/atmel,captouch.yaml new file +8 -0
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - linux,keycodes
+
+additionalProperties: false

Instead:
unevaluatedProperties: false

Documentation/devicetree/bindings/input/atmel,captouch.yaml line 51

Quoted 9 lines
Documentation/devicetree/bindings/input/atmel,captouch.yaml new file +9 -0
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/input/linux-event-codes.h>
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      atmel-captouch@51 {

Instead:
touchscreen? touchpad? if none of these, then just "touch@51"

Documentation/devicetree/bindings/input/atmel,captouch.yaml line 53

Quoted 2 lines
Documentation/devicetree/bindings/input/atmel,captouch.yaml new file +2 -0
+        compatible = "atmel,captouch";
+        reg = <0x51>;

Best regards,
Krzysztof

#2 lore raw

Hi Krzysztof,

Quoted 20 lines · Krzysztof Kozlowski

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Quoted 3 lines · Dharma Balasubiramani

Convert the Atmel capacitive touchscreen bindings to YAML format.

Thank you for your patch. There is something to discuss/improve.

Quoted 11 lines
Documentation/devicetree/bindings/input/atmel,captouch.yaml new file +11 -0
+
+properties:
+  compatible:
+    const: atmel,captouch
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
Quoted 8 lines

Documentation/devicetree/bindings/input/atmel,captouch.yaml line 34

Quoted 6 lines
Documentation/devicetree/bindings/input/atmel,captouch.yaml new file +6 -0
+  linux,keycodes:
+    minItems: 1
+    maxItems: 8
+
+  autorepeat:
+    type: boolean

You can drop entire property, coming from input.yaml.

Sure, I will drop the 'linux,keycodes' and 'autorepeat' properties.

Quoted 12 lines

Documentation/devicetree/bindings/input/atmel,captouch.yaml line 42

Quoted 9 lines
Documentation/devicetree/bindings/input/atmel,captouch.yaml new file +8 -0
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - linux,keycodes
+
+additionalProperties: false

Instead:
unevaluatedProperties: false

Noted, Thanks.

Quoted 13 lines

Documentation/devicetree/bindings/input/atmel,captouch.yaml line 51

Quoted 10 lines
Documentation/devicetree/bindings/input/atmel,captouch.yaml new file +9 -0
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/input/linux-event-codes.h>
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      atmel-captouch@51 {

Instead:
touchscreen? touchpad? if none of these, then just "touch@51"

I will go with touch@51.

Thanks.

Quoted 8 lines

Documentation/devicetree/bindings/input/atmel,captouch.yaml line 53

Quoted 3 lines
Documentation/devicetree/bindings/input/atmel,captouch.yaml new file +2 -0
+        compatible = "atmel,captouch";
+        reg = <0x51>;

Best regards,
Krzysztof

Signature · 2 lines
With Best Regards,
Dharma B.
#3 lore raw
Quoted 20 lines · On 08/02/2024 04:59, [email protected] wrote:
Quoted 11 lines
Quoted 11 lines
Documentation/devicetree/bindings/input/atmel,captouch.yaml new file +11 -0
+
+properties:
+  compatible:
+    const: atmel,captouch
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
Quoted 8 lines

Documentation/devicetree/bindings/input/atmel,captouch.yaml line 34

Quoted 6 lines
Documentation/devicetree/bindings/input/atmel,captouch.yaml new file +6 -0
+  linux,keycodes:
+    minItems: 1
+    maxItems: 8
+
+  autorepeat:
+    type: boolean

You can drop entire property, coming from input.yaml.

Quoted 1 line

Sure, I will drop the 'linux,keycodes' and 'autorepeat' properties.

Why linux,keycodes? Is the size restricted in any other referenced schema?

Best regards,
Krzysztof

#4 lore raw

Hi Krzysztof,

Quoted 23 lines · Krzysztof Kozlowski

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Quoted 20 lines · On 08/02/2024 04:59, [email protected] wrote:
Quoted 19 lines
Quoted 7 lines
Documentation/devicetree/bindings/input/atmel,captouch.yaml new file +7 -0
+
+properties:
+  compatible:
+    const: atmel,captouch
+
+  reg:
+    maxItems: 1

Documentation/devicetree/bindings/input/atmel,captouch.yaml line 34

Quoted 10 lines
Documentation/devicetree/bindings/input/atmel,captouch.yaml new file +10 -0
+
+  interrupts:
+    maxItems: 1
+
+  linux,keycodes:
+    minItems: 1
+    maxItems: 8
+
+  autorepeat:
+    type: boolean

You can drop entire property, coming from input.yaml.

Quoted 3 lines
Quoted 1 line

Sure, I will drop the 'linux,keycodes' and 'autorepeat' properties.

Why linux,keycodes? Is the size restricted in any other referenced schema?

Sorry, I misinterpreted the statement "entire property(ies) coming from input.yaml".

The linux,keycodes size should be restricted to maxitems 8 here.

I will drop only the optional property "autorepeat".

Thanks.

Quoted 4 lines

Best regards,
Krzysztof

Signature · 2 lines
With Best Regards,
Dharma B.