diff options
author | Paul Fertser <fercerpav@gmail.com> | 2009-07-05 22:53:25 +0400 |
---|---|---|
committer | Paul Fertser <fercerpav@gmail.com> | 2009-07-05 22:53:25 +0400 |
commit | 991a4b782728554b7274339e763a01b0905c1fe4 (patch) | |
tree | 6e249f2b1ef9a520a4f1baa90b035cc3f41a41e4 /arch | |
parent | d1c828aa7073b356207b967e394defb26ab4da82 (diff) |
GTA01: fix current and voltage reporting units
According to power_supply class specification all voltages and currents
must be reported in uV and uA correspondingly.
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-s3c2410/mach-gta01.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-s3c2410/mach-gta01.c b/arch/arm/mach-s3c2410/mach-gta01.c index 1fe3eef2257..1021ff5f2d5 100644 --- a/arch/arm/mach-s3c2410/mach-gta01.c +++ b/arch/arm/mach-s3c2410/mach-gta01.c @@ -237,7 +237,7 @@ static int gta01_bat_get_voltage(void) adc = pcf50606_adc_sync_read(pcf, PCF50606_ADCMUX_BATVOLT_RES); mv = (adc * 6000) / 1024; - return mv; + return mv * 1000; } static int gta01_bat_get_current(void) @@ -251,7 +251,7 @@ static int gta01_bat_get_current(void) res = (adc_adcin1 - adc_battvolt) * 2400; /*rsense is 220 milli */ - return (res * 1000) / (220 * 1024); + return (res * 1000) / (220 * 1024) * 1000; } static struct gta01_bat_platform_data gta01_bat_pdata = { |