Skip to content

Commit 7e52794

Browse files
passgatdtor
authored andcommitted
dt-bindings: touchscreen: convert bu21013 bindings to json schema
Convert Rohm BU21013 I2C touchscreen controller device tree binding to json-schema. Additional changes: - Replace <supply_name>-supply with avdd-supply to match example and existing DTS. - Add reset-gpios in the example because it is required. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20250918153630.2535208-1-dario.binacchi@amarulasolutions.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 6e4a515 commit 7e52794

2 files changed

Lines changed: 95 additions & 43 deletions

File tree

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

Lines changed: 0 additions & 43 deletions
This file was deleted.
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/input/touchscreen/rohm,bu21013.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Rohm BU21013 touchscreen
8+
9+
description:
10+
Rohm BU21013 I2C driven touchscreen controller.
11+
12+
maintainers:
13+
- Dario Binacchi <dario.binacchi@amarulasolutions.com>
14+
15+
allOf:
16+
- $ref: touchscreen.yaml#
17+
18+
properties:
19+
compatible:
20+
enum:
21+
- rohm,bu21013_tp
22+
23+
reg:
24+
maxItems: 1
25+
26+
interrupts:
27+
maxItems: 1
28+
29+
reset-gpios:
30+
maxItems: 1
31+
32+
touch-gpios:
33+
maxItems: 1
34+
description: GPIO registering a touch event.
35+
36+
avdd-supply:
37+
description: Analogic power supply
38+
39+
rohm,touch-max-x:
40+
deprecated: true
41+
description: Maximum value on the X axis.
42+
$ref: /schemas/types.yaml#/definitions/uint32
43+
44+
rohm,touch-max-y:
45+
deprecated: true
46+
description: Maximum value on the Y axis.
47+
$ref: /schemas/types.yaml#/definitions/uint32
48+
49+
rohm,flip-x:
50+
deprecated: true
51+
description: Flip touch coordinates on the X axis
52+
type: boolean
53+
54+
rohm,flip-y:
55+
deprecated: true
56+
description: Flip touch coordinates on the Y axis
57+
type: boolean
58+
59+
touchscreen-inverted-x: true
60+
touchscreen-inverted-y: true
61+
touchscreen-size-x: true
62+
touchscreen-size-y: true
63+
touchscreen-swapped-x-y: true
64+
65+
additionalProperties: false
66+
67+
required:
68+
- compatible
69+
- reg
70+
- reset-gpios
71+
- interrupts
72+
73+
examples:
74+
- |
75+
#include <dt-bindings/gpio/gpio.h>
76+
#include <dt-bindings/interrupt-controller/irq.h>
77+
i2c {
78+
#address-cells = <1>;
79+
#size-cells = <0>;
80+
81+
touchscreen@5c {
82+
compatible = "rohm,bu21013_tp";
83+
reg = <0x5c>;
84+
85+
interrupt-parent = <&gpio2>;
86+
interrupts = <0x20 IRQ_TYPE_LEVEL_LOW>;
87+
reset-gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
88+
touch-gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
89+
avdd-supply = <&ab8500_ldo_aux1_reg>;
90+
91+
touchscreen-size-x = <384>;
92+
touchscreen-size-y = <704>;
93+
touchscreen-inverted-y;
94+
};
95+
};

0 commit comments

Comments
 (0)