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

Javier Carrasco posted 2 patches 3 weeks, 6 days ago
There is a newer version of this series
[PATCH v3 1/2] dt-bindings: iio: light: veml6075: document rset-ohms
Posted by Javier Carrasco 3 weeks, 6 days ago
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:
+    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:

-- 
2.43.0
Re: [PATCH v3 1/2] dt-bindings: iio: light: veml6075: document rset-ohms
Posted by Krzysztof Kozlowski 3 weeks, 6 days ago
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
Re: [PATCH v3 1/2] dt-bindings: iio: light: veml6075: document rset-ohms
Posted by Javier Carrasco 3 weeks, 6 days ago
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