2021-05-21 09:42:24

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v5 0/8] add z1 and z2 channels support for resistive-adc-touch driver

changes v5:
- fix validate for other DT examples.
- add Reviewed-by: Rob Herring <[email protected]> to some of the patches

changes v4:
- resistive-adc-touch: remove unused variable

changes v3:
- yaml: fix validation for channel names
- yaml: add nodename validation

changes v2:
- add yaml conversion patch to this series
- reword commit message for the last patch
- fix possible overflow on the buffer dispatcher

Oleksij Rempel (8):
dt-bindings: input: touchscreen: iqs626a: chnage node name to pass
validation
dt-bindings: input: touchscreen: edt-ft5x06: chnage node name to pass
validation
dt-bindings: input: touchscreen: goodix: chnage node name to pass
validation
dt-bindings: touchscreen: validate nodename
dt-bindings: touchscreen: Convert resistive-adc-touch binding to json
schema
dt-bindings: touchscreen: add touchscreen-x/y-plate-ohms property
dt-bindings: touchscreen: resistive-adc-touch: add support for z1 and
z2 channels
Input: resistive-adc-touch: add support for z1 and z2 channels

.../devicetree/bindings/input/iqs626a.yaml | 2 +-
.../input/touchscreen/edt-ft5x06.yaml | 2 +-
.../bindings/input/touchscreen/goodix.yaml | 2 +-
.../input/touchscreen/resistive-adc-touch.txt | 33 ----
.../touchscreen/resistive-adc-touch.yaml | 86 +++++++++++
.../input/touchscreen/touchscreen.yaml | 9 ++
.../input/touchscreen/resistive-adc-touch.c | 142 ++++++++++++++++--
7 files changed, 226 insertions(+), 50 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.txt
create mode 100644 Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.yaml

--
2.29.2


2021-05-21 09:42:34

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v5 8/8] Input: resistive-adc-touch: add support for z1 and z2 channels

This patch adds support for the z1 and z2 channels. These are used to
calculate the applied pressure. As there is no common order of the
individual channels of a resistive touch ADC, support for
io-channel-names is added (although the DT bindings stated the
driver already supports these).

Signed-off-by: Oleksij Rempel <[email protected]>
---
.../input/touchscreen/resistive-adc-touch.c | 142 ++++++++++++++++--
1 file changed, 128 insertions(+), 14 deletions(-)

diff --git a/drivers/input/touchscreen/resistive-adc-touch.c b/drivers/input/touchscreen/resistive-adc-touch.c
index e50af30183f4..fa90005b7bc9 100644
--- a/drivers/input/touchscreen/resistive-adc-touch.c
+++ b/drivers/input/touchscreen/resistive-adc-touch.c
@@ -20,7 +20,18 @@

#define DRIVER_NAME "resistive-adc-touch"
#define GRTS_DEFAULT_PRESSURE_MIN 50000
+#define GRTS_DEFAULT_PRESSURE_MAX 65535
#define GRTS_MAX_POS_MASK GENMASK(11, 0)
+#define GRTS_MAX_CHANNELS 4
+
+enum grts_ch_type {
+ GRTS_CH_NONE = 0,
+ GRTS_CH_X,
+ GRTS_CH_Y,
+ GRTS_CH_PRESSURE,
+ GRTS_CH_Z1,
+ GRTS_CH_Z2,
+};

/**
* struct grts_state - generic resistive touch screen information struct
@@ -33,24 +44,61 @@
*/
struct grts_state {
u32 pressure_min;
+ u32 x_plate_ohms;
bool pressure;
struct iio_channel *iio_chans;
struct iio_cb_buffer *iio_cb;
struct input_dev *input;
struct touchscreen_properties prop;
+ u8 ch[GRTS_MAX_CHANNELS];
};

static int grts_cb(const void *data, void *private)
{
const u16 *touch_info = data;
struct grts_state *st = private;
- unsigned int x, y, press = 0x0;
+ unsigned int x, y, press = 0, z1 = 0, z2;
+ unsigned int Rt, i;
+
+ for (i = 0; i < ARRAY_SIZE(st->ch) && st->ch[i] != GRTS_CH_NONE; i++) {
+ switch (st->ch[i]) {
+ case GRTS_CH_X:
+ x = touch_info[i];
+ break;
+ case GRTS_CH_Y:
+ y = touch_info[i];
+ break;
+ case GRTS_CH_PRESSURE:
+ press = touch_info[i];
+ break;
+ case GRTS_CH_Z1:
+ z1 = touch_info[i];
+ break;
+ case GRTS_CH_Z2:
+ z2 = touch_info[i];
+ break;
+ case GRTS_CH_NONE:
+ break;
+ }
+ }

- /* channel data coming in buffer in the order below */
- x = touch_info[0];
- y = touch_info[1];
- if (st->pressure)
- press = touch_info[2];
+ if (z1) {
+ Rt = z2;
+ Rt -= z1;
+ Rt *= st->x_plate_ohms;
+ Rt = DIV_ROUND_CLOSEST(Rt, 16);
+ Rt *= x;
+ Rt /= z1;
+ Rt = DIV_ROUND_CLOSEST(Rt, 256);
+ /*
+ * On increased pressure the resistance (Rt) is decreasing
+ * so, convert values to make it looks as real pressure.
+ */
+ if (Rt < GRTS_DEFAULT_PRESSURE_MAX)
+ press = GRTS_DEFAULT_PRESSURE_MAX - Rt;
+ else
+ press = 0;
+ }

if ((!x && !y) || (st->pressure && (press < st->pressure_min))) {
/* report end of touch */
@@ -94,12 +142,77 @@ static void grts_disable(void *data)
iio_channel_release_all_cb(data);
}

+static int grts_get_properties(struct grts_state *st, struct device *dev)
+{
+ int idx, error;
+
+ idx = device_property_match_string(dev, "io-channel-names", "x");
+ if (idx < 0)
+ return idx;
+
+ if (idx >= ARRAY_SIZE(st->ch))
+ return -EOVERFLOW;
+
+ st->ch[idx] = GRTS_CH_X;
+
+ idx = device_property_match_string(dev, "io-channel-names", "y");
+ if (idx < 0)
+ return idx;
+
+ if (idx >= ARRAY_SIZE(st->ch))
+ return -EOVERFLOW;
+
+ st->ch[idx] = GRTS_CH_Y;
+
+ /* pressure is optional */
+ idx = device_property_match_string(dev, "io-channel-names", "pressure");
+ if (idx >= 0) {
+ if (idx >= ARRAY_SIZE(st->ch))
+ return -EOVERFLOW;
+
+ st->ch[idx] = GRTS_CH_PRESSURE;
+ st->pressure = true;
+
+ return 0;
+ }
+
+ /* if no pressure is defined, try optional z1 + z2 */
+ idx = device_property_match_string(dev, "io-channel-names", "z1");
+ if (idx < 0)
+ return 0;
+
+ if (idx >= ARRAY_SIZE(st->ch))
+ return -EOVERFLOW;
+
+ st->ch[idx] = GRTS_CH_Z1;
+
+ /* if z1 is provided z2 is not optional */
+ idx = device_property_match_string(dev, "io-channel-names", "z2");
+ if (idx < 0)
+ return idx;
+
+ if (idx >= ARRAY_SIZE(st->ch))
+ return -EOVERFLOW;
+
+ st->ch[idx] = GRTS_CH_Z2;
+ st->pressure = true;
+
+ error = device_property_read_u32(dev,
+ "touchscreen-x-plate-ohms",
+ &st->x_plate_ohms);
+ if (error) {
+ dev_err(dev, "can't get touchscreen-x-plate-ohms property\n");
+ return error;
+ }
+
+ return 0;
+}
+
static int grts_probe(struct platform_device *pdev)
{
struct grts_state *st;
struct input_dev *input;
struct device *dev = &pdev->dev;
- struct iio_channel *chan;
int error;

st = devm_kzalloc(dev, sizeof(struct grts_state), GFP_KERNEL);
@@ -115,12 +228,13 @@ static int grts_probe(struct platform_device *pdev)
return error;
}

- chan = &st->iio_chans[0];
- st->pressure = false;
- while (chan && chan->indio_dev) {
- if (!strcmp(chan->channel->datasheet_name, "pressure"))
- st->pressure = true;
- chan++;
+ if (!device_property_present(dev, "io-channel-names"))
+ return -ENODEV;
+
+ error = grts_get_properties(st, dev);
+ if (error) {
+ dev_err(dev, "Failed to parse properties\n");
+ return error;
}

if (st->pressure) {
@@ -148,7 +262,7 @@ static int grts_probe(struct platform_device *pdev)
input_set_abs_params(input, ABS_Y, 0, GRTS_MAX_POS_MASK - 1, 0, 0);
if (st->pressure)
input_set_abs_params(input, ABS_PRESSURE, st->pressure_min,
- 0xffff, 0, 0);
+ GRTS_DEFAULT_PRESSURE_MAX, 0, 0);

input_set_capability(input, EV_KEY, BTN_TOUCH);

--
2.29.2

2021-05-21 09:42:35

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v5 6/8] dt-bindings: touchscreen: add touchscreen-x/y-plate-ohms property

Te calculate the pressure on a restrictive touchscreen we need need to
know resistance at least of X plate. Some calculations need to use both
X and Y values.
So, add generic properties which can be used by all drivers

Signed-off-by: Oleksij Rempel <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
---
.../devicetree/bindings/input/touchscreen/touchscreen.yaml | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml
index 057e1063759c..2d7b039ce47f 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml
@@ -77,6 +77,12 @@ properties:
touchscreen-y-mm:
description: vertical length in mm of the touchscreen

+ touchscreen-x-plate-ohms:
+ description: Resistance of the X-plate in Ohms
+
+ touchscreen-y-plate-ohms:
+ description: Resistance of the Y-plate in Ohms
+
dependencies:
touchscreen-size-x: [ touchscreen-size-y ]
touchscreen-size-y: [ touchscreen-size-x ]
--
2.29.2

2021-05-21 18:03:37

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v5 3/8] dt-bindings: input: touchscreen: goodix: chnage node name to pass validation

