aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/s3c24xx/patches-2.6.26/1057-fix-pcf50606-LOWBAT-kill-init.patch.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-03-14 15:52:42 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-03-14 15:52:42 +0000
commit16defbb2bd9478f9e5384b9722f20a694e6bae41 (patch)
treef52e202c30c7fca103b196ece1223e18446e4dfc /target/linux/s3c24xx/patches-2.6.26/1057-fix-pcf50606-LOWBAT-kill-init.patch.patch
parentb4644aedce6526b5d07b336187c8e6417c7dd75e (diff)
downloadupstream-16defbb2bd9478f9e5384b9722f20a694e6bae41.tar.gz
upstream-16defbb2bd9478f9e5384b9722f20a694e6bae41.tar.bz2
upstream-16defbb2bd9478f9e5384b9722f20a694e6bae41.zip
nuke obsolete kernel stuff
SVN-Revision: 14875
Diffstat (limited to 'target/linux/s3c24xx/patches-2.6.26/1057-fix-pcf50606-LOWBAT-kill-init.patch.patch')
-rwxr-xr-xtarget/linux/s3c24xx/patches-2.6.26/1057-fix-pcf50606-LOWBAT-kill-init.patch.patch83
1 files changed, 0 insertions, 83 deletions
diff --git a/target/linux/s3c24xx/patches-2.6.26/1057-fix-pcf50606-LOWBAT-kill-init.patch.patch b/target/linux/s3c24xx/patches-2.6.26/1057-fix-pcf50606-LOWBAT-kill-init.patch.patch
deleted file mode 100755
index 13945f56b7..0000000000
--- a/target/linux/s3c24xx/patches-2.6.26/1057-fix-pcf50606-LOWBAT-kill-init.patch.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 835002d2e751c0d35b744ceec5bef726b9778b7b Mon Sep 17 00:00:00 2001
-From: mokopatches <mokopatches@openmoko.org>
-Date: Fri, 25 Jul 2008 22:21:25 +0100
-Subject: [PATCH] fix-pcf50606-LOWBAT-kill-init.patch
-
----
- drivers/i2c/chips/pcf50606.c | 53 ++++++++++++++++++++++++++++++++++++-----
- 1 files changed, 46 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/i2c/chips/pcf50606.c b/drivers/i2c/chips/pcf50606.c
-index b530583..a1c92d3 100644
---- a/drivers/i2c/chips/pcf50606.c
-+++ b/drivers/i2c/chips/pcf50606.c
-@@ -654,8 +654,20 @@ static void pcf50606_work(struct work_struct *work)
- if (pcf->onkey_seconds >=
- pcf->pdata->onkey_seconds_required) {
- /* Ask init to do 'ctrlaltdel' */
-- DEBUGPC("SIGINT(init) ");
-- kill_proc(1, SIGINT, 1);
-+ /*
-+ * currently Linux reacts badly to issuing a
-+ * signal to PID #1 before init is started.
-+ * What happens is that the next kernel thread
-+ * to start, which is the JFFS2 Garbage
-+ * collector in our case, gets the signal
-+ * instead and proceeds to fail to fork --
-+ * which is very bad. Therefore we confirm
-+ * PID #1 exists before issuing the signal
-+ */
-+ if (find_task_by_pid(1)) {
-+ kill_proc(1, SIGINT, 1);
-+ DEBUGPC("SIGINT(init) ");
-+ }
- /* FIXME: what to do if userspace doesn't
- * shut down? Do we want to force it? */
- }
-@@ -749,11 +761,38 @@ static void pcf50606_work(struct work_struct *work)
- }
- /* FIXME: TSCPRES */
- if (pcfirq[2] & PCF50606_INT3_LOWBAT) {
-- /* Really low battery voltage, we have 8 seconds left */
-- DEBUGPC("LOWBAT ");
-- apm_queue_event(APM_LOW_BATTERY);
-- DEBUGPC("SIGPWR(init) ");
-- kill_proc(1, SIGPWR, 1);
-+ if (__reg_read(pcf, PCF50606_REG_OOCS) & PCF50606_OOCS_EXTON) {
-+ /*
-+ * hey no need to freak out, we have some kind of
-+ * valid charger power
-+ */
-+ DEBUGPC("(NO)BAT ");
-+ } else {
-+ /* Really low battery voltage, we have 8 seconds left */
-+ DEBUGPC("LOWBAT ");
-+ /*
-+ * currently Linux reacts badly to issuing a signal to
-+ * PID #1 before init is started. What happens is that
-+ * the next kernel thread to start, which is the JFFS2
-+ * Garbage collector in our case, gets the signal
-+ * instead and proceeds to fail to fork -- which is
-+ * very bad. Therefore we confirm PID #1 exists
-+ * before issuing SPIGPWR
-+ */
-+ if (find_task_by_pid(1)) {
-+ apm_queue_event(APM_LOW_BATTERY);
-+ DEBUGPC("SIGPWR(init) ");
-+ kill_proc(1, SIGPWR, 1);
-+ } else
-+ /*
-+ * well, our situation is like this: we do not
-+ * have any external power, we have a low
-+ * battery and since PID #1 doesn't exist yet,
-+ * we are early in the boot, likely before
-+ * rootfs mount. We should just call it a day
-+ */
-+ apm_queue_event(APM_CRITICAL_SUSPEND);
-+ }
- /* Tell PMU we are taking care of this */
- reg_set_bit_mask(pcf, PCF50606_REG_OOCC1,
- PCF50606_OOCC1_TOTRST,
---
-1.5.6.3
-