From 9f6497b3edd39742fb85b3ad70c0f25251a18cf1 Mon Sep 17 00:00:00 2001 From: Mykyta Dorokhin Date: Wed, 21 Sep 2016 01:07:18 +0300 Subject: 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. --- recipes-bsp/multitech/mts-io/mts-io.mtp.init | 10 ++++++++-- 1 file 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) -- cgit v1.2.3