Change node name from gt928 -> touchscreen to pass dt_binding_check.

Signed-off-by: Oleksij Rempel <[email protected]>
---
Documentation/devicetree/bindings/input/touchscreen/goodix.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml b/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml
index 93f2ce3130ae..7503e6f0b8a0 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.yaml
@@ -67,7 +67,7 @@ examples:
i2c {
#address-cells = <1>;
#size-cells = <0>;
- gt928@5d {
+ touchscreen@5d {
compatible = "goodix,gt928";
reg = <0x5d>;
interrupt-parent = <&gpio>;
--
2.29.2

2021-05-21 20:06:55

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v5 4/8] dt-bindings: touchscreen: validate nodename

Validate touchscreen nodes. Make sure it is named touchscreen*.

Signed-off-by: Oleksij Rempel <[email protected]>
---
.../devicetree/bindings/input/touchscreen/touchscreen.yaml | 3 +++
1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml
index 046ace461cc9..057e1063759c 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml
@@ -10,6 +10,9 @@ maintainers:
- Dmitry Torokhov <[email protected]>

properties:
+ $nodename:
+ pattern: "^touchscreen(@.*)?$"
+
touchscreen-min-x:
description: minimum x coordinate reported
$ref: /schemas/types.yaml#/definitions/uint32
--
2.29.2

2021-05-21 20:06:57

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v5 7/8] dt-bindings: touchscreen: resistive-adc-touch: add support for z1 and z2 channels

For pressure calculation based on plates resistance we need some additional
properties:
- z1 and z2 channels with additional measurements between plates
- actual resistance of the touchscreen. Currently we use only
X-resistance.

Signed-off-by: Oleksij Rempel <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
---
.../input/touchscreen/resistive-adc-touch.yaml | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.yaml b/Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.yaml
index 38b4cbee9429..7fc22a403d48 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.yaml
@@ -27,6 +27,8 @@ properties:
- description: x
- description: y
- description: pressure (optional)
+ - description: z1 (optional)
+ - description: z2 (optional)

io-channel-names:
oneOf:
@@ -37,6 +39,11 @@ properties:
- enum: [x, y, pressure]
- enum: [x, y, pressure]
- enum: [x, y, pressure]
+ - items:
+ - enum: [x, y, z1, z2]
+ - enum: [x, y, z1, z2]
+ - enum: [x, y, z1, z2]
+ - enum: [x, y, z1, z2]

touchscreen-size-x: true
touchscreen-size-y: true
@@ -46,6 +53,7 @@ properties:
touchscreen-inverted-y: true
touchscreen-swapped-x-y: true
touchscreen-min-pressure: true
+ touchscreen-x-plate-ohms: true

additionalProperties: false

@@ -68,3 +76,11 @@ examples:
io-channels = <&adc 24>, <&adc 25>, <&adc 26>;
io-channel-names = "y", "pressure", "x";
};
+ - |
+ touchscreen {
+ compatible = "resistive-adc-touch";
+ touchscreen-min-pressure = <50000>;
+ io-channels = <&adc 1>, <&adc 2>, <&adc 3>, <&adc 4>;
+ io-channel-names = "x", "z1", "z2", "y";
+ touchscreen-x-plate-ohms = <800>;
+ };
--
2.29.2

