[lkml]   [2022]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH 0/3] regulator: Add DT support for regulator-output connectors

This series is another attempt at implementing support for
userspace-controlled regulator-supplied power outputs. This is an
important feature for some kinds of BMC (baseboard management
controller) systems where the BMC provides an operator with manual
control of a set of DC power outputs.

As in a broadly similar patchset that was recently almost merged [0],
this takes the approach of providing support by extending the existing
userspace-consumer regulator driver. A couple questions about the
userspace-consumer driver came up along the way, however.

First, how (if at all) is it currently being used? It appears the
last in-tree use of it was removed a bit over two years ago in commit
9d3239147d6d ("ARM: pxa: remove Compulab pxa2xx boards"). Aside from
just adding DT support I've made a couple small tweaks to the driver
in patch 3 that I hope are compatible with any current usage, but
without any extant examples to look at it's kind of hard to say.

Second, how critical is its support for controlling multiple
regulators? (i.e. its use of regulator_bulk_data and friends instead
of a single struct regulator.) As far as I can see every in-tree use
of it that's ever existed has used num_supplies = 1. If it's not
important to retain, patch 1 of this series could be supplanted by one
that instead simplifies the driver slightly by removing that

The DT binding added in patch 2 is very similar to one I posted in a
previous patchset that had an R-B from Rob [1], but has had some minor
rewording and gained one new (optional) property.

Laxman, Naresh, Patrick -- please let me know if there are any aspects
of this implementation that would be incompatible with your needs.



Zev Weiss (3):
regulator: devres: Add devm_regulator_bulk_get_exclusive()
dt-bindings: regulator: Add regulator-output binding
regulator: userspace-consumer: Handle regulator-output DT nodes

.../bindings/regulator/regulator-output.yaml | 47 +++++++++++++
drivers/regulator/core.c | 42 +++++++-----
drivers/regulator/devres.c | 66 ++++++++++++++-----
drivers/regulator/internal.h | 2 +
drivers/regulator/userspace-consumer.c | 43 ++++++++++--
include/linux/regulator/consumer.h | 2 +
include/linux/regulator/userspace-consumer.h | 1 +
7 files changed, 162 insertions(+), 41 deletions(-)
create mode 100644 Documentation/devicetree/bindings/regulator/regulator-output.yaml


 \ /
  Last update: 2022-09-26 00:12    [W:0.109 / U:0.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site