diff options
Diffstat (limited to 'recipes-bsp/multitech/mts-io')
-rw-r--r-- | recipes-bsp/multitech/mts-io/mts-io.init | 2 | ||||
-rw-r--r-- | recipes-bsp/multitech/mts-io/mts-io.mtcap.init | 11 | ||||
-rw-r--r-- | recipes-bsp/multitech/mts-io/radio-reset.init | 6 |
3 files changed, 11 insertions, 8 deletions
diff --git a/recipes-bsp/multitech/mts-io/mts-io.init b/recipes-bsp/multitech/mts-io/mts-io.init index b670cef..fd87c35 100644 --- a/recipes-bsp/multitech/mts-io/mts-io.init +++ b/recipes-bsp/multitech/mts-io/mts-io.init @@ -187,7 +187,7 @@ case $1 in fi /bin/busybox usleep $USLPTIME reset_array - mts-io-sysfs store radio-reset 0 + [ -w /sys/devices/platform/mts-io/radio-reset ] && mts-io-sysfs store radio-reset 0 mfser_init if ! reset_path $RS9113RST ; then ((fail++)) diff --git a/recipes-bsp/multitech/mts-io/mts-io.mtcap.init b/recipes-bsp/multitech/mts-io/mts-io.mtcap.init index e047c40..da9e126 100644 --- a/recipes-bsp/multitech/mts-io/mts-io.mtcap.init +++ b/recipes-bsp/multitech/mts-io/mts-io.mtcap.init @@ -46,11 +46,12 @@ 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 - - # power up the cellular chip - mts-io-sysfs store radio-power 1 + if [ -w /sys/devices/platform/mts-io/radio-power ] ; then + # power down the cellular chip gracefully + mts-io-sysfs store radio-power 0 + # power up the cellular chip + mts-io-sysfs store radio-power 1 + fi } start_lora_led_updater() { diff --git a/recipes-bsp/multitech/mts-io/radio-reset.init b/recipes-bsp/multitech/mts-io/radio-reset.init index 3ce07c7..00bbe2b 100644 --- a/recipes-bsp/multitech/mts-io/radio-reset.init +++ b/recipes-bsp/multitech/mts-io/radio-reset.init @@ -7,8 +7,10 @@ ENABLED="yes" case $1 in stop) - echo "Resetting cellular radio" - mts-io-sysfs store radio-reset 0 + if [ -w /sys/devices/platform/mts-io/radio-reset ] ; then + mts-io-sysfs store radio-reset 0 + echo "Resetting cellular radio" + fi ;; *) |