projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c517d83
)
power: ltc2941-battery-gauge: Fix typo in conversion formula (58 instead of 85)
author
Mike Looijmans
<mike.looijmans@topic.nl>
Wed, 11 Feb 2015 11:36:51 +0000
(12:36 +0100)
committer
Sebastian Reichel
<sre@kernel.org>
Wed, 25 Feb 2015 19:35:29 +0000
(20:35 +0100)
The driver reported 30% less than actually measured. This turned out to
be caused by a simple typo in the formula to calculate the LSB quantity.
Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/ltc2941-battery-gauge.c
patch
|
blob
|
history
diff --git
a/drivers/power/ltc2941-battery-gauge.c
b/drivers/power/ltc2941-battery-gauge.c
index e31c927a6d1611a514c245554a99ff6daa2ada9d..50c5d89dcef3c622f93a10afae8b48267476b30f 100644
(file)
--- a/
drivers/power/ltc2941-battery-gauge.c
+++ b/
drivers/power/ltc2941-battery-gauge.c
@@
-440,7
+440,7
@@
static int ltc294x_i2c_probe(struct i2c_client *client,
} else {
if (prescaler_exp > LTC2941_MAX_PRESCALER_EXP)
prescaler_exp = LTC2941_MAX_PRESCALER_EXP;
- info->Qlsb = ((
58
* 50000) / r_sense) /
+ info->Qlsb = ((
85
* 50000) / r_sense) /
(128 / (1 << prescaler_exp));
}