diff mbox series

[2/2] dt-bindings: iio: light: add support for Vishay VEML6075

Message ID 20231110-veml6075-v1-2-354b3245e14a@gmail.com (mailing list archive)
State Changes Requested
Headers show
Series iio: light: add support for VEML6075 UVA and UVB light sensor | expand

Commit Message

Javier Carrasco Nov. 19, 2023, 4:58 a.m. UTC
The Vishay VEML6075 is a 16-bit digital UVA and UVB sensor with I2C
interface.

Add bindings and an example for the Vishay VEML6075.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
 .../bindings/iio/light/vishay,veml6075.yaml        | 40 ++++++++++++++++++++++
 1 file changed, 40 insertions(+)

Comments

Jonathan Cameron Nov. 19, 2023, 2:30 p.m. UTC | #1
On Sun, 19 Nov 2023 05:58:04 +0100
Javier Carrasco <javier.carrasco.cruz@gmail.com> wrote:

> The Vishay VEML6075 is a 16-bit digital UVA and UVB sensor with I2C
> interface.
> 
> Add bindings and an example for the Vishay VEML6075.
> 
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>

Hmm. This is a very simple device and we have a bunch of similar vishay light
sensor bindings. One option here would be to combine all the binding
docs and add an explicit check for no interrupts being specified for this
compatible.

Perhaps that should be a follow up patch though given how simple this is
and a desire to not slow down merging the driver.

One comment inline,

Jonathan


> ---
>  .../bindings/iio/light/vishay,veml6075.yaml        | 40 ++++++++++++++++++++++
>  1 file changed, 40 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml b/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
> new file mode 100644
> index 000000000000..f8e2db29af42
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
> @@ -0,0 +1,40 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/light/vishay,veml6075.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Vishay VEML6075 UVA and UVB sensor
> +
> +maintainers:
> +  - Javier Carrasco <javier.carrasco.cruz@gmail.com>
> +
> +properties:
> +  compatible:
> +    const: vishay,veml6075
> +
> +  reg:
> +    maxItems: 1
> +
> +  vdd-supply:
> +    description: Regulator that provides power to the sensor

The description doesn't really add anything.
  vdd-supply: true

is sufficient.

> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        uv-sensor@10 {
> +            compatible = "vishay,veml6075";
> +            reg = <0x10>;
> +            vdd-supply = <&vdd_reg>;
> +        };
> +    };
> +...
>
Krzysztof Kozlowski Nov. 20, 2023, 10:24 a.m. UTC | #2
On 19/11/2023 15:30, Jonathan Cameron wrote:
> On Sun, 19 Nov 2023 05:58:04 +0100
> Javier Carrasco <javier.carrasco.cruz@gmail.com> wrote:
> 
>> The Vishay VEML6075 is a 16-bit digital UVA and UVB sensor with I2C
>> interface.
>>
>> Add bindings and an example for the Vishay VEML6075.
>>
>> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> 
> Hmm. This is a very simple device and we have a bunch of similar vishay light
> sensor bindings. One option here would be to combine all the binding
> docs and add an explicit check for no interrupts being specified for this
> compatible.
> 
> Perhaps that should be a follow up patch though given how simple this is
> and a desire to not slow down merging the driver.

I am fine with both approaches.

> 
> One comment inline,

With this fixed:

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

This is an automated instruction, just in case, because many review tags
are being ignored. If you know the process, you can skip it (please do
not feel offended by me posting it here - no bad intentions intended).
If you do not know the process, here is a short explanation:

Please add Acked-by/Reviewed-by/Tested-by tags when posting new
versions, under or above your Signed-off-by tag. Tag is "received", when
provided in a message replied to you on the mailing list. Tools like b4
can help here. However, there's no need to repost patches *only* to add
the tags. The upstream maintainer will do that for tags received on the
version they apply.

https://elixir.bootlin.com/linux/v6.5-rc3/source/Documentation/process/submitting-patches.rst#L577

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml b/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
new file mode 100644
index 000000000000..f8e2db29af42
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
@@ -0,0 +1,40 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/light/vishay,veml6075.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Vishay VEML6075 UVA and UVB sensor
+
+maintainers:
+  - Javier Carrasco <javier.carrasco.cruz@gmail.com>
+
+properties:
+  compatible:
+    const: vishay,veml6075
+
+  reg:
+    maxItems: 1
+
+  vdd-supply:
+    description: Regulator that provides power to the sensor
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        uv-sensor@10 {
+            compatible = "vishay,veml6075";
+            reg = <0x10>;
+            vdd-supply = <&vdd_reg>;
+        };
+    };
+...