2019-06-20 21:05:55 +00:00
|
|
|
From 803cb62a1861bf76e65b17f559ab1bbf4970ce9b Mon Sep 17 00:00:00 2001
|
2019-02-09 18:46:43 +00:00
|
|
|
From: Sergey Larin <cerg2010cerg2010@mail.ru>
|
|
|
|
Date: Sat, 9 Feb 2019 19:00:23 +0300
|
2019-02-24 19:33:39 +00:00
|
|
|
Subject: [PATCH] power: supply: max17040: Set initial RCOMP value
|
2019-02-09 18:46:43 +00:00
|
|
|
|
|
|
|
This should fix incorrect capacity reporting.
|
|
|
|
|
|
|
|
Signed-off-by: Sergey Larin <cerg2010cerg2010@mail.ru>
|
|
|
|
---
|
|
|
|
drivers/power/supply/max17040_battery.c | 1 +
|
|
|
|
1 file changed, 1 insertion(+)
|
|
|
|
|
|
|
|
diff --git a/drivers/power/supply/max17040_battery.c b/drivers/power/supply/max17040_battery.c
|
|
|
|
index de5e791e0055..dd75c8045ff1 100644
|
|
|
|
--- a/drivers/power/supply/max17040_battery.c
|
|
|
|
+++ b/drivers/power/supply/max17040_battery.c
|
|
|
|
@@ -219,6 +219,7 @@ static int max17040_probe(struct i2c_client *client,
|
|
|
|
|
|
|
|
max17040_reset(client);
|
|
|
|
max17040_get_version(client);
|
|
|
|
+ max17040_write_reg(client, MAX17040_RCOMP, 0xff00);
|
|
|
|
|
|
|
|
INIT_DEFERRABLE_WORK(&chip->work, max17040_work);
|
|
|
|
queue_delayed_work(system_power_efficient_wq, &chip->work,
|
|
|
|
--
|
2019-06-20 21:05:55 +00:00
|
|
|
2.22.0
|
2019-02-09 18:46:43 +00:00
|
|
|
|