apm-tosa-suspendfix: tosa-specific suspend w/around
authorDmitry Baryshkov <dbaryshkov@gmail.com>
Tue, 2 Dec 2008 15:57:17 +0000 (18:57 +0300)
committerDmitry Baryshkov <dbaryshkov@gmail.com>
Thu, 4 Dec 2008 13:58:48 +0000 (16:58 +0300)
add tosa-specific suspend workaround, that will unbind ohci-hcd
before entering suspend and rebind it again after resuming.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
packages/apmd/apm-tosa-suspendfix_0.1.bb [new file with mode: 0644]
packages/apmd/files/50-tmio-ohci-unbind [new file with mode: 0644]

diff --git a/packages/apmd/apm-tosa-suspendfix_0.1.bb b/packages/apmd/apm-tosa-suspendfix_0.1.bb
new file mode 100644 (file)
index 0000000..ad223c1
--- /dev/null
@@ -0,0 +1,10 @@
+DESCRIPTION = "Workaround for bug 2134 (Tosa Angstrom x11 image suspend/resume failure)"
+AUTHOR = "Dmitry Baryshkov"
+PR = "r0"
+
+SRC_URI = "file://50-tmio-ohci-unbind"
+
+do_install() {
+       install -d ${D}${sysconfdir}/apm/event.d
+       install -m 0755 ${WORKDIR}/50-tmio-ohci-unbind ${D}${sysconfdir}/apm/event.d
+}
diff --git a/packages/apmd/files/50-tmio-ohci-unbind b/packages/apmd/files/50-tmio-ohci-unbind
new file mode 100644 (file)
index 0000000..f65e0b3
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+TOPATH=/sys/bus/platform/drivers/tmio-ohci
+
+case "$1" in
+       suspend)
+               if [ -d $TOPATH ]
+               then
+                       echo -n tmio-ohci >  $TOPATH/unbind
+               fi
+               ;;
+       resume)
+               if [ -d $TOPATH ]
+               then
+                       echo -n tmio-ohci >  $TOPATH/bind
+               fi
+               ;;
+esac
+