diff options
| author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-08-25 15:30:49 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-08-25 15:30:49 -0700 |
| commit | cac55e7f09a17f7c6344b587302ffddf0d586c7e (patch) | |
| tree | 37d74c02adc72311279f119eb5937ca4df6476b2 | |
| parent | 62fddf01a47bd0086b3391047789603913b7a4a7 (diff) | |
| parent | 7ade27b01780801c677cc1b737d8a631fe89a155 (diff) | |
Merge "qpnp-qnovo: fix ptrain done handler"
| -rw-r--r-- | drivers/power/supply/qcom/qpnp-qnovo.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/power/supply/qcom/qpnp-qnovo.c b/drivers/power/supply/qcom/qpnp-qnovo.c index cb34d73979ff..53af3415ec6a 100644 --- a/drivers/power/supply/qcom/qpnp-qnovo.c +++ b/drivers/power/supply/qcom/qpnp-qnovo.c @@ -1423,16 +1423,7 @@ static irqreturn_t handle_ptrain_done(int irq, void *data) struct qnovo *chip = data; union power_supply_propval pval = {0}; - /* - * In some cases (esp shutting down) the userspace would disable by - * setting qnovo_enable=0. Also charger could be removed or there is - * an error (i.e. its not okay to run qnovo)- - * skip taking ESR measurement in such situations - */ - - if (get_client_vote(chip->disable_votable, USER_VOTER) - || get_effective_result(chip->not_ok_to_qnovo_votable) > 0) - return IRQ_HANDLED; + qnovo_update_status(chip); /* * hw resets pt_en bit once ptrain_done triggers. @@ -1443,13 +1434,14 @@ static irqreturn_t handle_ptrain_done(int irq, void *data) vote(chip->pt_dis_votable, QNI_PT_VOTER, true, 0); vote(chip->pt_dis_votable, ESR_VOTER, true, 0); - if (is_fg_available(chip)) + if (is_fg_available(chip) + && !get_client_vote(chip->disable_votable, USER_VOTER) + && !get_effective_result(chip->not_ok_to_qnovo_votable)) power_supply_set_property(chip->bms_psy, POWER_SUPPLY_PROP_RESISTANCE, &pval); vote(chip->pt_dis_votable, ESR_VOTER, false, 0); - qnovo_update_status(chip); kobject_uevent(&chip->dev->kobj, KOBJ_CHANGE); return IRQ_HANDLED; } |
