power: supply: bq25890: Factor out regulator registration code
authorMarek Vasut <marex@denx.de>
Fri, 14 Oct 2022 17:24:25 +0000 (19:24 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 28 Oct 2022 23:40:31 +0000 (01:40 +0200)
commit5f5c10ecaf3fdeba9b2b0af5301977420c2c4df0
treeff505a5b8cf5190d7b331bf4ee7aec853c4fb2b5
parentb63e60ebb3fb071a96667307b1e129ccac76ce6b
power: supply: bq25890: Factor out regulator registration code

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>
drivers/power/supply/bq25890_charger.c