diff mbox series

[3/4] dt-bindings: iio: light: veml6075: document rset-kohms

Message ID 20241017-veml6070-integration-time-v1-3-3507d17d562a@gmail.com (mailing list archive)
State Changes Requested
Headers show
Series iio: light: veml6070: add integration time and minor cleanups. | expand

Commit Message

Javier Carrasco Oct. 17, 2024, 9:39 p.m. UTC
The veml6070 provides a configurable integration time by means of an
extertnal resistor (Rset in the datasheet) with values between 75 and
1200 kohms.

Document rset-kohms to select the integration time.

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

Comments

Rob Herring Oct. 18, 2024, 1:29 p.m. UTC | #1
On Thu, Oct 17, 2024 at 11:39:27PM +0200, Javier Carrasco wrote:
> The veml6070 provides a configurable integration time by means of an
> extertnal resistor (Rset in the datasheet) with values between 75 and
> 1200 kohms.
> 
> Document rset-kohms to select the integration time.
> 
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> ---
>  .../devicetree/bindings/iio/light/vishay,veml6075.yaml   | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml b/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
> index 96c1317541fa..3d3ffeaa22df 100644
> --- a/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
> +++ b/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
> @@ -29,6 +29,22 @@ required:
>    - reg
>    - vdd-supply
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - vishay,veml6070
> +    then:
> +      properties:
> +        rset-kohms:

Use the documented '-ohms' suffix.

Properties should be defined at the top-level and then restricted here.

> +          $ref: /schemas/types.yaml#/definitions/uint32
> +          description: |
> +            Value in kilo Ohms of the Rset resistor used to select
> +            the integration time.
> +          minimum: 75
> +          maximum: 1200
> +
>  additionalProperties: false
>  
>  examples:
> 
> -- 
> 2.43.0
>
Jonathan Cameron Oct. 19, 2024, 2:16 p.m. UTC | #2
On Thu, 17 Oct 2024 23:39:27 +0200
Javier Carrasco <javier.carrasco.cruz@gmail.com> wrote:

> The veml6070 provides a configurable integration time by means of an
> extertnal resistor (Rset in the datasheet) with values between 75 and
Spell check descriptions.  external

> 1200 kohms.
> 
> Document rset-kohms to select the integration time.
> 
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> ---
>  .../devicetree/bindings/iio/light/vishay,veml6075.yaml   | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml b/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
> index 96c1317541fa..3d3ffeaa22df 100644
> --- a/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
> +++ b/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
> @@ -29,6 +29,22 @@ required:
>    - reg
>    - vdd-supply
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - vishay,veml6070
> +    then:
> +      properties:
> +        rset-kohms:
> +          $ref: /schemas/types.yaml#/definitions/uint32
> +          description: |
> +            Value in kilo Ohms of the Rset resistor used to select
> +            the integration time.
> +          minimum: 75
> +          maximum: 1200
> +
>  additionalProperties: false
>  
>  examples:
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml b/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
index 96c1317541fa..3d3ffeaa22df 100644
--- a/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
+++ b/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
@@ -29,6 +29,22 @@  required:
   - reg
   - vdd-supply
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          enum:
+            - vishay,veml6070
+    then:
+      properties:
+        rset-kohms:
+          $ref: /schemas/types.yaml#/definitions/uint32
+          description: |
+            Value in kilo Ohms of the Rset resistor used to select
+            the integration time.
+          minimum: 75
+          maximum: 1200
+
 additionalProperties: false
 
 examples: