public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ltc2941-battery-gauge: Fix typo in conversion formula  (58 instead of 85)
@ 2015-02-11 11:36 Mike Looijmans
  2015-02-25 21:55 ` Sebastian Reichel
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Looijmans @ 2015-02-11 11:36 UTC (permalink / raw)
  To: sre; +Cc: linux-pm, linux-kernel, dbaryshkov, dwmw2, Mike Looijmans

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>
---
 drivers/power/ltc2941-battery-gauge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/ltc2941-battery-gauge.c b/drivers/power/ltc2941-battery-gauge.c
index e4a9c87..784ff0b 100644
--- a/drivers/power/ltc2941-battery-gauge.c
+++ b/drivers/power/ltc2941-battery-gauge.c
@@ -439,7 +439,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));
 	}
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ltc2941-battery-gauge: Fix typo in conversion formula (58 instead of 85)
  2015-02-11 11:36 [PATCH] ltc2941-battery-gauge: Fix typo in conversion formula (58 instead of 85) Mike Looijmans
@ 2015-02-25 21:55 ` Sebastian Reichel
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2015-02-25 21:55 UTC (permalink / raw)
  To: Mike Looijmans; +Cc: linux-pm, linux-kernel, dbaryshkov, dwmw2

[-- Attachment #1: Type: text/plain, Size: 342 bytes --]

Hi,

On Wed, Feb 11, 2015 at 12:36:51PM +0100, Mike Looijmans wrote:
> 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.

This is in my for-next queue since some time already and will be
send to Torvalds in my 4.0-rc pull request.

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-25 21:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-11 11:36 [PATCH] ltc2941-battery-gauge: Fix typo in conversion formula (58 instead of 85) Mike Looijmans
2015-02-25 21:55 ` Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox