charging:Modify regs dump

Modify regs dump when
it is alarm or fault.

Change-Id: I7fb5d0a69b4a1d6cc5ebb8d4359a0213e1c04a3c
Signed-off-by: wanggc6 <wanggc6@motorola.com>
Reviewed-on: https://gerrit.mot.com/2251533
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Wei Wei <weiweij@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
wanggc6 2022-04-24 20:18:22 +08:00
commit 7995bb686c

View file

@ -1324,13 +1324,16 @@ static irqreturn_t bq25980_irq_handler_thread(int irq, void *private)
else
bq->irq_counts++;
dump_all_reg(bq);
mutex_unlock(&bq->irq_complete);
ret = bq25980_get_state(bq, &state);
if (ret < 0)
goto irq_out;
if(bq->alarm_status.status > 0 ||
bq->fault_status.status > 0)
dump_all_reg(bq);
if (!bq25980_state_changed(bq, &state))
goto irq_out;