summaryrefslogtreecommitdiff
path: root/target/linux/s3c24xx/patches-2.6.24/1270-fix-no-discharging.patch.patch
diff options
context:
space:
mode:
authorMirko Vogt <mirko@openwrt.org>2008-12-12 11:58:53 +0000
committerMirko Vogt <mirko@openwrt.org>2008-12-12 11:58:53 +0000
commit614683faf8029100802db06a825648d0b6490285 (patch)
tree7401b135dc7ce24ff0175e67e0f2ce7f96296ff0 /target/linux/s3c24xx/patches-2.6.24/1270-fix-no-discharging.patch.patch
parent4a018d2445c5f249179ff82c8fffb0e3b717f738 (diff)
downloadmtk-20170518-614683faf8029100802db06a825648d0b6490285.zip
mtk-20170518-614683faf8029100802db06a825648d0b6490285.tar.gz
mtk-20170518-614683faf8029100802db06a825648d0b6490285.tar.bz2
changed Makefile and profiles, added patches for kernel 2.6.24 (stable-branch of Openmoko)
SVN-Revision: 13613
Diffstat (limited to 'target/linux/s3c24xx/patches-2.6.24/1270-fix-no-discharging.patch.patch')
-rw-r--r--target/linux/s3c24xx/patches-2.6.24/1270-fix-no-discharging.patch.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/target/linux/s3c24xx/patches-2.6.24/1270-fix-no-discharging.patch.patch b/target/linux/s3c24xx/patches-2.6.24/1270-fix-no-discharging.patch.patch
new file mode 100644
index 0000000..5d878c2
--- /dev/null
+++ b/target/linux/s3c24xx/patches-2.6.24/1270-fix-no-discharging.patch.patch
@@ -0,0 +1,42 @@
+From 2438a8c74c495c95f5b78301a44ed8e8d0b267d5 Mon Sep 17 00:00:00 2001
+From: Andy Green <andy@openmoko.com>
+Date: Sat, 9 Aug 2008 09:43:32 +0100
+Subject: [PATCH] fix-no-discharging.patch
+
+We failed to report status of "discharging", instead reporting
+"not charging" even if we knew that the charger was not present.
+
+This patch corrects it and reports "discharging" when charger
+is absent.
+
+Signed-off-by: Andy Green <andy@openmoko.com>
+---
+ drivers/power/bq27000_battery.c | 10 +++++++++-
+ 1 files changed, 9 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/power/bq27000_battery.c b/drivers/power/bq27000_battery.c
+index 4c7e862..cd4968e 100644
+--- a/drivers/power/bq27000_battery.c
++++ b/drivers/power/bq27000_battery.c
+@@ -187,9 +187,17 @@ static int bq27000_battery_get_property(struct power_supply *psy,
+ val->intval = POWER_SUPPLY_STATUS_CHARGING;
+ break;
+ }
++ val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING;
++ break;
+ }
+
+- val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING;
++ /*
++ * platform provided definite indication of charger presence,
++ * and it is telling us it isn't there... but we are on so we
++ * must be running from battery --->
++ */
++
++ val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
+ break;
+
+ use_bat:
+--
+1.5.6.5
+