diff options
author | Huzefa N K <huzefank@ti.com> | 2011-12-02 17:08:05 -0600 |
---|---|---|
committer | Dan Murphy <dmurphy@ti.com> | 2011-12-06 13:28:33 -0600 |
commit | 3d0737d63bb6cfc9d9ce0ff853378de1f5d2140b (patch) | |
tree | 79c713a08ce1d4fb668d9ad717d08fcb1f34ef03 | |
parent | 888d9c14edd5ba5ff272b4e2b2e5c8532c7fa8e4 (diff) |
HACK: OMAP4: set 100% battery level when device is on ACandroid-3.0-4AI.4
If device is using the battery simulator set battery level
to 100%.
This is a HACK until the test scripts are updated to handle the
battery < 5% window on Android
Change-Id: Iee8e215e89514274636b745705b79f1ef019511d
Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
Acked-by: Akash Choudhari <akashc@ti.com>
Signed-off-by: Huzefa Kankroliwala <huzefank@ti.com>
-rw-r--r-- | drivers/power/twl6030_bci_battery.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/power/twl6030_bci_battery.c b/drivers/power/twl6030_bci_battery.c index 2720bd2947d..a26ecfdb2e3 100644 --- a/drivers/power/twl6030_bci_battery.c +++ b/drivers/power/twl6030_bci_battery.c @@ -1053,6 +1053,11 @@ static int capacity_changed(struct twl6030_bci_device_info *di) twl6030_start_usb_charger(di); } + /* if battery is not present we assume it is on battery simulator and + * current capacity is set to 100% + */ + if (!is_battery_present()) + curr_capacity = 100; /* Debouncing of voltage change. */ if (curr_capacity != di->capacity) |