qcom: battery: fix taper entry handling
Move Taper entry check before charge enable check in "handle_main_charge_type" to make sure TAPER entry is handled properly. CRs-Fixed: 2001651 Change-Id: Id7c3f48b66ba8df20ca2be022565d8bf0e38379b Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
This commit is contained in:
parent
8bb83bb77e
commit
095a8e4246
1 changed files with 9 additions and 9 deletions
|
@ -501,15 +501,6 @@ static void handle_main_charge_type(struct pl_data *chip)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* handle fast/taper charge entry */
|
|
||||||
if (pval.intval == POWER_SUPPLY_CHARGE_TYPE_TAPER
|
|
||||||
|| pval.intval == POWER_SUPPLY_CHARGE_TYPE_FAST) {
|
|
||||||
pl_dbg(chip, PR_PARALLEL, "chg_state enabling parallel\n");
|
|
||||||
vote(chip->pl_disable_votable, CHG_STATE_VOTER, false, 0);
|
|
||||||
chip->charge_type = pval.intval;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* handle taper charge entry */
|
/* handle taper charge entry */
|
||||||
if (chip->charge_type == POWER_SUPPLY_CHARGE_TYPE_FAST
|
if (chip->charge_type == POWER_SUPPLY_CHARGE_TYPE_FAST
|
||||||
&& (pval.intval == POWER_SUPPLY_CHARGE_TYPE_TAPER)) {
|
&& (pval.intval == POWER_SUPPLY_CHARGE_TYPE_TAPER)) {
|
||||||
|
@ -519,6 +510,15 @@ static void handle_main_charge_type(struct pl_data *chip)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* handle fast/taper charge entry */
|
||||||
|
if (pval.intval == POWER_SUPPLY_CHARGE_TYPE_TAPER
|
||||||
|
|| pval.intval == POWER_SUPPLY_CHARGE_TYPE_FAST) {
|
||||||
|
pl_dbg(chip, PR_PARALLEL, "chg_state enabling parallel\n");
|
||||||
|
vote(chip->pl_disable_votable, CHG_STATE_VOTER, false, 0);
|
||||||
|
chip->charge_type = pval.intval;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* remember the new state only if it isn't any of the above */
|
/* remember the new state only if it isn't any of the above */
|
||||||
chip->charge_type = pval.intval;
|
chip->charge_type = pval.intval;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue