regulator: Add DT support for regulator-output connectors
authorMark Brown <broonie@kernel.org>
Thu, 3 Nov 2022 16:11:17 +0000 (16:11 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 3 Nov 2022 16:11:17 +0000 (16:11 +0000)
commit3078d0c3eb4d7f860fea9cca93b0ae77bda97122
tree4d8043fdb9f313dde95f421ed5fcf24aec2c7ffa
parentbe847537e3cd951411892072639b1f98d7b96028
parent5c51d4afcf3fd36159713556402e16cfab794ae9
regulator: Add DT support for regulator-output connectors

Merge series from Zev Weiss <zev@bewilderbeest.net>:

This series adds support for userspace-controlled regulator-supplied
power outputs [2].  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
functionality.

The DT binding added in patch 2 is essentially identical to one I
posted in a previous patchset that had an R-B from Rob [1], but has
had some minor rewording and been moved from the extcon subsystem to
the regulator subsystem.