diff mbox series

dt-bindings: iio: light: add veml6040 RGBW-LS bindings

Message ID ZR1P278MB1117B205886E023F9F72A2E881E22@ZR1P278MB1117.CHEP278.PROD.OUTLOOK.COM (mailing list archive)
State Changes Requested
Headers show
Series dt-bindings: iio: light: add veml6040 RGBW-LS bindings | expand

Commit Message

Arthur Becker May 13, 2024, 2:35 p.m. UTC
This commit adds device tree bindings for the veml6040 RGBW Light Sensor

signed-off-by: Arthur Becker <arthur.becker@sentec.com>
---

 .../bindings/iio/light/veml6040.yaml          | 43 +++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/light/veml6040.yaml

Comments

Conor Dooley May 13, 2024, 4:26 p.m. UTC | #1
On Mon, May 13, 2024 at 02:35:44PM +0000, Arthur Becker wrote:
> This commit adds device tree bindings for the veml6040 RGBW Light Sensor
> 
> signed-off-by: Arthur Becker <arthur.becker@sentec.com>

If you're writing a standalone binding for this and not putting it into
trivial-devices.yaml you should document the supply for this device.

> ---
> 
>  .../bindings/iio/light/veml6040.yaml          | 43 +++++++++++++++++++
>  1 file changed, 43 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/light/veml6040.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/light/veml6040.yaml b/Documentation/devicetree/bindings/iio/light/veml6040.yaml
> new file mode 100644
> index 000000000000..796c22f75575
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/light/veml6040.yaml

Filename matching the compatible please.

> @@ -0,0 +1,43 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/light/veml6040.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: VEML6040 RGBW Light Sensor
> +
> +maintainers:
> +  - Arthur Becker <arthur.becker@sentec.com>
> +
> +description: |

This | isn;t needed, you've got no formatting to preserve.


Cheers,
Conor.
Krzysztof Kozlowski May 14, 2024, 7:10 a.m. UTC | #2
On 13/05/2024 16:35, Arthur Becker wrote:
> This commit adds device tree bindings for the veml6040 RGBW Light Sensor

Please do not use "This commit/patch/change", but imperative mood. See
longer explanation here:
https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95

Please wrap commit message according to Linux coding style / submission
process (neither too early nor over the limit):
https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597

More importantly: where is the driver or any other user of this binding?
Why this is sent alone?

> 
> signed-off-by: Arthur Becker <arthur.becker@sentec.com>
> ---

...

> +
> +  reg:
> +    description:
> +      I2C address of the device.

Drop description, redundant.

> +    enum:
> +      - 0x10
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        light-sensor@10 {
> +                compatible = "vishay,veml6040";

Messed indentation.

> +                reg = <0x10>;
> +        };
> +    };
> +...

Best regards,
Krzysztof
Krzysztof Kozlowski May 14, 2024, 7:11 a.m. UTC | #3
On 14/05/2024 09:10, Krzysztof Kozlowski wrote:
> On 13/05/2024 16:35, Arthur Becker wrote:
>> This commit adds device tree bindings for the veml6040 RGBW Light Sensor
> 
> Please do not use "This commit/patch/change", but imperative mood. See
> longer explanation here:
> https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95
> 
> Please wrap commit message according to Linux coding style / submission
> process (neither too early nor over the limit):
> https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597
> 
> More importantly: where is the driver or any other user of this binding?
> Why this is sent alone?

Also:

Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC (and consider --no-git-fallback argument). It might
happen, that command when run on an older kernel, gives you outdated
entries. Therefore please be sure you base your patches on recent Linux
kernel.

