mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 15:13:44 -04:00
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>
This commit is contained in:
committed by
Sebastian Reichel
parent
c517d838eb
commit
cc6405667c
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user