summaryrefslogtreecommitdiff
path: root/recipes-bsp/multitech/mts-io
diff options
context:
space:
mode:
authorMykyta Dorokhin <mykyta.dorokhin@globallogic.com>2016-09-21 01:07:18 +0300
committerMykyta Dorokhin <mykyta.dorokhin@globallogic.com>2016-09-21 01:07:18 +0300
commit9f6497b3edd39742fb85b3ad70c0f25251a18cf1 (patch)
treeb0e00635919d7f4ae1db524b76ddb2c5b39f4419 /recipes-bsp/multitech/mts-io
parent5df695fa14d866934c9f85c7c9921bf26b6e30ae (diff)
downloadmeta-multitech-9f6497b3edd39742fb85b3ad70c0f25251a18cf1.tar.gz
meta-multitech-9f6497b3edd39742fb85b3ad70c0f25251a18cf1.tar.bz2
meta-multitech-9f6497b3edd39742fb85b3ad70c0f25251a18cf1.zip
mtp: remove /dev/modem_at[0,1] before powering down the radio on mts-io loading
Graceful cell radio power down can take 15+ seconds (to unregister from the network). While powering down the radio is still responsive to AT command.
Diffstat (limited to 'recipes-bsp/multitech/mts-io')
-rw-r--r--recipes-bsp/multitech/mts-io/mts-io.mtp.init10
1 files changed, 8 insertions, 2 deletions
diff --git a/recipes-bsp/multitech/mts-io/mts-io.mtp.init b/recipes-bsp/multitech/mts-io/mts-io.mtp.init
index f8df7ff..d8f8564 100644
--- a/recipes-bsp/multitech/mts-io/mts-io.mtp.init
+++ b/recipes-bsp/multitech/mts-io/mts-io.mtp.init
@@ -1,8 +1,13 @@
#!/bin/bash
-hardware_init() {
+lora_init() {
# reset lora chip
mts-io-sysfs store lora-reset 0
+}
+
+cell_init() {
+ # remove /dev/modem_at[0,1] symlinks
+ rm -f /dev/modem_at[0,1]
# power down the cellular chip gracefully
mts-io-sysfs store radio-power 0
@@ -15,7 +20,8 @@ case $1 in
start)
echo "Loading mts-io module"
modprobe mts_io
- hardware_init &
+ lora_init
+ cell_init &
;;
stop)