]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: bq25890: Factor out regulator registration code
authorMarek Vasut <marex@denx.de>
Fri, 14 Oct 2022 17:24:25 +0000 (19:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:45 +0000 (13:32 +0100)
commitbcd089c69eb62bd639679be562f6d2926efd0a73
tree89f7fbffb36487abf07e9f0565f31529dd350c19
parentcd9afbf09ae79af957af773e29b1d25a5be7a0e9
power: supply: bq25890: Factor out regulator registration code

[ Upstream commit 5f5c10ecaf3fdeba9b2b0af5301977420c2c4df0 ]

Pull the regulator registration code into separate function, so it can
be extended to register more regulators later. Currently this is only
moving ifdeffery into one place and other preparatory changes. The
dev_err_probe() output string is changed to explicitly list vbus
regulator failure, so that once more regulators are registered, it
would be clear which one failed.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Stable-dep-of: a7aaa80098d5 ("power: supply: bq25890: Ensure pump_express_work is cancelled on remove")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/power/supply/bq25890_charger.c