Commit 8dd33e98 authored by Angus Ainslie's avatar Angus Ainslie Committed by Martin Kepplinger
Browse files

power: bq25890: Display battery charge faults

Log state changes for charge faults.
Signed-off-by: default avatarAngus Ainslie <>
parent 38cb11e5
......@@ -641,6 +641,17 @@ static irqreturn_t __bq25890_handle_irq(struct bq25890_device *bq)
if (!memcmp(&bq->state, &new_state, sizeof(new_state)))
return IRQ_NONE;
if (new_state.chrg_fault != bq->state.chrg_fault) {
if (new_state.chrg_fault)
"Charge fault - new fault old: %d new: %d\n",
bq->state.chrg_fault, new_state.chrg_fault);
"Charge fault - fault cleared old: %d new: %d\n",
bq->state.chrg_fault, new_state.chrg_fault);
if (! && bq-> { /* power removed */
/* disable ADC */
ret = bq25890_field_write(bq, F_CONV_RATE, 0);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment