summaryrefslogtreecommitdiff
path: root/Documentation/power
diff options
context:
space:
mode:
authorBiju Das <biju.das.jz@bp.renesas.com>2024-06-16 11:53:55 +0100
committerMark Brown <broonie@kernel.org>2024-06-26 18:17:05 +0100
commit1cb7d29157603561af4c38535e936850ceb99f0f (patch)
tree32f6a232bd55180c80c317636403549141e2c2c4 /Documentation/power
parentf2661062f16b2de5d7b6a5c42a9a5c96326b8454 (diff)
regulator: core: Add helper for allow HW access to enable/disable regulator
Add a helper function that allow regulator consumers to allow low-level HW access, in order to enable/disable regulator in atomic context. The use-case for RZ/G2L SoC is to enable VBUS selection register based on vbus detection that happens in interrupt context. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://patch.msgid.link/20240616105402.45211-4-biju.das.jz@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation/power')
-rw-r--r--Documentation/power/regulator/consumer.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/power/regulator/consumer.rst b/Documentation/power/regulator/consumer.rst
index 85c2bf5ac07e..9d2416f63f6e 100644
--- a/Documentation/power/regulator/consumer.rst
+++ b/Documentation/power/regulator/consumer.rst
@@ -227,3 +227,9 @@ directly written to the voltage selector register, use::
int regulator_list_hardware_vsel(struct regulator *regulator,
unsigned selector);
+
+To access the hardware for enabling/disabling the regulator, consumers must
+use regulator_get_exclusive(), as it can't work if there's more than one
+consumer. To enable/disable regulator use::
+
+ int regulator_hardware_enable(struct regulator *regulator, bool enable);