2021-05-21 20:22:22

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH v5 4/8] dt-bindings: touchscreen: validate nodename

On Fri, 21 May 2021 06:45:21 +0200
Oleksij Rempel <[email protected]> wrote:

> Validate touchscreen nodes. Make sure it is named touchscreen*.
>
> Signed-off-by: Oleksij Rempel <[email protected]>

Feels like this should be two separate patch sets...
The node name one, and then the stuff for the resistive touch screen.

> ---
> .../devicetree/bindings/input/touchscreen/touchscreen.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml
> index 046ace461cc9..057e1063759c 100644
> --- a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml
> +++ b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml
> @@ -10,6 +10,9 @@ maintainers:
> - Dmitry Torokhov <[email protected]>
>
> properties:
> + $nodename:
> + pattern: "^touchscreen(@.*)?$"
> +
> touchscreen-min-x:
> description: minimum x coordinate reported
> $ref: /schemas/types.yaml#/definitions/uint32

2021-05-21 20:22:57

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH v5 8/8] Input: resistive-adc-touch: add support for z1 and z2 channels

On Fri, 21 May 2021 06:45:25 +0200
Oleksij Rempel <[email protected]> wrote:

> This patch adds support for the z1 and z2 channels. These are used to
> calculate the applied pressure. As there is no common order of the
> individual channels of a resistive touch ADC, support for
> io-channel-names is added (although the DT bindings stated the
> driver already supports these).
>
> Signed-off-by: Oleksij Rempel <[email protected]>

One minor comment inline, but otherwise looks good to me.
Reviewed-by: Jonathan Cameron <[email protected]>

Would be nice at some point to make this handle channels that
aren't 16 bits, but that can be a job for another day.

Jonathan

