Skip to content

Commit 80211be

Browse files
jekhorsre
authored andcommitted
power: bq25890: Enable continuous conversion for ADC at charging
Instead of one shot run of ADC at beginning of charging, run continuous conversion to ensure that all charging-related values are monitored properly (input voltage, input current, themperature etc.). Signed-off-by: Yauhen Kharuzhy <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 51c7b6a commit 80211be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/power/supply/bq25890_charger.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,12 +581,12 @@ static irqreturn_t __bq25890_handle_irq(struct bq25890_device *bq)
581581

582582
if (!new_state.online && bq->state.online) { /* power removed */
583583
/* disable ADC */
584-
ret = bq25890_field_write(bq, F_CONV_START, 0);
584+
ret = bq25890_field_write(bq, F_CONV_RATE, 0);
585585
if (ret < 0)
586586
goto error;
587587
} else if (new_state.online && !bq->state.online) { /* power inserted */
588588
/* enable ADC, to have control of charge current/voltage */
589-
ret = bq25890_field_write(bq, F_CONV_START, 1);
589+
ret = bq25890_field_write(bq, F_CONV_RATE, 1);
590590
if (ret < 0)
591591
goto error;
592592
}

0 commit comments

Comments
 (0)