summaryrefslogtreecommitdiff
path: root/recipes-support/usb-suspend-resume/files/usb-resume.sh
diff options
context:
space:
mode:
authorSanchayan Maity <maitysanchayan@gmail.com>2016-03-03 19:49:15 +0530
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2016-03-14 14:26:27 +0100
commit4eb2bbe43a53d453787a2cf5a85a565345233705 (patch)
tree0cbcf6ac8c95cc1505a5a29176d8b7ff01db53fa /recipes-support/usb-suspend-resume/files/usb-resume.sh
parent21860b7990513471b84621b055c25473e9290307 (diff)
recipes-support: usb-suspend-resume: Add USB suspend resume fix for Vybrid
Add systemd service which utilises systemd's suspend resume hooks to excute scripts which take care of unbinding and binding the necessary configurations and usb driver during suspend and resume respectively. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'recipes-support/usb-suspend-resume/files/usb-resume.sh')
-rw-r--r--recipes-support/usb-suspend-resume/files/usb-resume.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/recipes-support/usb-suspend-resume/files/usb-resume.sh b/recipes-support/usb-suspend-resume/files/usb-resume.sh
new file mode 100644
index 0000000..2584813
--- /dev/null
+++ b/recipes-support/usb-suspend-resume/files/usb-resume.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+echo ci_hdrc.1 > /sys/bus/platform/drivers/ci_hdrc/unbind
+echo ci_hdrc.1 > /sys/bus/platform/drivers/ci_hdrc/bind
+echo ci_hdrc.0 > /sys/bus/platform/drivers/ci_hdrc/unbind
+echo ci_hdrc.0 > /sys/bus/platform/drivers/ci_hdrc/bind
+/bin/sh -c '/bin/cat /proc/device-tree/model > \
+ /sys/kernel/config/usb_gadget/g1/strings/0x409/product'
+/bin/sh -c '/bin/cat /proc/device-tree/serial-number > \
+ /sys/kernel/config/usb_gadget/g1/strings/0x409/serialnumber'
+/bin/sh -c '/bin/echo `ls /sys/class/udc/` > \
+ /sys/kernel/config/usb_gadget/g1/UDC'