Skip to content

Commit 571650b

Browse files
jwrdegoedesre
authored andcommitted
power: supply: bq25890: Only use pdata->regulator_init_data for vbus
bq25890_platform_data.regulator_init_data is intended to only provide regulator init_data for the vbus regulator. Remove this from the regulator_config before registering the vsys regulator. Otherwise the regulator_register() call for vsys will fail because it tries to register duplicate consumer_dev_name + supply names from init_data->consumer_supplies[], leading to the entire probe of the bq25890 driver failing: [ 32.017501] bq25890-charger i2c-bq25892_main: Failed to set supply vbus [ 32.017525] bq25890-charger i2c-bq25892_main: error -EBUSY: registering vsys regulator [ 32.124978] bq25890-charger: probe of i2c-bq25892_main failed with error -16 Fixes: 14a3d15 ("power: supply: bq25890: Add Vsys regulator") Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent c4d3338 commit 571650b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/power/supply/bq25890_charger.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,8 @@ static int bq25890_register_regulator(struct bq25890_device *bq)
11611161
"registering vbus regulator");
11621162
}
11631163

1164+
/* pdata->regulator_init_data is for vbus only */
1165+
cfg.init_data = NULL;
11641166
reg = devm_regulator_register(bq->dev, &bq25890_vsys_desc, &cfg);
11651167
if (IS_ERR(reg)) {
11661168
return dev_err_probe(bq->dev, PTR_ERR(reg),

0 commit comments

Comments
 (0)