[PATCH v6 1/8] dt-bindings: iio: light: vcnl4000: add regulators

Erikas Bitovtas posted 8 patches 2 weeks ago
[PATCH v6 1/8] dt-bindings: iio: light: vcnl4000: add regulators
Posted by Erikas Bitovtas 2 weeks ago
These sensors can accept 2 supplies - one for the sensor and one for IR
LED [1]. Add supply properties for the sensor - 2 for the sensors and
one external, for their open drain interrupt line, to ensure the sensor
is powered on before proceeding with setup.

[1] https://www.vishay.com/docs/84274/vcnl4040.pdf

Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
---
 .../devicetree/bindings/iio/light/vishay,vcnl4000.yaml     | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/light/vishay,vcnl4000.yaml b/Documentation/devicetree/bindings/iio/light/vishay,vcnl4000.yaml
index 2ba4d5de4ec4..516afef7a545 100644
--- a/Documentation/devicetree/bindings/iio/light/vishay,vcnl4000.yaml
+++ b/Documentation/devicetree/bindings/iio/light/vishay,vcnl4000.yaml
@@ -33,6 +33,17 @@ properties:
   interrupts:
     maxItems: 1
 
+  vdd-supply:
+    description: Regulator providing power to the "VDD" pin.
+
+  vio-supply:
+    description: Regulator providing power for pull-up of the I/O lines.
+      Does not connect to the sensor directly, but is needed for the
+      correct operation of the I2C and interrupt lines.
+
+  vled-supply:
+    description: Regulator providing power to the IR anode pin.
+
   reg:
     maxItems: 1
 
@@ -54,6 +65,9 @@ examples:
             compatible = "vishay,vcnl4200";
             reg = <0x51>;
             proximity-near-level = <220>;
+            vdd-supply = <&reg_vdd>;
+            vio-supply = <&reg_vio>;
+            vled-supply = <&reg_vled>;
         };
     };
 ...

-- 
2.53.0
Re: [PATCH v6 1/8] dt-bindings: iio: light: vcnl4000: add regulators
Posted by Jonathan Cameron 1 week, 6 days ago
On Fri, 20 Mar 2026 18:45:36 +0200
Erikas Bitovtas <xerikasxx@gmail.com> wrote:

> These sensors can accept 2 supplies - one for the sensor and one for IR
> LED [1]. Add supply properties for the sensor - 2 for the sensors and
> one external, for their open drain interrupt line, to ensure the sensor
> is powered on before proceeding with setup.
> 
> [1] https://www.vishay.com/docs/84274/vcnl4040.pdf
> 
> Reviewed-by: David Lechner <dlechner@baylibre.com>
> Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
> ---
>  .../devicetree/bindings/iio/light/vishay,vcnl4000.yaml     | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/light/vishay,vcnl4000.yaml b/Documentation/devicetree/bindings/iio/light/vishay,vcnl4000.yaml
> index 2ba4d5de4ec4..516afef7a545 100644
> --- a/Documentation/devicetree/bindings/iio/light/vishay,vcnl4000.yaml
> +++ b/Documentation/devicetree/bindings/iio/light/vishay,vcnl4000.yaml
> @@ -33,6 +33,17 @@ properties:
>    interrupts:
>      maxItems: 1
>  
> +  vdd-supply:
> +    description: Regulator providing power to the "VDD" pin.
> +
> +  vio-supply:
> +    description: Regulator providing power for pull-up of the I/O lines.
> +      Does not connect to the sensor directly, but is needed for the
> +      correct operation of the I2C and interrupt lines.

It's optional so I guess it doesn't matter, but whether this supply is
needed of not is down to whether the SoC allows for pull up on the
interrupt and I2C lines.  Some SoCs provide this (though it's been
a while since I used one that did.).

In other cases an external pull up is needed. It would feel
odd to provide a supply for the pull up it was all hidden in the SoC.

Anyhow, optional so we aren't forcing this anyway.

Jonathan


> +
> +  vled-supply:
> +    description: Regulator providing power to the IR anode pin.
> +
>    reg:
>      maxItems: 1
>  
> @@ -54,6 +65,9 @@ examples:
>              compatible = "vishay,vcnl4200";
>              reg = <0x51>;
>              proximity-near-level = <220>;
> +            vdd-supply = <&reg_vdd>;
> +            vio-supply = <&reg_vio>;
> +            vled-supply = <&reg_vled>;
>          };
>      };
>  ...
>
Re: [PATCH v6 1/8] dt-bindings: iio: light: vcnl4000: add regulators
Posted by Krzysztof Kozlowski 1 week, 6 days ago
On Fri, Mar 20, 2026 at 06:45:36PM +0200, Erikas Bitovtas wrote:
> These sensors can accept 2 supplies - one for the sensor and one for IR
> LED [1]. Add supply properties for the sensor - 2 for the sensors and
> one external, for their open drain interrupt line, to ensure the sensor
> is powered on before proceeding with setup.
> 
> [1] https://www.vishay.com/docs/84274/vcnl4040.pdf
> 
> Reviewed-by: David Lechner <dlechner@baylibre.com>
> Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
> ---
>  .../devicetree/bindings/iio/light/vishay,vcnl4000.yaml     | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Best regards,
Krzysztof