mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
ab8500-fg: Use correct battery charge full design
If battery is not identified while fg probe, mah_max_design gets initialized with unknown battery's charge full design. Reinitialize mah_max_design if battery is identified after fg probe. Signed-off-by: Rajkumar Kasirajan <[email protected]> Signed-off-by: Lee Jones <[email protected]> Reviewed-by: Vijaya Kumar K-1 <[email protected]> Reviewed-by: Marcus COOPER <[email protected]> Reviewed-by: Olivier CLERGEAUD <[email protected]> Reviewed-by: Arun MURTHY <[email protected]> Reviewed-by: Rabin VINCENT <[email protected]> Tested-by: Rupesh KUMAR <[email protected]> Tested-by: Jonas ABERG <[email protected]>
This commit is contained in:
parent
3988043b0e
commit
1a793a1089
1 changed files with 2 additions and 1 deletions
|
|
@ -2250,7 +2250,8 @@ static int ab8500_fg_get_ext_psy_data(struct device *dev, void *data)
|
|||
case POWER_SUPPLY_PROP_TECHNOLOGY:
|
||||
switch (ext->type) {
|
||||
case POWER_SUPPLY_TYPE_BATTERY:
|
||||
if (!di->flags.batt_id_received) {
|
||||
if (!di->flags.batt_id_received &&
|
||||
di->bm->batt_id != BATTERY_UNKNOWN) {
|
||||
const struct abx500_battery_type *b;
|
||||
|
||||
b = &(di->bm->bat_type[di->bm->batt_id]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue