[ar71xx] fix GPIO function select bit definitions (based on a patch by Jonas <jmajau...
[openwrt.git] / target / linux / s3c24xx / patches-2.6.26 / 1249-fix-no-discharging.patch.patch
1 From 8d2acef7c5d7179db19b3c8a0ae9ae4c152faaff Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Sun, 10 Aug 2008 09:16:04 +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.3
42
This page took 0.0410779999999999 seconds and 5 git commands to generate.