aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorOleksandr Kozaruk <oleksandr.kozaruk@ti.com>2012-02-15 16:23:21 -0600
committerZiyann <jaraidaniel@gmail.com>2014-10-01 13:00:23 +0200
commit2cc594db93466e75bc363fce116eac0fd591fd74 (patch)
tree84d0c57e71ee6ab20a18c4ce969a17c8d25daba6 /drivers
parent19edbf1c40b86e873c51004ae643235ab9db2296 (diff)
downloadkernel_samsung_tuna-2cc594db93466e75bc363fce116eac0fd591fd74.zip
kernel_samsung_tuna-2cc594db93466e75bc363fce116eac0fd591fd74.tar.gz
kernel_samsung_tuna-2cc594db93466e75bc363fce116eac0fd591fd74.tar.bz2
OMAP4: battery: select battery ADC channel.
When channels for GPADC read was selected, by mistake battery channel 7 for twl6030 was omitted. That lead to incorrect battery voltage readings and battery capacity indication. Change-Id: I84e0b04ef10d7e5aafd5bd376438f8fdae1fd37b Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/power/twl6030_bci_battery.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/power/twl6030_bci_battery.c b/drivers/power/twl6030_bci_battery.c
index 852c90b..d90cde1 100644
--- a/drivers/power/twl6030_bci_battery.c
+++ b/drivers/power/twl6030_bci_battery.c
@@ -1608,13 +1608,11 @@ static void twl6030_bci_battery_work(struct work_struct *work)
if (di->charge_status == POWER_SUPPLY_STATUS_CHARGING)
twl6030_set_watchdog(di, di->watchdog_duration);
- if (di->features & TWL6032_SUBCLASS) {
- req.channels = (1 << 1) | (1 << 18) | (1 << 8);
+ if (di->features & TWL6032_SUBCLASS)
req.method = TWL6032_GPADC_SW2;
- } else {
- req.channels = (1 << 1) | (1 << 1) | (1 << 8);
+ else
req.method = TWL6030_GPADC_SW2;
- }
+ req.channels = (1 << 1) | (1 << di->gpadc_vbat_chnl) | (1 << 8);
req.active = 0;
req.func_cb = NULL;