diff mbox series

[1/3] dt-bindings: iio: light: veml6046x00: add color sensor

Message ID 20250316113131.62884-2-ak@it-klinger.de (mailing list archive)
State Changes Requested
Headers show
Series iio:light: add driver for veml6046x00 RGBIR color sensor | expand

Commit Message

Andreas Klinger March 16, 2025, 11:31 a.m. UTC
Add a new compatible for Vishay high accuracy RGBIR color sensor
veml6046x00.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
---
 .../iio/light/vishay,veml6046x00.yaml         | 49 +++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/light/vishay,veml6046x00.yaml

Comments

Rob Herring (Arm) March 16, 2025, 12:19 p.m. UTC | #1
On Sun, 16 Mar 2025 12:31:29 +0100, Andreas Klinger wrote:
> Add a new compatible for Vishay high accuracy RGBIR color sensor
> veml6046x00.
> 
> Signed-off-by: Andreas Klinger <ak@it-klinger.de>
> ---
>  .../iio/light/vishay,veml6046x00.yaml         | 49 +++++++++++++++++++
>  1 file changed, 49 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/light/vishay,veml6046x00.yaml
> 

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

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Error: Documentation/devicetree/bindings/iio/light/vishay,veml6046x00.example.dts:33.33-34 syntax error
FATAL ERROR: Unable to parse input tree
make[2]: *** [scripts/Makefile.dtbs:131: Documentation/devicetree/bindings/iio/light/vishay,veml6046x00.example.dtb] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1518: dt_binding_check] Error 2
make: *** [Makefile:248: __sub-make] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250316113131.62884-2-ak@it-klinger.de

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.
Jonathan Cameron March 17, 2025, 11 a.m. UTC | #2
On Sun, 16 Mar 2025 12:31:29 +0100
Andreas Klinger <ak@it-klinger.de> wrote:

> Add a new compatible for Vishay high accuracy RGBIR color sensor
> veml6046x00.
> 
> Signed-off-by: Andreas Klinger <ak@it-klinger.de>
> ---
>  .../iio/light/vishay,veml6046x00.yaml         | 49 +++++++++++++++++++
>  1 file changed, 49 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/light/vishay,veml6046x00.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/light/vishay,veml6046x00.yaml b/Documentation/devicetree/bindings/iio/light/vishay,veml6046x00.yaml
> new file mode 100644
> index 000000000000..3207800fc539
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/light/vishay,veml6046x00.yaml
> @@ -0,0 +1,49 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/light/vishay,veml6046x00.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Vishay VEML6046X00 High accuracy RGBIR color sensor
> +
> +maintainers:
> +  - Andreas Klinger <ak@it-klinger.de>
> +
> +description:
> +  VEML6046X00 datasheet at https://www.vishay.com/docs/80173/veml6046x00.pdf
> +
> +properties:
> +  compatible:
> +    enum:
> +      - vishay,veml6046x00
> +
> +  reg:
> +    maxItems: 1
> +
> +  vdd-supply: true
> +
> +  interrupts:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - vdd-supply
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        color-sensor@29 {
> +            compatible = "vishay,veml6046x00";
> +            reg = <0x29>;
> +            vdd-supply = <&vdd_reg>;
> +            interrupt-parent = <&gpio2>;
> +            interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
Need an include for this I think.  Make sure to test build your
bindings following the instructions in the bot message.

Thanks,

Jonathan

> +        };
> +    };
> +...
Andreas Klinger March 17, 2025, 11:17 a.m. UTC | #3
Hi Jonathan,


Jonathan Cameron <jic23@kernel.org> schrieb am Mo, 17. Mär 11:00:
> On Sun, 16 Mar 2025 12:31:29 +0100
> Andreas Klinger <ak@it-klinger.de> wrote:
> 
> > Add a new compatible for Vishay high accuracy RGBIR color sensor
> > veml6046x00.
> > 
> > Signed-off-by: Andreas Klinger <ak@it-klinger.de>
> > ---
> >  .../iio/light/vishay,veml6046x00.yaml         | 49 +++++++++++++++++++
> >  1 file changed, 49 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/iio/light/vishay,veml6046x00.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/light/vishay,veml6046x00.yaml b/Documentation/devicetree/bindings/iio/light/vishay,veml6046x00.yaml
> > new file mode 100644
> > index 000000000000..3207800fc539
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/light/vishay,veml6046x00.yaml
> > @@ -0,0 +1,49 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/light/vishay,veml6046x00.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Vishay VEML6046X00 High accuracy RGBIR color sensor
> > +
> > +maintainers:
> > +  - Andreas Klinger <ak@it-klinger.de>
> > +
> > +description:
> > +  VEML6046X00 datasheet at https://www.vishay.com/docs/80173/veml6046x00.pdf
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - vishay,veml6046x00
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  vdd-supply: true
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - vdd-supply
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    i2c {
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +
> > +        color-sensor@29 {
> > +            compatible = "vishay,veml6046x00";
> > +            reg = <0x29>;
> > +            vdd-supply = <&vdd_reg>;
> > +            interrupt-parent = <&gpio2>;
> > +            interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
> Need an include for this I think.  Make sure to test build your
> bindings following the instructions in the bot message.

I already sent out an version 2 yesterday which is with the include, tested and
already reviewed by Krzysztof.

Andreas

> 
> Thanks,
> 
> Jonathan
> 
> > +        };
> > +    };
> > +...
>
Krzysztof Kozlowski March 17, 2025, 11:26 a.m. UTC | #4
On 17/03/2025 12:17, Andreas Klinger wrote:
>>> +  - |
>>> +    i2c {
>>> +        #address-cells = <1>;
>>> +        #size-cells = <0>;
>>> +
>>> +        color-sensor@29 {
>>> +            compatible = "vishay,veml6046x00";
>>> +            reg = <0x29>;
>>> +            vdd-supply = <&vdd_reg>;
>>> +            interrupt-parent = <&gpio2>;
>>> +            interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
>> Need an include for this I think.  Make sure to test build your
>> bindings following the instructions in the bot message.
> 
> I already sent out an version 2 yesterday which is with the include, tested and
> already reviewed by Krzysztof.

The point is that you should test it, not rely on us and our tools (e.g.
my or Rob's machine). If our tools report such issues, it is already too
late because it means you did not follow the process.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/light/vishay,veml6046x00.yaml b/Documentation/devicetree/bindings/iio/light/vishay,veml6046x00.yaml
new file mode 100644
index 000000000000..3207800fc539
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/light/vishay,veml6046x00.yaml
@@ -0,0 +1,49 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/light/vishay,veml6046x00.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Vishay VEML6046X00 High accuracy RGBIR color sensor
+
+maintainers:
+  - Andreas Klinger <ak@it-klinger.de>
+
+description:
+  VEML6046X00 datasheet at https://www.vishay.com/docs/80173/veml6046x00.pdf
+
+properties:
+  compatible:
+    enum:
+      - vishay,veml6046x00
+
+  reg:
+    maxItems: 1
+
+  vdd-supply: true
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - vdd-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        color-sensor@29 {
+            compatible = "vishay,veml6046x00";
+            reg = <0x29>;
+            vdd-supply = <&vdd_reg>;
+            interrupt-parent = <&gpio2>;
+            interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
+        };
+    };
+...