Skip to content

Commit 0464777

Browse files
mriparddtor
authored andcommitted
dt-bindings: input: Convert ChipOne ICN8318 binding to a schema
The ChipOne ICN8318 Touchscreen Controller is supported by Linux thanks to its device tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema. Signed-off-by: Maxime Ripard <[email protected]> Reviewed-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 5af9f79 commit 0464777

File tree

2 files changed

+62
-44
lines changed

2 files changed

+62
-44
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/input/touchscreen/chipone,icn8318.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: ChipOne ICN8318 Touchscreen Controller Device Tree Bindings
8+
9+
maintainers:
10+
- Dmitry Torokhov <[email protected]>
11+
12+
allOf:
13+
- $ref: touchscreen.yaml#
14+
15+
properties:
16+
compatible:
17+
const: chipone,icn8318
18+
19+
reg:
20+
maxItems: 1
21+
22+
interrupts:
23+
maxItems: 1
24+
25+
wake-gpios:
26+
maxItems: 1
27+
28+
unevaluatedProperties: false
29+
30+
required:
31+
- compatible
32+
- reg
33+
- interrupts
34+
- wake-gpios
35+
- touchscreen-size-x
36+
- touchscreen-size-y
37+
38+
examples:
39+
- |
40+
#include <dt-bindings/gpio/gpio.h>
41+
#include <dt-bindings/interrupt-controller/arm-gic.h>
42+
43+
i2c {
44+
#address-cells = <1>;
45+
#size-cells = <0>;
46+
47+
touchscreen@40 {
48+
compatible = "chipone,icn8318";
49+
reg = <0x40>;
50+
interrupt-parent = <&pio>;
51+
interrupts = <9 IRQ_TYPE_EDGE_FALLING>; /* EINT9 (PG9) */
52+
pinctrl-names = "default";
53+
pinctrl-0 = <&ts_wake_pin_p66>;
54+
wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
55+
touchscreen-size-x = <800>;
56+
touchscreen-size-y = <480>;
57+
touchscreen-inverted-x;
58+
touchscreen-swapped-x-y;
59+
};
60+
};
61+
62+
...

Documentation/devicetree/bindings/input/touchscreen/chipone_icn8318.txt

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)