aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorDima Zavin <dima@android.com>2011-06-22 11:04:02 -0700
committerDima Zavin <dima@android.com>2011-06-23 22:32:14 -0700
commit625c2920be45fdc6e8a8c78c581a8b339ffed694 (patch)
tree407bb3822c1aa8e8c0da280043e35df224e34246 /drivers/power
parent2549b8e91b0883f603660258d7845265247c8bd5 (diff)
downloadkernel_samsung_tuna-625c2920be45fdc6e8a8c78c581a8b339ffed694.zip
kernel_samsung_tuna-625c2920be45fdc6e8a8c78c581a8b339ffed694.tar.gz
kernel_samsung_tuna-625c2920be45fdc6e8a8c78c581a8b339ffed694.tar.bz2
power: max17040_battery: hw reports voltage in units of 1.25mV
Change-Id: Ib9ba81ca257a7ff2f97480b26642ca931ef42d92 Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/max17040_battery.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/max17040_battery.c b/drivers/power/max17040_battery.c
index 7b58121..0d6c06b 100644
--- a/drivers/power/max17040_battery.c
+++ b/drivers/power/max17040_battery.c
@@ -123,7 +123,7 @@ static void max17040_get_vcell(struct i2c_client *client)
msb = max17040_read_reg(client, MAX17040_VCELL_MSB);
lsb = max17040_read_reg(client, MAX17040_VCELL_LSB);
- chip->vcell = (msb << 4) + (lsb >> 4);
+ chip->vcell = ((msb << 4) + (lsb >> 4)) * 1250;
}
static void max17040_get_soc(struct i2c_client *client)