Loading drivers/power/qpnp-fg-gen3.c +11 −2 Original line number Diff line number Diff line Loading @@ -816,7 +816,7 @@ static int fg_get_prop_capacity(struct fg_chip *chip, int *val) return 0; } if (chip->battery_missing) { if (chip->battery_missing || !chip->soc_reporting_ready) { *val = BATT_MISS_SOC; return 0; } Loading Loading @@ -2161,6 +2161,11 @@ static void status_change_work(struct work_struct *work) goto out; } if (!chip->soc_reporting_ready) { fg_dbg(chip, FG_STATUS, "Profile load is not complete yet\n"); goto out; } rc = power_supply_get_property(chip->batt_psy, POWER_SUPPLY_PROP_STATUS, &prop); if (rc < 0) { Loading Loading @@ -2227,7 +2232,7 @@ static void status_change_work(struct work_struct *work) fg_batt_avg_update(chip); out: fg_dbg(chip, FG_POWER_SUPPLY, "charge_status:%d charge_type:%d charge_done:%d\n", fg_dbg(chip, FG_STATUS, "charge_status:%d charge_type:%d charge_done:%d\n", chip->charge_status, chip->charge_type, chip->charge_done); pm_relax(chip->dev); } Loading Loading @@ -2623,6 +2628,10 @@ done: out: chip->soc_reporting_ready = true; vote(chip->awake_votable, PROFILE_LOAD, false, 0); if (!work_pending(&chip->status_change_work)) { pm_stay_awake(chip->dev); schedule_work(&chip->status_change_work); } } static void sram_dump_work(struct work_struct *work) Loading Loading
drivers/power/qpnp-fg-gen3.c +11 −2 Original line number Diff line number Diff line Loading @@ -816,7 +816,7 @@ static int fg_get_prop_capacity(struct fg_chip *chip, int *val) return 0; } if (chip->battery_missing) { if (chip->battery_missing || !chip->soc_reporting_ready) { *val = BATT_MISS_SOC; return 0; } Loading Loading @@ -2161,6 +2161,11 @@ static void status_change_work(struct work_struct *work) goto out; } if (!chip->soc_reporting_ready) { fg_dbg(chip, FG_STATUS, "Profile load is not complete yet\n"); goto out; } rc = power_supply_get_property(chip->batt_psy, POWER_SUPPLY_PROP_STATUS, &prop); if (rc < 0) { Loading Loading @@ -2227,7 +2232,7 @@ static void status_change_work(struct work_struct *work) fg_batt_avg_update(chip); out: fg_dbg(chip, FG_POWER_SUPPLY, "charge_status:%d charge_type:%d charge_done:%d\n", fg_dbg(chip, FG_STATUS, "charge_status:%d charge_type:%d charge_done:%d\n", chip->charge_status, chip->charge_type, chip->charge_done); pm_relax(chip->dev); } Loading Loading @@ -2623,6 +2628,10 @@ done: out: chip->soc_reporting_ready = true; vote(chip->awake_votable, PROFILE_LOAD, false, 0); if (!work_pending(&chip->status_change_work)) { pm_stay_awake(chip->dev); schedule_work(&chip->status_change_work); } } static void sram_dump_work(struct work_struct *work) Loading