[PATCH 1/3] doc: add Device Tree binding for AMS TCS3400 light sensor

Petr Hodina via B4 Relay posted 3 patches 3 weeks ago
[PATCH 1/3] doc: add Device Tree binding for AMS TCS3400 light sensor
Posted by Petr Hodina via B4 Relay 3 weeks ago
From: Petr Hodina <petr.hodina@protonmail.com>

Adds a new YAML binding describing the AMS TCS3400 I2C light sensor,
including compatible string, registers, interrupts, power supply, and an
example node.

Signed-off-by: Petr Hodina <petr.hodina@protonmail.com>
---
 .../devicetree/bindings/iio/light/ams,tcs3400.yaml | 54 ++++++++++++++++++++++
 MAINTAINERS                                        |  6 +++
 2 files changed, 60 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/light/ams,tcs3400.yaml b/Documentation/devicetree/bindings/iio/light/ams,tcs3400.yaml
new file mode 100644
index 000000000000..2c5a9295af1a
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/light/ams,tcs3400.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/iio/light/ams,tcs3400.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: AMS TCS3400 Color Light-to-Digital Converter
+
+maintainers:
+  - name: Petr Hodina
+    email: petr.hodina@protonmail.com
+
+description: |
+  The AMS TCS3400 is an I2C-connected color light sensor providing
+  RGBC or RGB-IR measurements with a programmable integration time
+  and gain.
+
+properties:
+  compatible:
+    const: ams,tcs3400
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+    description:
+      Interrupt line signaling ALS data ready or threshold events.
+
+  vdd-supply:
+    description:
+      Regulator supplying the main sensor power.
+
+required:
+  - compatible
+  - reg
+  - vdd-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        light-sensor@39 {
+            compatible = "ams,tcs3400";
+            reg = <0x39>;
+            interrupt-parent = <&gpio1>;
+            interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
+            vdd-supply = <&vdd_3v3>;
+        };
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index 14a06f856b81..ab5307a34180 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -22866,6 +22866,12 @@ S:	Supported
 F:	drivers/iio/adc/rohm-bd79112.c
 F:	drivers/iio/adc/rohm-bd79124.c
 
+AMS TCS3400 AMBIENT LIGHT SENSOR DRIVER
+M:	Petr Hodina
+L:	Petr Hodina <petr.hodina@protonmail.com>
+S:	Petr Hodina <petr.hodina@protonmail.com>
+F:	Documentation/devicetree/bindings/iio/light/ams,tcs3400.yaml
+
 ROHM BH1745 COLOUR SENSOR
 M:	Mudit Sharma <muditsharma.info@gmail.com>
 L:	linux-iio@vger.kernel.org

-- 
2.52.0
Re: [PATCH 1/3] doc: add Device Tree binding for AMS TCS3400 light sensor
Posted by Daniel Baluta 2 weeks, 6 days ago
On Mon, Jan 19, 2026 at 7:19 PM Petr Hodina via B4 Relay
<devnull+petr.hodina.protonmail.com@kernel.org> wrote:
>
> From: Petr Hodina <petr.hodina@protonmail.com>
>
> Adds a new YAML binding describing the AMS TCS3400 I2C light sensor,
> including compatible string, registers, interrupts, power supply, and an
> example node.
>
> Signed-off-by: Petr Hodina <petr.hodina@protonmail.com>
> ---
>  .../devicetree/bindings/iio/light/ams,tcs3400.yaml | 54 ++++++++++++++++++++++
>  MAINTAINERS                                        |  6 +++
>  2 files changed, 60 insertions(+)
>

Please use the correct subject prefix. E.g: dt-bindings: iio: light

If you are not sure what prefix to use just look around:

git log --oneline Documentation/devicetree/bindings/iio/light/
Re: [PATCH 1/3] doc: add Device Tree binding for AMS TCS3400 light sensor
Posted by Krzysztof Kozlowski 2 weeks, 6 days ago
On Mon, Jan 19, 2026 at 06:19:06PM +0100, Petr Hodina wrote:
> Adds a new YAML binding describing the AMS TCS3400 I2C light sensor,
> including compatible string, registers, interrupts, power supply, and an
> example node.
> 
> Signed-off-by: Petr Hodina <petr.hodina@protonmail.com>
> ---
>  .../devicetree/bindings/iio/light/ams,tcs3400.yaml | 54 ++++++++++++++++++++++
>  MAINTAINERS                                        |  6 +++
>  2 files changed, 60 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/light/ams,tcs3400.yaml b/Documentation/devicetree/bindings/iio/light/ams,tcs3400.yaml
> new file mode 100644
> index 000000000000..2c5a9295af1a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/light/ams,tcs3400.yaml
> @@ -0,0 +1,54 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/iio/light/ams,tcs3400.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"

Never tested.

> +
> +title: AMS TCS3400 Color Light-to-Digital Converter
> +
> +maintainers:
> +  - name: Petr Hodina
> +    email: petr.hodina@protonmail.com

Don't send us LLM code. Never. Why do I think you sent us LLM microslop?
Because such syntax does not exist. Nowhere.

I finished the review here, everything futher has more trivial issues
which you would fix easily if you took recent binding as starting point.

Best regards,
Krzysztof
Re: [PATCH 1/3] doc: add Device Tree binding for AMS TCS3400 light sensor
Posted by Krzysztof Kozlowski 2 weeks, 6 days ago
On Mon, Jan 19, 2026 at 06:19:06PM +0100, Petr Hodina wrote:
> Adds a new YAML binding describing the AMS TCS3400 I2C light sensor,
> including compatible string, registers, interrupts, power supply, and an
> example node.
> 
> Signed-off-by: Petr Hodina <petr.hodina@protonmail.com>
> ---

Also:

Please use subject prefixes matching the subsystem. You can get them for
example with 'git log --oneline -- DIRECTORY_OR_FILE' on the directory
your patch is touching. For bindings, the preferred subjects are
explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters

Best regards,
Krzysztof
Re: [PATCH 1/3] doc: add Device Tree binding for AMS TCS3400 light sensor
Posted by David Heidelberg 3 weeks ago
On 19/01/2026 18:19, Petr Hodina via B4 Relay wrote:
> From: Petr Hodina <petr.hodina@protonmail.com>
> 
> Adds a new YAML binding describing the AMS TCS3400 I2C light sensor,
> including compatible string, registers, interrupts, power supply, and an
> example node.
> 
> Signed-off-by: Petr Hodina <petr.hodina@protonmail.com>
> ---
>   .../devicetree/bindings/iio/light/ams,tcs3400.yaml | 54 ++++++++++++++++++++++
>   MAINTAINERS                                        |  6 +++
>   2 files changed, 60 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/light/ams,tcs3400.yaml b/Documentation/devicetree/bindings/iio/light/ams,tcs3400.yaml
> new file mode 100644
> index 000000000000..2c5a9295af1a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/light/ams,tcs3400.yaml
> @@ -0,0 +1,54 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/iio/light/ams,tcs3400.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: AMS TCS3400 Color Light-to-Digital Converter
> +
> +maintainers:
> +  - name: Petr Hodina
> +    email: petr.hodina@protonmail.com

  - name <email>

> +
> +description: |

no need to use | or > here, please drop

> +  The AMS TCS3400 is an I2C-connected color light sensor providing
> +  RGBC or RGB-IR measurements with a programmable integration time
> +  and gain.
> +
> +properties:
> +  compatible:
> +    const: ams,tcs3400
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +    description:
> +      Interrupt line signaling ALS data ready or threshold events.
> +
> +  vdd-supply:
> +    description:
> +      Regulator supplying the main sensor power.
> +
> +required:
> +  - compatible
> +  - reg
> +  - vdd-supply
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        light-sensor@39 {
> +            compatible = "ams,tcs3400";
> +            reg = <0x39>;
> +            interrupt-parent = <&gpio1>;
> +            interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
> +            vdd-supply = <&vdd_3v3>;
> +        };
> +    };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 14a06f856b81..ab5307a34180 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -22866,6 +22866,12 @@ S:	Supported
>   F:	drivers/iio/adc/rohm-bd79112.c
>   F:	drivers/iio/adc/rohm-bd79124.c
>   
> +AMS TCS3400 AMBIENT LIGHT SENSOR DRIVER
> +M:	Petr Hodina
> +L:	Petr Hodina <petr.hodina@protonmail.com>
> +S:	Petr Hodina <petr.hodina@protonmail.com>

M: Petr Hodina <petr.hodina@protonmail.com>
S: Maintained

drop the L: (e.g. read the header of Maintainers file ;) )

> +F:	Documentation/devicetree/bindings/iio/light/ams,tcs3400.yaml
> +
>   ROHM BH1745 COLOUR SENSOR
>   M:	Mudit Sharma <muditsharma.info@gmail.com>
>   L:	linux-iio@vger.kernel.org
> 

-- 
David Heidelberg