e76f4df119
Based on Minecrell work at: https://gitlab.com/Minecrell/pmaports/-/tree/alcatel-idol347-downstream adapted smb1360 shared patches for idol347 downstream tree, and added his idol347-like-mainline.patch gist which changes downstream DT to mimic sane mainline settings for easy battery driver dump comparison.
13 lines
547 B
Diff
13 lines
547 B
Diff
diff --git a/drivers/power/idol347/smb1360-charger-fg.c b/drivers/power/idol347/smb1360-charger-fg.c
|
|
index bc8859cd9a2..5ae109b9ff2 100644
|
|
--- a/drivers/power/idol347/smb1360-charger-fg.c
|
|
+++ b/drivers/power/idol347/smb1360-charger-fg.c
|
|
@@ -3408,7 +3408,7 @@ disable_access:
|
|
|
|
if (chip->soc_min != -EINVAL) {
|
|
if (is_between(chip->soc_min, 0, 100)) {
|
|
- reg = DIV_ROUND_UP(chip->soc_min * MAX_8_BITS,
|
|
+ reg = DIV_ROUND_CLOSEST(chip->soc_min * MAX_8_BITS,
|
|
100);
|
|
pr_debug("soc_min=%d reg=%x\n",
|
|
chip->soc_min, reg);
|