summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Gilles <jgilles@multitech.com>2014-02-28 15:51:45 -0600
committerJesse Gilles <jgilles@multitech.com>2014-02-28 15:51:45 -0600
commit2a16dee518f648cae31111bfe6968daa61065544 (patch)
treeebf8d144f1aaeff1c3eff90f02aee5252c4e296a
parent89ce252315659d308e76155fd15fb93d6238a498 (diff)
mts-io: power on radio on boot for mtocgd, add comments to radio-reset-h5
-rw-r--r--multitech/recipes/multitech/mts-io.inc2
-rw-r--r--multitech/recipes/multitech/mts-io/mtocgd/mts-io.init26
-rwxr-xr-xmultitech/recipes/multitech/mts-io/radio-reset-h55
3 files changed, 31 insertions, 2 deletions
diff --git a/multitech/recipes/multitech/mts-io.inc b/multitech/recipes/multitech/mts-io.inc
index 5a3167e..4609fe2 100644
--- a/multitech/recipes/multitech/mts-io.inc
+++ b/multitech/recipes/multitech/mts-io.inc
@@ -5,7 +5,7 @@ PRIORITY = "optional"
LICENSE = "GPL"
DEPENDS = "virtual/kernel"
RDEPENDS = "kernel (${KERNEL_VERSION})"
-INC_PR = "r3"
+INC_PR = "r4"
SRC_URI = " \
file://mts-io.init \
diff --git a/multitech/recipes/multitech/mts-io/mtocgd/mts-io.init b/multitech/recipes/multitech/mts-io/mtocgd/mts-io.init
new file mode 100644
index 0000000..fe6c517
--- /dev/null
+++ b/multitech/recipes/multitech/mts-io/mtocgd/mts-io.init
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+case $1 in
+ start)
+ echo "Loading mts-io module"
+ modprobe mts_io
+ radio_power=`mts-io-sysfs show radio-power`
+ # power on cellular radio if needed
+ if [ "$radio_power" = "0" ]; then
+ echo "Powering on radio"
+ mts-io-sysfs store radio-power 1 &
+ fi
+ ;;
+
+ stop)
+ echo "Unloading mts-io module"
+ modprobe -r mts_io
+ ;;
+
+ *)
+ echo "Usage: $0 {start|stop}"
+ exit 2
+ ;;
+esac
+
+
diff --git a/multitech/recipes/multitech/mts-io/radio-reset-h5 b/multitech/recipes/multitech/mts-io/radio-reset-h5
index 7a059eb..22616fe 100755
--- a/multitech/recipes/multitech/mts-io/radio-reset-h5
+++ b/multitech/recipes/multitech/mts-io/radio-reset-h5
@@ -1,10 +1,13 @@
#!/bin/sh
-# This script works around an H5 radio quirk by disabling USB and
+# This script works around a USB full-speed H5 radio quirk by disabling USB and
# waiting for the radio to power up before re-enabling it. Note that
# this will disable all USB devices connected to the USB host controller
# until the reset is finished. USB device port is not affected.
+# This script is *only* needed for devices with an H5 operating at USB full speed (MTCDP, MT100EOCG).
+# Devices with high speed USB are not affected (MTOCGD2, MTOCGD).
+
rmmod ohci_hcd
mts-io-sysfs store radio-reset 0
sleep 8