qpnp-qnovo: skip taking ESR measurement when disabled
Currently when ptrain_done interrupt is handled, the driver invariably issues a ESR measurement. This is not required if qnovo is disabled. Change-Id: I8c81dadc38da69ba7248905af2d772f7ce918239 Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
This commit is contained in:
parent
c4205fe6be
commit
fbd4949949
1 changed files with 11 additions and 0 deletions
|
@ -1395,6 +1395,17 @@ 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;
|
||||
|
||||
/*
|
||||
* hw resets pt_en bit once ptrain_done triggers.
|
||||
* vote on behalf of QNI to disable it such that
|
||||
|
|
Loading…
Add table
Reference in a new issue