summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorYauhen Kharuzhy <jekhor@gmail.com>2021-11-07 23:20:01 +0300
committerSebastian Reichel <sre@kernel.org>2021-11-15 17:09:54 +0300
commit80211be1b9dec04cc2805d3d81e2091ecac289a1 (patch)
tree7105f90d87d033884e311abe7cef27cd54dd2bfe /drivers/power
parent51c7b6a0398f54b9120795796a4cff4fc9634f7d (diff)
downloadlinux-80211be1b9dec04cc2805d3d81e2091ecac289a1.tar.xz
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>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/bq25890_charger.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/power/supply/bq25890_charger.c b/drivers/power/supply/bq25890_charger.c
index 34ec186a2e9a..b7eac5428083 100644
--- a/drivers/power/supply/bq25890_charger.c
+++ b/drivers/power/supply/bq25890_charger.c
@@ -581,12 +581,12 @@ static irqreturn_t __bq25890_handle_irq(struct bq25890_device *bq)
if (!new_state.online && bq->state.online) { /* power removed */
/* disable ADC */
- ret = bq25890_field_write(bq, F_CONV_START, 0);
+ ret = bq25890_field_write(bq, F_CONV_RATE, 0);
if (ret < 0)
goto error;
} else if (new_state.online && !bq->state.online) { /* power inserted */
/* enable ADC, to have control of charge current/voltage */
- ret = bq25890_field_write(bq, F_CONV_START, 1);
+ ret = bq25890_field_write(bq, F_CONV_RATE, 1);
if (ret < 0)
goto error;
}