summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2018-12-17 20:28:15 +0100
committerSebastian Reichel <sebastian.reichel@collabora.com>2018-12-18 00:21:16 +0100
commit9580913966488dc78d8d2893c7427d0a84124e74 (patch)
treebeace7821db9972a2d835bd8eae3f8ec7dbbadf3
parentfb4d49448026bf1aee917426f74dc1f5342ba908 (diff)
downloadlinux-9580913966488dc78d8d2893c7427d0a84124e74.tar.bz2
power: supply: bq25890: fix BAT_COMP field definition
According to datasheet, BAT_COMP field spans bits 5-7. The rest of the code seems to assume this already. Fixes: 4aeae9cb0dad ("power_supply: Add support for TI BQ25890 charger chip") Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
-rw-r--r--drivers/power/supply/bq25890_charger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/bq25890_charger.c b/drivers/power/supply/bq25890_charger.c
index 70b90db5ae38..3f6fb49c956c 100644
--- a/drivers/power/supply/bq25890_charger.c
+++ b/drivers/power/supply/bq25890_charger.c
@@ -183,7 +183,7 @@ static const struct reg_field bq25890_reg_fields[] = {
[F_CHG_TMR] = REG_FIELD(0x07, 1, 2),
[F_JEITA_ISET] = REG_FIELD(0x07, 0, 0),
/* REG08 */
- [F_BATCMP] = REG_FIELD(0x08, 6, 7), // 5-7 on BQ25896
+ [F_BATCMP] = REG_FIELD(0x08, 5, 7),
[F_VCLAMP] = REG_FIELD(0x08, 2, 4),
[F_TREG] = REG_FIELD(0x08, 0, 1),
/* REG09 */