public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] battery: max17042: Fix temperature unit to milli centigrade.
@ 2013-10-25  4:53 Jonghwa Lee
  2013-10-25 23:17 ` Anton Vorontsov
  0 siblings, 1 reply; 8+ messages in thread
From: Jonghwa Lee @ 2013-10-25  4:53 UTC (permalink / raw)
  To: linux-pm; +Cc: anton, dwmw2, myungjoo.ham, cw00.choi, Jonghwa Lee

Standard temp node represents temperature of power supply class
in milli centigrade. So fix max17042 fuel gauge driver to follow
the standard. (deci-centigrade --> milli-centigrade)

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
---
 drivers/power/max17042_battery.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c
index d664ef5..892ecfc 100644
--- a/drivers/power/max17042_battery.c
+++ b/drivers/power/max17042_battery.c
@@ -220,9 +220,9 @@ static int max17042_get_property(struct power_supply *psy,
 			val->intval = (0x7fff & ~val->intval) + 1;
 			val->intval *= -1;
 		}
-		/* The value is converted into deci-centigrade scale */
+		/* The value is converted into milli-centigrade scale */
 		/* Units of LSB = 1 / 256 degree Celsius */
-		val->intval = val->intval * 10 / 256;
+		val->intval = val->intval * 1000 / 256;
 		break;
 	case POWER_SUPPLY_PROP_CURRENT_NOW:
 		if (chip->pdata->enable_current_sense) {
-- 
1.7.9.5


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

end of thread, other threads:[~2013-10-29  3:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-25  4:53 [PATCH] battery: max17042: Fix temperature unit to milli centigrade Jonghwa Lee
2013-10-25 23:17 ` Anton Vorontsov
2013-10-28  2:00   ` jonghwa3.lee
2013-10-28  5:27     ` [PATCH] power_supply: Fix documentation for TEMP_*ALERT* properties Anton Vorontsov
2013-10-28  6:22       ` jonghwa3.lee
2013-10-28  6:43         ` Anton Vorontsov
2013-10-28 17:20       ` Mark A. Greer
2013-10-29  3:13         ` Anton Vorontsov

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