summaryrefslogtreecommitdiff
path: root/drivers/power/ltc2941-battery-gauge.c
diff options
context:
space:
mode:
authorMike Looijmans <mike.looijmans@topic.nl>2015-02-11 14:36:51 +0300
committerSebastian Reichel <sre@kernel.org>2015-02-25 22:35:29 +0300
commit4bf828cf0f4d320969e6090428f98be13c1f042e (patch)
tree1f24580d4a42f9efaca5f869f62232e2fec0991e /drivers/power/ltc2941-battery-gauge.c
parentc517d838eb7d07bbe9507871fab3931deccff539 (diff)
downloadlinux-4bf828cf0f4d320969e6090428f98be13c1f042e.tar.xz
power: ltc2941-battery-gauge: Fix typo in conversion formula (58 instead of 85)
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>
Diffstat (limited to 'drivers/power/ltc2941-battery-gauge.c')
-rw-r--r--drivers/power/ltc2941-battery-gauge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/ltc2941-battery-gauge.c b/drivers/power/ltc2941-battery-gauge.c
index e31c927a6d16..50c5d89dcef3 100644
--- 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));
}