[pkg-fso-commits] [SCM] linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko branch, stable, updated. upstream/20080808.git43620428-24-gca19d15
Andy Green
agreen at pads.home.warmcat.com
Mon Oct 20 09:46:24 UTC 2008
The following commit has been merged in the stable branch:
commit 2438a8c74c495c95f5b78301a44ed8e8d0b267d5
Author: Andy Green <andy at openmoko.com>
Date: Sat Aug 9 09:43:32 2008 +0100
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 at openmoko.com>
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:
--
linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko
More information about the pkg-fso-commits
mailing list