From: Zev Weiss <zev@bewilderbeest.net> To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, devicetree@vger.kernel.org Cc: Zev Weiss <zev@bewilderbeest.net>, linux-kernel@vger.kernel.org, Naresh Solanki <naresh.solanki@9elements.com>, Patrick Rudolph <patrick.rudolph@9elements.com>, Laxman Dewangan <ldewangan@nvidia.com>, Mike Rapoport <rppt@kernel.org>, openbmc@lists.ozlabs.org Subject: [PATCH 0/3] regulator: Add DT support for regulator-output connectors Date: Sun, 25 Sep 2022 15:03:16 -0700 [thread overview] Message-ID: <20220925220319.12572-1-zev@bewilderbeest.net> (raw) Hello, 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 functionality. 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. Thanks, Zev [0] https://lore.kernel.org/all/20220707081826.953449-4-Naresh.Solanki@9elements.com/ [1] https://lore.kernel.org/linux-kernel/20220505232557.10936-2-zev@bewilderbeest.net/ 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 -- 2.37.3
WARNING: multiple messages have this Message-ID (diff)
From: Zev Weiss <zev@bewilderbeest.net> To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, devicetree@vger.kernel.org Cc: Zev Weiss <zev@bewilderbeest.net>, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, Naresh Solanki <naresh.solanki@9elements.com>, Laxman Dewangan <ldewangan@nvidia.com>, Patrick Rudolph <patrick.rudolph@9elements.com>, Mike Rapoport <rppt@kernel.org> Subject: [PATCH 0/3] regulator: Add DT support for regulator-output connectors Date: Sun, 25 Sep 2022 15:03:16 -0700 [thread overview] Message-ID: <20220925220319.12572-1-zev@bewilderbeest.net> (raw) Hello, 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 functionality. 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. Thanks, Zev [0] https://lore.kernel.org/all/20220707081826.953449-4-Naresh.Solanki@9elements.com/ [1] https://lore.kernel.org/linux-kernel/20220505232557.10936-2-zev@bewilderbeest.net/ 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 -- 2.37.3
next reply other threads:[~2022-09-25 22:11 UTC|newest] Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-25 22:03 Zev Weiss [this message] 2022-09-25 22:03 ` [PATCH 0/3] regulator: Add DT support for regulator-output connectors Zev Weiss 2022-09-25 22:03 ` [PATCH 1/3] regulator: devres: Add devm_regulator_bulk_get_exclusive() Zev Weiss 2022-09-25 22:03 ` Zev Weiss 2022-09-25 22:03 ` [PATCH 2/3] dt-bindings: regulator: Add regulator-output binding Zev Weiss 2022-09-25 22:03 ` Zev Weiss 2022-09-29 21:07 ` Rob Herring 2022-09-29 21:07 ` Rob Herring 2022-09-29 21:27 ` Zev Weiss 2022-09-29 21:27 ` Zev Weiss 2022-10-27 18:42 ` Zev Weiss 2022-10-27 18:42 ` Zev Weiss 2022-10-28 1:22 ` Krzysztof Kozlowski 2022-10-28 4:12 ` [PATCH 2/3] dt-bindings: regulator: Add regulator-output bindingg Zev Weiss 2022-10-28 4:12 ` Zev Weiss 2022-10-28 15:51 ` Mark Brown 2022-10-28 15:51 ` Mark Brown 2022-10-28 19:44 ` Zev Weiss 2022-10-28 19:44 ` Zev Weiss 2022-10-31 15:45 ` Mark Brown 2022-10-31 15:45 ` Mark Brown 2022-10-31 18:50 ` Zev Weiss 2022-10-31 18:50 ` Zev Weiss 2022-10-27 18:54 ` [PATCH 2/3] dt-bindings: regulator: Add regulator-output binding Mark Brown 2022-10-27 18:54 ` Mark Brown 2022-09-25 22:03 ` [PATCH 3/3] regulator: userspace-consumer: Handle regulator-output DT nodes Zev Weiss 2022-09-25 22:03 ` Zev Weiss 2022-09-29 6:29 ` [PATCH 0/3] regulator: Add DT support for regulator-output connectors Patrick Rudolph 2022-09-29 6:29 ` Patrick Rudolph
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220925220319.12572-1-zev@bewilderbeest.net \ --to=zev@bewilderbeest.net \ --cc=broonie@kernel.org \ --cc=devicetree@vger.kernel.org \ --cc=krzysztof.kozlowski+dt@linaro.org \ --cc=ldewangan@nvidia.com \ --cc=lgirdwood@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=naresh.solanki@9elements.com \ --cc=openbmc@lists.ozlabs.org \ --cc=patrick.rudolph@9elements.com \ --cc=robh+dt@kernel.org \ --cc=rppt@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.