> ---
> .../input/touchscreen/resistive-adc-touch.c | 142 ++++++++++++++++--
> 1 file changed, 128 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/input/touchscreen/resistive-adc-touch.c b/drivers/input/touchscreen/resistive-adc-touch.c
> index e50af30183f4..fa90005b7bc9 100644
> --- a/drivers/input/touchscreen/resistive-adc-touch.c
> +++ b/drivers/input/touchscreen/resistive-adc-touch.c
> @@ -20,7 +20,18 @@
>
> #define DRIVER_NAME "resistive-adc-touch"
> #define GRTS_DEFAULT_PRESSURE_MIN 50000
> +#define GRTS_DEFAULT_PRESSURE_MAX 65535
> #define GRTS_MAX_POS_MASK GENMASK(11, 0)
> +#define GRTS_MAX_CHANNELS 4
> +
> +enum grts_ch_type {
> + GRTS_CH_NONE = 0,
> + GRTS_CH_X,
> + GRTS_CH_Y,
> + GRTS_CH_PRESSURE,
> + GRTS_CH_Z1,
> + GRTS_CH_Z2,
> +};
>
> /**
> * struct grts_state - generic resistive touch screen information struct
> @@ -33,24 +44,61 @@
> */
> struct grts_state {
> u32 pressure_min;
> + u32 x_plate_ohms;
> bool pressure;
> struct iio_channel *iio_chans;
> struct iio_cb_buffer *iio_cb;
> struct input_dev *input;
> struct touchscreen_properties prop;
> + u8 ch[GRTS_MAX_CHANNELS];
> };
>
> static int grts_cb(const void *data, void *private)
> {
> const u16 *touch_info = data;
> struct grts_state *st = private;
> - unsigned int x, y, press = 0x0;
> + unsigned int x, y, press = 0, z1 = 0, z2;
> + unsigned int Rt, i;
> +
> + for (i = 0; i < ARRAY_SIZE(st->ch) && st->ch[i] != GRTS_CH_NONE; i++) {
> + switch (st->ch[i]) {
> + case GRTS_CH_X:
> + x = touch_info[i];
> + break;
> + case GRTS_CH_Y:
> + y = touch_info[i];
> + break;
> + case GRTS_CH_PRESSURE:
> + press = touch_info[i];
> + break;
> + case GRTS_CH_Z1:
> + z1 = touch_info[i];
> + break;
> + case GRTS_CH_Z2:
> + z2 = touch_info[i];
> + break;
> + case GRTS_CH_NONE:

Loop condition above prevents this. I guess you might get a warning though
so if this is just warning suppression then add a comment to say so to
make sure it isn't removed.

> + break;
> + }
> + }
>
> - /* channel data coming in buffer in the order below */
> - x = touch_info[0];
> - y = touch_info[1];
> - if (st->pressure)
> - press = touch_info[2];
> + if (z1) {
> + Rt = z2;
> + Rt -= z1;
> + Rt *= st->x_plate_ohms;
> + Rt = DIV_ROUND_CLOSEST(Rt, 16);
> + Rt *= x;
> + Rt /= z1;
> + Rt = DIV_ROUND_CLOSEST(Rt, 256);
> + /*
> + * On increased pressure the resistance (Rt) is decreasing
> + * so, convert values to make it looks as real pressure.
> + */
> + if (Rt < GRTS_DEFAULT_PRESSURE_MAX)
> + press = GRTS_DEFAULT_PRESSURE_MAX - Rt;
> + else
> + press = 0;
> + }
>
> if ((!x && !y) || (st->pressure && (press < st->pressure_min))) {
> /* report end of touch */
> @@ -94,12 +142,77 @@ static void grts_disable(void *data)
> iio_channel_release_all_cb(data);
> }
>
> +static int grts_get_properties(struct grts_state *st, struct device *dev)
> +{
> + int idx, error;
> +
> + idx = device_property_match_string(dev, "io-channel-names", "x");
> + if (idx < 0)
> + return idx;
> +
> + if (idx >= ARRAY_SIZE(st->ch))
> + return -EOVERFLOW;
> +
> + st->ch[idx] = GRTS_CH_X;
> +
> + idx = device_property_match_string(dev, "io-channel-names", "y");
> + if (idx < 0)
> + return idx;
> +
> + if (idx >= ARRAY_SIZE(st->ch))
> + return -EOVERFLOW;
> +
> + st->ch[idx] = GRTS_CH_Y;
> +
> + /* pressure is optional */
> + idx = device_property_match_string(dev, "io-channel-names", "pressure");
> + if (idx >= 0) {
> + if (idx >= ARRAY_SIZE(st->ch))
> + return -EOVERFLOW;
> +
> + st->ch[idx] = GRTS_CH_PRESSURE;
> + st->pressure = true;
> +
> + return 0;
> + }
> +
> + /* if no pressure is defined, try optional z1 + z2 */
> + idx = device_property_match_string(dev, "io-channel-names", "z1");
> + if (idx < 0)
> + return 0;
> +
> + if (idx >= ARRAY_SIZE(st->ch))
> + return -EOVERFLOW;
> +
> + st->ch[idx] = GRTS_CH_Z1;
> +
> + /* if z1 is provided z2 is not optional */
> + idx = device_property_match_string(dev, "io-channel-names", "z2");
> + if (idx < 0)
> + return idx;
> +
> + if (idx >= ARRAY_SIZE(st->ch))
> + return -EOVERFLOW;
> +
> + st->ch[idx] = GRTS_CH_Z2;
> + st->pressure = true;
> +
> + error = device_property_read_u32(dev,
> + "touchscreen-x-plate-ohms",
> + &st->x_plate_ohms);
> + if (error) {
> + dev_err(dev, "can't get touchscreen-x-plate-ohms property\n");
> + return error;
> + }
> +
> + return 0;
> +}
> +
> static int grts_probe(struct platform_device *pdev)
> {
> struct grts_state *st;
> struct input_dev *input;
> struct device *dev = &pdev->dev;
> - struct iio_channel *chan;
> int error;
>
> st = devm_kzalloc(dev, sizeof(struct grts_state), GFP_KERNEL);
> @@ -115,12 +228,13 @@ static int grts_probe(struct platform_device *pdev)
> return error;
> }
>
> - chan = &st->iio_chans[0];
> - st->pressure = false;
> - while (chan && chan->indio_dev) {
> - if (!strcmp(chan->channel->datasheet_name, "pressure"))
> - st->pressure = true;
> - chan++;
> + if (!device_property_present(dev, "io-channel-names"))
> + return -ENODEV;
> +
> + error = grts_get_properties(st, dev);
> + if (error) {
> + dev_err(dev, "Failed to parse properties\n");
> + return error;
> }
>
> if (st->pressure) {
> @@ -148,7 +262,7 @@ static int grts_probe(struct platform_device *pdev)
> input_set_abs_params(input, ABS_Y, 0, GRTS_MAX_POS_MASK - 1, 0, 0);
> if (st->pressure)
> input_set_abs_params(input, ABS_PRESSURE, st->pressure_min,
> - 0xffff, 0, 0);
> + GRTS_DEFAULT_PRESSURE_MAX, 0, 0);
>
> input_set_capability(input, EV_KEY, BTN_TOUCH);
>

2021-05-21 20:23:30

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v5 3/8] dt-bindings: input: touchscreen: goodix: chnage node name to pass validation

On Fri, May 21, 2021 at 06:45:20AM +0200, Oleksij Rempel wrote:
> Change node name from gt928 -> touchscreen to pass dt_binding_check.

Well, at least you were consistent on the subject. :)

>
> Signed-off-by: Oleksij Rempel <[email protected]>
> ---
> Documentation/devicetree/bindings/input/touchscreen/goodix.yaml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Rob Herring <[email protected]>

2021-05-21 20:23:37

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v5 4/8] dt-bindings: touchscreen: validate nodename

On Fri, 21 May 2021 06:45:21 +0200, Oleksij Rempel wrote:
> Validate touchscreen nodes. Make sure it is named touchscreen*.
>
> Signed-off-by: Oleksij Rempel <[email protected]>
> ---
> .../devicetree/bindings/input/touchscreen/touchscreen.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>

Acked-by: Rob Herring <[email protected]>

2021-05-25 04:04:06

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH v5 4/8] dt-bindings: touchscreen: validate nodename

On Fri, May 21, 2021 at 12:18:23PM -0500, Rob Herring wrote:
> On Fri, 21 May 2021 06:45:21 +0200, Oleksij Rempel wrote:
> > Validate touchscreen nodes. Make sure it is named touchscreen*.
> >
> > Signed-off-by: Oleksij Rempel <[email protected]>
> > ---
> > .../devicetree/bindings/input/touchscreen/touchscreen.yaml | 3 +++
> > 1 file changed, 3 insertions(+)
> >
>
> Acked-by: Rob Herring <[email protected]>

These bindings are used for devices other than touchscreens (touchpads
and other touch controllers that are not touchscreens), so forcing them
to be named "touchscreen*" is wrong. In fact, I'd like to allow using
"touch-*" property names as aliases for "touchscreen-*" properties.

Thanks.

--
Dmitry