projects
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65329e6
)
gta01: when charging the current reported should be negative
author
Paul Fertser
<fercerpav@gmail.com>
Thu, 27 Aug 2009 08:19:12 +0000
(12:19 +0400)
committer
Paul Fertser
<fercerpav@gmail.com>
Tue, 1 Sep 2009 20:50:41 +0000
(
00:50
+0400)
Reported-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
arch/arm/mach-s3c2410/mach-gta01.c
patch
|
blob
|
history
diff --git
a/arch/arm/mach-s3c2410/mach-gta01.c
b/arch/arm/mach-s3c2410/mach-gta01.c
index
1021ff5
..
8a13a4a
100644
(file)
--- a/
arch/arm/mach-s3c2410/mach-gta01.c
+++ b/
arch/arm/mach-s3c2410/mach-gta01.c
@@
-248,7
+248,7
@@
static int gta01_bat_get_current(void)
adc_battvolt = pcf50606_adc_sync_read(pcf, PCF50606_ADCMUX_BATVOLT_SUBTR);
adc_adcin1 = pcf50606_adc_sync_read(pcf, PCF50606_ADCMUX_ADCIN1_SUBTR);
- res = (adc_
adcin1 - adc_battvolt
) * 2400;
+ res = (adc_
battvolt - adc_adcin1
) * 2400;
/*rsense is 220 milli */
return (res * 1000) / (220 * 1024) * 1000;