Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <jekhor@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

authored by

Yauhen Kharuzhy and committed by
Sebastian Reichel
80211be1 51c7b6a0

+2 -2
+2 -2
drivers/power/supply/bq25890_charger.c
··· 581 581 582 582 if (!new_state.online && bq->state.online) { /* power removed */ 583 583 /* disable ADC */ 584 - ret = bq25890_field_write(bq, F_CONV_START, 0); 584 + ret = bq25890_field_write(bq, F_CONV_RATE, 0); 585 585 if (ret < 0) 586 586 goto error; 587 587 } else if (new_state.online && !bq->state.online) { /* power inserted */ 588 588 /* 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); 590 590 if (ret < 0) 591 591 goto error; 592 592 }