Re: [PATCH v2 2/3] dt-bindings: input: touchscreen: add Nsiway NS2009

From: Krzysztof Kozlowski

Date: Mon Oct 12 2026 - 05:11:04 EST


On Sun, Oct 11, 2026 at 05:42:29AM +0000, Miotsuki Mizuno wrote:
> Describe the Nsiway NS2009 four-wire resistive touchscreen controller,
> including its optional active-low pen interrupt, power and external
> reference supplies, and touch resistance measurement capabilities.
>
> Allow the common X-plate resistance and pressure properties. Include
> both an interrupt/supply example and a minimal example for a board with
> an unconnected pen interrupt.
>
> Suggested-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>

Hm? How Dmitry could suggest you to write bindings for your device?

> Signed-off-by: Mizuno Miotsuki <founder@xxxxxxxxxxx>

Same problem as v1.

> ---
> .../input/touchscreen/nsiway,ns2009.yaml | 104 ++++++++++++++++++
> MAINTAINERS | 6 +
> 2 files changed, 110 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/input/touchscreen/nsiway,ns2009.yaml
>
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/nsiway,ns2009.yaml b/Documentation/devicetree/bindings/input/touchscreen/nsiway,ns2009.yaml
> new file mode 100644
> index 000000000000..43523f40dcb8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/touchscreen/nsiway,ns2009.yaml
> @@ -0,0 +1,104 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/input/touchscreen/nsiway,ns2009.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Nsiway NS2009 resistive touchscreen controller
> +
> +maintainers:
> + - Mizuno Miotsuki <founder@xxxxxxxxxxx>
> +
> +description: |

Do not need '|' unless you need to preserve formatting.

> + The NS2009 is a four-wire resistive touchscreen controller connected over
> + I2C, with a 12-bit ADC, an active-low pen interrupt output, and support
> + for an external ADC reference voltage. Touch resistance can be calculated
> + from the X coordinate, Z1 and Z2 measurements, and the X-plate resistance.
> + Coordinates are 12-bit ADC readings, not display pixel coordinates.
> +
> +allOf:
> + - $ref: touchscreen.yaml#
> +
> +properties:
> + compatible:
> + const: nsiway,ns2009
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> + description:
> + Active-low pen interrupt output. Optional when the signal is not
> + connected.
> +
> + wakeup-source: true
> +
> + vdd-supply:
> + description: Main power supply.
> +
> + vref-supply:
> + description: External ADC reference voltage supply.
> +
> + touchscreen-x-plate-ohms: true
> + touchscreen-max-pressure: true
> + touchscreen-fuzz-pressure: true
> +
> + touchscreen-min-pressure:
> + minimum: 1
> + maximum: 4095
> + default: 80
> + description:
> + Minimum raw Z1 reading considered a touch. This is a contact detection
> + threshold, not a calibrated pressure value. Boards may require a higher
> + empirically determined threshold than the historical driver default.
> +
> + touchscreen-min-x: true
> + touchscreen-min-y: true
> + touchscreen-size-x: true
> + touchscreen-size-y: true
> + touchscreen-fuzz-x: true
> + touchscreen-fuzz-y: true
> + touchscreen-inverted-x: true
> + touchscreen-inverted-y: true
> + touchscreen-swapped-x-y: true
> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false

Just make it unevaluatedProperties: false and drop all "true"
properties.

> +
> +examples:
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + touchscreen@48 {
> + compatible = "nsiway,ns2009";
> + reg = <0x48>;
> + touchscreen-min-pressure = <150>;
> + touchscreen-inverted-y;
> + };
> + };
> + - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + touchscreen@48 {
> + compatible = "nsiway,ns2009";
> + reg = <0x48>;
> + interrupt-parent = <&gpio1>;
> + interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
> + wakeup-source;
> + vdd-supply = <&vdd>;
> + vref-supply = <&vref>;
> + touchscreen-x-plate-ohms = <400>;
> + touchscreen-max-pressure = <4095>;
> + touchscreen-fuzz-pressure = <16>;
> + };
> + };

One complete example.

Best regards,
Krzysztof