Skip to content

Commit

Permalink
power: ltc2941-battery-gauge: Fix typo in conversion formula (58 inst…
Browse files Browse the repository at this point in the history
…ead 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>
  • Loading branch information
Mike Looijmans authored and Sebastian Reichel committed Feb 25, 2015
1 parent c517d83 commit cc64056
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/power/ltc2941-battery-gauge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit cc64056

Please sign in to comment.