]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: core: Allow specifying an initial load w/ the bulk API
authorDouglas Anderson <dianders@chromium.org>
Tue, 26 Jul 2022 17:38:21 +0000 (10:38 -0700)
committerMark Brown <broonie@kernel.org>
Wed, 27 Jul 2022 12:47:29 +0000 (13:47 +0100)
commitb93d75fd5c82ddd6ea96f47819137acee4f348de
treed1899415ff06db6bbaa5329d51e2e9a81684435a
parentf040cca4b0da0180bf9de9141ef5c95f60f85182
regulator: core: Allow specifying an initial load w/ the bulk API

There are a number of drivers that follow a pattern that looks like
this:
1. Use the regulator bulk API to get a bunch of regulators.
2. Set the load on each of the regulators to use whenever the
   regulators are enabled.

Let's make this easier by just allowing the drivers to pass the load
in.

As part of this change we need to move the error printing in
regulator_bulk_get() around; let's switch to the new dev_err_probe()
to simplify it.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20220726103631.v2.4.Ie85f68215ada39f502a96dcb8a1f3ad977e3f68a@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c
include/linux/regulator/consumer.h