[ar71xx] preliminary support for the Ubiquiti RouterStation Pro
[openwrt.git] / target / linux / s3c24xx / patches-2.6.24 / 1270-fix-no-discharging.patch.patch
1 From 2438a8c74c495c95f5b78301a44ed8e8d0b267d5 Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Sat, 9 Aug 2008 09:43:32 +0100
4 Subject: [PATCH] fix-no-discharging.patch
5
6 We failed to report status of "discharging", instead reporting
7 "not charging" even if we knew that the charger was not present.
8
9 This patch corrects it and reports "discharging" when charger
10 is absent.
11
12 Signed-off-by: Andy Green <andy@openmoko.com>
13 ---
14 drivers/power/bq27000_battery.c | 10 +++++++++-
15 1 files changed, 9 insertions(+), 1 deletions(-)
16
17 diff --git a/drivers/power/bq27000_battery.c b/drivers/power/bq27000_battery.c
18 index 4c7e862..cd4968e 100644
19 --- a/drivers/power/bq27000_battery.c
20 +++ b/drivers/power/bq27000_battery.c
21 @@ -187,9 +187,17 @@ static int bq27000_battery_get_property(struct power_supply *psy,
22 val->intval = POWER_SUPPLY_STATUS_CHARGING;
23 break;
24 }
25 + val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING;
26 + break;
27 }
28
29 - val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING;
30 + /*
31 + * platform provided definite indication of charger presence,
32 + * and it is telling us it isn't there... but we are on so we
33 + * must be running from battery --->
34 + */
35 +
36 + val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
37 break;
38
39 use_bat:
40 --
41 1.5.6.5
42
This page took 0.050483 seconds and 5 git commands to generate.