Tools like b4 or scripts/get_maintainer.pl provide you proper list of
people, so fix your workflow. Tools might also fail if you work on some
ancient tree (don't, instead use mainline), work on fork of kernel
(don't, instead use mainline) or you ignore some maintainers (really
don't). Just use b4 and everything should be fine, although remember
about `b4 prep --auto-to-cc` if you added new patches to the patchset.

Best regards,
Krzysztof
Jonathan Cameron May 19, 2024, 11:57 a.m. UTC | #4
On Mon, 13 May 2024 17:26:12 +0100
Conor Dooley <conor@kernel.org> wrote:

> On Mon, May 13, 2024 at 02:35:44PM +0000, Arthur Becker wrote:
> > This commit adds device tree bindings for the veml6040 RGBW Light Sensor
> > 
> > signed-off-by: Arthur Becker <arthur.becker@sentec.com>  
> 
> If you're writing a standalone binding for this and not putting it into
> trivial-devices.yaml you should document the supply for this device.

It's a broken email thread. Driver is there, but soemthing has gone
wrong with sending.

Arthur, if this is a company email setup thing, consider the b4 web portal
method for v2.

Jonathan

> 
> > ---
> > 
> >  .../bindings/iio/light/veml6040.yaml          | 43 +++++++++++++++++++
> >  1 file changed, 43 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/iio/light/veml6040.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/light/veml6040.yaml b/Documentation/devicetree/bindings/iio/light/veml6040.yaml
> > new file mode 100644
> > index 000000000000..796c22f75575
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/light/veml6040.yaml  
> 
> Filename matching the compatible please.
> 
> > @@ -0,0 +1,43 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/light/veml6040.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: VEML6040 RGBW Light Sensor
> > +
> > +maintainers:
> > +  - Arthur Becker <arthur.becker@sentec.com>
> > +
> > +description: |  
> 
> This | isn;t needed, you've got no formatting to preserve.
> 
> 
> Cheers,
> Conor.
Conor Dooley May 19, 2024, 12:02 p.m. UTC | #5
On Sun, May 19, 2024 at 12:57:05PM +0100, Jonathan Cameron wrote:
> On Mon, 13 May 2024 17:26:12 +0100
> Conor Dooley <conor@kernel.org> wrote:
> 
> > On Mon, May 13, 2024 at 02:35:44PM +0000, Arthur Becker wrote:
> > > This commit adds device tree bindings for the veml6040 RGBW Light Sensor
> > > 
> > > signed-off-by: Arthur Becker <arthur.becker@sentec.com>  
> > 
> > If you're writing a standalone binding for this and not putting it into
> > trivial-devices.yaml you should document the supply for this device.
> 
> It's a broken email thread. Driver is there, but soemthing has gone
> wrong with sending.

To be clear, the bit about "standalone" was compared to putting it in
trivial-devices.yaml, not to do with the threading and it being a patch
without a driver.
Jonathan Cameron May 19, 2024, 12:25 p.m. UTC | #6
On Mon, 13 May 2024 17:26:12 +0100
Conor Dooley <conor@kernel.org> wrote:

> On Mon, May 13, 2024 at 02:35:44PM +0000, Arthur Becker wrote:
> > This commit adds device tree bindings for the veml6040 RGBW Light Sensor
> > 
> > signed-off-by: Arthur Becker <arthur.becker@sentec.com>  
> 
> If you're writing a standalone binding for this and not putting it into
> trivial-devices.yaml you should document the supply for this device.
> 

Plus turn it on in the driver! In many cases supplies are hardwired
to on, but it the regulator framework will happily deal with that
by supplying a fake regulator.  The binding should however reflect that
the sensor needs power and list it as required.  Ideal is dts
files that do list fixed supplies but the fallback to a fake one will
work if not.

Jonathan
> > ---
> > 
> >  .../bindings/iio/light/veml6040.yaml          | 43 +++++++++++++++++++
> >  1 file changed, 43 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/iio/light/veml6040.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/light/veml6040.yaml b/Documentation/devicetree/bindings/iio/light/veml6040.yaml
> > new file mode 100644
> > index 000000000000..796c22f75575
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/light/veml6040.yaml  
> 
> Filename matching the compatible please.
> 
> > @@ -0,0 +1,43 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/light/veml6040.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: VEML6040 RGBW Light Sensor
> > +
> > +maintainers:
> > +  - Arthur Becker <arthur.becker@sentec.com>
> > +
> > +description: |  
> 
> This | isn;t needed, you've got no formatting to preserve.
> 
> 
> Cheers,
> Conor.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/light/veml6040.yaml b/Documentation/devicetree/bindings/iio/light/veml6040.yaml
new file mode 100644
index 000000000000..796c22f75575
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/light/veml6040.yaml
@@ -0,0 +1,43 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/light/veml6040.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: VEML6040 RGBW Light Sensor
+
+maintainers:
+  - Arthur Becker <arthur.becker@sentec.com>
+
+description: |
+  Datasheet at https://www.vishay.com/docs/84276/veml6040.pdf
+
+properties:
+  compatible:
+    enum:
+      - vishay,veml6040
+
+  reg:
+    description:
+      I2C address of the device.
+    enum:
+      - 0x10
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        light-sensor@10 {
+                compatible = "vishay,veml6040";
+                reg = <0x10>;
+        };
+    };
+...