[PATCH v6 0/8] iio: light: vcnl4000: add regulator support

Erikas Bitovtas posted 8 patches 2 weeks ago
.../bindings/iio/light/vishay,vcnl4000.yaml        | 14 ++++
drivers/iio/light/vcnl4000.c                       | 90 ++++++++++++----------
2 files changed, 63 insertions(+), 41 deletions(-)
[PATCH v6 0/8] iio: light: vcnl4000: add regulator support
Posted by Erikas Bitovtas 2 weeks ago
This patch series introduces support for voltage supply, I2C and cathode
regulators. This fixes an issue where if a regulator is shared between
the proximity sensor and some other device, and the other device is
powered off, the proximity sensor would be powered off as well.

One of the commits includes a Reported-by: tag without a Closes: tag -
the report was done outside in a Matrix channel. A link to access the
report requires sign-in, therefore it was left out.

Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
---
Changes in v6:
- Added descriptions to the regulators in the binding.
- Fixed the dt_binding_check bug in the example.
- Link to v5: https://lore.kernel.org/r/20260319-vcnl4000-regulators-v5-0-a025d3332805@gmail.com

Changes in v5:
- Renamed vddio-supply to vio-supply.
- Added parentheses to function calls in a variable usage commit message.
- Moved the redundant "proximity-near-level" check removal into its own
  patch.
- Link to v4: https://lore.kernel.org/r/20260316-vcnl4000-regulators-v4-0-854fc2eaf54b@gmail.com

Changes in v4:
- Reworded device tree bindings commit into imperative mood and
  clarified where do supplies come from.
- Moved data->chip_spec->set_power_state() calls from init functions to
  probe.
- Removed explicit less than 0 checks for ret where unnecessary.
- Moved the patch that adds regulators to the end of the series.
- Added an explanation for removing duplicate prints in probe.
- Fixed indentation for devm_regulator_bulk_get_enable() and i2c_smbus
  writes in vcnl4200_init().
- Removed a redundant check for "proximity-near-level" device property.
- Link to v3: https://lore.kernel.org/r/20260314-vcnl4000-regulators-v3-0-3c4a48d30676@gmail.com

Changes in v3:
- Added a more detailed description for supplies in the dt-bindings commit.
- Separated sorting includes into a commit of its own.
- Replaced all occurrences of mutex_init with its device-managed
  counterpart.
- Moved client->dev variable declaration into a commit for adding
  regulators.
- Removed redundant dev_err messages in probe function.
- Replaced all direct usages of client->dev and data->client into usages
  by variable.
- Link to v2: https://lore.kernel.org/r/20260312-vcnl4000-regulators-v2-0-2bdebbcbb58a@gmail.com

Changes in v2:
- Removed double quotes in includes.
- Reordered includes alphabetically.
- Enabled regulators before the mutex is initialized.
- Replaced direct usage of &client->dev with a variable.
- Link to v1: https://lore.kernel.org/r/20260311-vcnl4000-regulators-v1-0-66b6038ce563@gmail.com

---
Erikas Bitovtas (8):
      dt-bindings: iio: light: vcnl4000: add regulators
      iio: light: vcnl4000: sort includes by their name
      iio: light: vcnl4000: move power enablement from init to probe
      iio: light: vcnl4000: replace mutex_init() with devm_mutex_init()
      iio: light: vcnl4000: remove error messages for trigger and irq
      iio: light: vcnl4000: use variables for I2C client and device instances
      iio: light: vcnl4000: remove redundant check for proximity-near-level
      iio: light: vcnl4000: add support for regulators

 .../bindings/iio/light/vishay,vcnl4000.yaml        | 14 ++++
 drivers/iio/light/vcnl4000.c                       | 90 ++++++++++++----------
 2 files changed, 63 insertions(+), 41 deletions(-)
---
base-commit: 785f0eb2f85decbe7c1ef9ae922931f0194ffc2e
change-id: 20260310-vcnl4000-regulators-bcf1b8a01ce6

Best regards,
-- 
Erikas Bitovtas <xerikasxx@gmail.com>
Re: [PATCH v6 0/8] iio: light: vcnl4000: add regulator support
Posted by Andy Shevchenko 2 weeks ago
On Fri, Mar 20, 2026 at 06:45:35PM +0200, Erikas Bitovtas wrote:
> This patch series introduces support for voltage supply, I2C and cathode
> regulators. This fixes an issue where if a regulator is shared between
> the proximity sensor and some other device, and the other device is
> powered off, the proximity sensor would be powered off as well.
> 
> One of the commits includes a Reported-by: tag without a Closes: tag -
> the report was done outside in a Matrix channel. A link to access the
> report requires sign-in, therefore it was left out.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>

For the series, except the DT binding, I haven't even opened that mail.
Also you can add Suggested-by to the selected patches.

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH v6 0/8] iio: light: vcnl4000: add regulator support
Posted by Jonathan Cameron 1 week, 6 days ago
On Fri, 20 Mar 2026 21:35:01 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Fri, Mar 20, 2026 at 06:45:35PM +0200, Erikas Bitovtas wrote:
> > This patch series introduces support for voltage supply, I2C and cathode
> > regulators. This fixes an issue where if a regulator is shared between
> > the proximity sensor and some other device, and the other device is
> > powered off, the proximity sensor would be powered off as well.
> > 
> > One of the commits includes a Reported-by: tag without a Closes: tag -
> > the report was done outside in a Matrix channel. A link to access the
> > report requires sign-in, therefore it was left out.  
> 
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> 
> For the series, except the DT binding, I haven't even opened that mail.
> Also you can add Suggested-by to the selected patches.
> 
You do like to challenge b4! :) Hand removed the tag it added for
the DT patch.

Series applied to the testing branch of iio.git that I'll push
out as togreg once initial build tests are in etc.

Thanks,

Jonathan