Skip to content

Commit 187acd8

Browse files
mriparddtor
authored andcommitted
dt-bindings: input: Convert Pixcir Touchscreen binding to a schema
The Pixcir 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 0464777 commit 187acd8

File tree

2 files changed

+68
-31
lines changed

2 files changed

+68
-31
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/input/touchscreen/pixcir,pixcir_ts.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Pixcir 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+
enum:
18+
- pixcir,pixcir_ts
19+
- pixcir,pixcir_tangoc
20+
21+
reg:
22+
maxItems: 1
23+
24+
interrupts:
25+
maxItems: 1
26+
27+
attb-gpio:
28+
maxItems: 1
29+
30+
reset-gpios:
31+
maxItems: 1
32+
33+
enable-gpios:
34+
maxItems: 1
35+
36+
wake-gpios:
37+
maxItems: 1
38+
39+
unevaluatedProperties: false
40+
41+
required:
42+
- compatible
43+
- reg
44+
- interrupts
45+
- attb-gpio
46+
- touchscreen-size-x
47+
- touchscreen-size-y
48+
49+
examples:
50+
- |
51+
#include <dt-bindings/gpio/gpio.h>
52+
#include <dt-bindings/interrupt-controller/arm-gic.h>
53+
54+
i2c {
55+
#address-cells = <1>;
56+
#size-cells = <0>;
57+
58+
touchscreen@5c {
59+
compatible = "pixcir,pixcir_ts";
60+
reg = <0x5c>;
61+
interrupts = <2 0>;
62+
attb-gpio = <&gpf 2 0 2>;
63+
touchscreen-size-x = <800>;
64+
touchscreen-size-y = <600>;
65+
};
66+
};
67+
68+
...

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

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

0 commit comments

Comments
 (0)