diff mbox series

[2/7] dt-bindings: input: touchscreen: document synaptics TCM oncell

Message ID 20240624-oneplus8-v1-2-388eecf2dff7@postmarketos.org (mailing list archive)
State Superseded
Headers show
Series qcom: initial support for the OnePlus 8T | expand

Commit Message

Caleb Connolly June 24, 2024, 1:30 a.m. UTC
Document the Synaptics TCM oncell series of touchscreens, starting with
the s3908.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
---
 .../input/touchscreen/syna,tcm-oncell.yaml         | 66 ++++++++++++++++++++++
 1 file changed, 66 insertions(+)

Comments

Rob Herring (Arm) June 24, 2024, 2:42 a.m. UTC | #1
On Mon, 24 Jun 2024 03:30:26 +0200, Caleb Connolly wrote:
> Document the Synaptics TCM oncell series of touchscreens, starting with
> the s3908.
> 
> Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
> ---
>  .../input/touchscreen/syna,tcm-oncell.yaml         | 66 ++++++++++++++++++++++
>  1 file changed, 66 insertions(+)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.yaml: $id: Cannot determine base path from $id, relative path/filename doesn't match actual path or filename
 	 $id: http://devicetree.org/schemas/input/touchscreen/syna,s3908.yaml
 	file: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.yaml
Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.example.dts:27.13-26: Warning (reg_format): /example-0/i2c/touchscreen@4b:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.example.dtb: Warning (pci_device_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.example.dtb: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.example.dtb: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.example.dts:21.13-36.11: Warning (i2c_bus_bridge): /example-0/i2c: incorrect #address-cells for I2C bus
Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.example.dts:21.13-36.11: Warning (i2c_bus_bridge): /example-0/i2c: incorrect #size-cells for I2C bus
Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.example.dtb: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.example.dtb: Warning (i2c_bus_reg): Failed prerequisite 'i2c_bus_bridge'
Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.example.dtb: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.example.dts:25.26-35.13: Warning (avoid_default_addr_size): /example-0/i2c/touchscreen@4b: Relying on default #address-cells value
Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.example.dts:25.26-35.13: Warning (avoid_default_addr_size): /example-0/i2c/touchscreen@4b: Relying on default #size-cells value
Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.example.dtb: Warning (unique_unit_address_if_enabled): Failed prerequisite 'avoid_default_addr_size'

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240624-oneplus8-v1-2-388eecf2dff7@postmarketos.org

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
Dmitry Torokhov June 24, 2024, 7:25 a.m. UTC | #2
Hi Caleb,

On Mon, Jun 24, 2024 at 03:30:26AM +0200, Caleb Connolly wrote:
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    i2c {
> +      clock-frequency = <400000>;
> +      status = "okay";
> +
> +      touchscreen@4b {
> +        compatible = "syna,s3908";
> +        reg = <0x4B>;
> +
> +        interrupts-extended = <&tlmm 39 0x2008>;
> +
> +        reset-gpios = <&tlmm 38 GPIO_ACTIVE_HIGH>;

This shows wrong default polarity. It should be GPIO_ACTIVE_LOW.

Thanks.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.yaml b/Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.yaml
new file mode 100644
index 000000000000..1795df584987
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/syna,tcm-oncell.yaml
@@ -0,0 +1,66 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/touchscreen/syna,s3908.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Synaptics TCM Oncell i2c touchscreen
+
+maintainers:
+  - Caleb Connolly <caleb@postmarketos.org>
+
+allOf:
+  - $ref: touchscreen.yaml#
+
+properties:
+  compatible:
+    enum:
+      - syna,s3908
+
+  reg:
+    maxItems: 1
+
+  interrupts-extended:
+    maxItems: 1
+
+  reset-gpios:
+    maxItems: 1
+    description: Reset GPIO the chip is connected to.
+
+  vdd-supply:
+    description: a phandle for the regulator supplying 3V power.
+
+  vcc-supply:
+    description: a phandle for the regulator supplying IO power.
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - interrupts-extended
+  - reset-gpios
+  - vdd-supply
+  - vcc-supply
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c {
+      clock-frequency = <400000>;
+      status = "okay";
+
+      touchscreen@4b {
+        compatible = "syna,s3908";
+        reg = <0x4B>;
+
+        interrupts-extended = <&tlmm 39 0x2008>;
+
+        reset-gpios = <&tlmm 38 GPIO_ACTIVE_HIGH>;
+
+        vdd-supply = <&vreg_l13a_ts_3p0>;
+        vcc-supply = <&vreg_l1c_1p8>;
+      };
+    };