Skip to content

Commit 4651b6b

Browse files
Hermes Zhangsre
authored andcommitted
power: supply: bq256xx: Init ichg/vbat value with chip default value
Init the ichg/vbat reg with chip default value instead of the max value used now. The max value set in driver will result an unsafe case (e.g. battery is over charging when in a hot environment) if no user space update the value later. Signed-off-by: Hermes Zhang <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent fccd2b7 commit 4651b6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/power/supply/bq256xx_charger.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,7 +1563,7 @@ static int bq256xx_hw_init(struct bq256xx_device *bq)
15631563
return ret;
15641564

15651565
ret = bq->chip_info->bq256xx_set_ichg(bq,
1566-
bat_info->constant_charge_current_max_ua);
1566+
bq->chip_info->bq256xx_def_ichg);
15671567
if (ret)
15681568
return ret;
15691569

@@ -1573,7 +1573,7 @@ static int bq256xx_hw_init(struct bq256xx_device *bq)
15731573
return ret;
15741574

15751575
ret = bq->chip_info->bq256xx_set_vbatreg(bq,
1576-
bat_info->constant_charge_voltage_max_uv);
1576+
bq->chip_info->bq256xx_def_vbatreg);
15771577
if (ret)
15781578
return ret;
15791579

0 commit comments

Comments
 (0)