Author: titmuss
Date: Tue Feb 5 04:26:27 2008
New Revision: 1819
URL: http://svn.slimdevices.com?rev=1819&root=Jive&view=rev
Log:
[EMAIL PROTECTED] (orig r1814): titmuss | 2008-02-05 12:24:11 +0000
Bug: 6945
Description:
Always boot when AC power is available, even if the battery is missing.
Modified:
trunk/ (props changed)
trunk/squeezeboxJive/src/kernel-P7/linux-2.6.22/drivers/char/jive/jive_mgmt.c
Propchange: trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Tue Feb 5 04:26:27 2008
@@ -1,3 +1,3 @@
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1813
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1814
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378
Modified:
trunk/squeezeboxJive/src/kernel-P7/linux-2.6.22/drivers/char/jive/jive_mgmt.c
URL:
http://svn.slimdevices.com/trunk/squeezeboxJive/src/kernel-P7/linux-2.6.22/drivers/char/jive/jive_mgmt.c?rev=1819&root=Jive&r1=1818&r2=1819&view=diff
==============================================================================
---
trunk/squeezeboxJive/src/kernel-P7/linux-2.6.22/drivers/char/jive/jive_mgmt.c
(original)
+++
trunk/squeezeboxJive/src/kernel-P7/linux-2.6.22/drivers/char/jive/jive_mgmt.c
Tue Feb 5 04:26:27 2008
@@ -577,12 +577,21 @@
}
-/* Called from logo.c to determine if the battery is flat during boot */
+/* Called from logo.c to determine if the battery is flat during boot.
+ * Note this is called before jive_mgmt_init.
+ */
bool jive_is_battery_flat(void) {
- int bat = get_battery();
- battery_flat = (bat < BATTERY_FLAT_LEVEL);
-
- printk("battery flat? %s (level=%d)\n", battery_flat?"yes":"no", bat);
+ int bat, nacpr;
+
+ bat = get_battery();
+
+ s3c2410_gpio_cfgpin(S3C2410_GPG3, S3C2410_GPG3_INP);
+ s3c2410_gpio_pullup(S3C2410_GPG3, 1);
+ nacpr = (s3c2410_gpio_getpin(S3C2410_GPG3) > 0);
+
+ battery_flat = (bat < BATTERY_FLAT_LEVEL) && nacpr;
+
+ printk("battery flat? %s (level=%d nacpr=%d)\n",
battery_flat?"yes":"no", bat, nacpr);
return battery_flat;
}
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins