diff mbox series

[v3,1/2] dt-bindings: iio: light: veml6075: document rset-ohms

Message ID 20241028-veml6070-integration-time-v3-1-dd7ace62f480@gmail.com (mailing list archive)
State Changes Requested
Headers show
Series iio: light: veml6070: add integration time | expand

Commit Message

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

Document rset-ohms to select the integration time.

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

Comments

Krzysztof Kozlowski Oct. 29, 2024, 7:33 a.m. UTC | #1
On Mon, Oct 28, 2024 at 06:14:01PM +0100, Javier Carrasco wrote:
> The veml6070 provides a configurable integration time by means of an
> external resistor (Rset in the datasheet) with values between 75 and
> 1200 kohms.
> 
> Document rset-ohms to select the integration time.
> 
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> ---
>  .../devicetree/bindings/iio/light/vishay,veml6075.yaml | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml b/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
> index 96c1317541fa..5381a90f7f7e 100644
> --- a/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
> +++ b/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
> @@ -22,6 +22,13 @@ properties:
>    reg:
>      maxItems: 1
>  
> +  rset-ohms:

I missed last time this, sorry:
This looks specific to this device, so missing vendor prefix. Otherwise
you should use an existing property or make it a generic, IIO property
in common schema.

Best regards,
Krzysztof
Javier Carrasco Oct. 29, 2024, 7:44 a.m. UTC | #2
On 29/10/2024 08:33, Krzysztof Kozlowski wrote:
> On Mon, Oct 28, 2024 at 06:14:01PM +0100, Javier Carrasco wrote:
>> The veml6070 provides a configurable integration time by means of an
>> external resistor (Rset in the datasheet) with values between 75 and
>> 1200 kohms.
>>
>> Document rset-ohms to select the integration time.
>>
>> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
>> ---
>>  .../devicetree/bindings/iio/light/vishay,veml6075.yaml | 18 ++++++++++++++++++
>>  1 file changed, 18 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml b/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
>> index 96c1317541fa..5381a90f7f7e 100644
>> --- a/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
>> +++ b/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
>> @@ -22,6 +22,13 @@ properties:
>>    reg:
>>      maxItems: 1
>>  
>> +  rset-ohms:
> 
> I missed last time this, sorry:
> This looks specific to this device, so missing vendor prefix. Otherwise
> you should use an existing property or make it a generic, IIO property
> in common schema.
> 
> Best regards,
> Krzysztof
> 

This is a device-specific property, so I will rename to

vishay,reset-ohms

Thanks and best regards,
Javier Carrasco
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..5381a90f7f7e 100644
--- a/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
+++ b/Documentation/devicetree/bindings/iio/light/vishay,veml6075.yaml
@@ -22,6 +22,13 @@  properties:
   reg:
     maxItems: 1
 
+  rset-ohms:
+    description:
+      Resistor used to select the integration time.
+    default: 270000
+    minimum: 75000
+    maximum: 1200000
+
   vdd-supply: true
 
 required:
@@ -29,6 +36,17 @@  required:
   - reg
   - vdd-supply
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          enum:
+            - vishay,veml6040
+            - vishay,veml6075
+    then:
+      properties:
+        rset-ohms: false
+
 additionalProperties: false
 
 examples: