提交 cc640566 编写于 作者: M Mike Looijmans 提交者: Sebastian Reichel

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: NMike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: NSebastian Reichel <sre@kernel.org>
上级 c517d838
...@@ -440,7 +440,7 @@ static int ltc294x_i2c_probe(struct i2c_client *client, ...@@ -440,7 +440,7 @@ static int ltc294x_i2c_probe(struct i2c_client *client,
} else { } else {
if (prescaler_exp > LTC2941_MAX_PRESCALER_EXP) if (prescaler_exp > LTC2941_MAX_PRESCALER_EXP)
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)); (128 / (1 << prescaler_exp));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册