summaryrefslogtreecommitdiff
path: root/recipes-bsp
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/multitech/mts-io.inc14
-rw-r--r--recipes-bsp/multitech/mts-io/mts-io.init4
-rw-r--r--recipes-bsp/multitech/mts-io/radio-reset.default8
-rw-r--r--recipes-bsp/multitech/mts-io/radio-reset.init18
4 files changed, 27 insertions, 17 deletions
diff --git a/recipes-bsp/multitech/mts-io.inc b/recipes-bsp/multitech/mts-io.inc
index e6a6242..5c9d129 100644
--- a/recipes-bsp/multitech/mts-io.inc
+++ b/recipes-bsp/multitech/mts-io.inc
@@ -100,17 +100,11 @@ fakeroot do_install_append_mtcap() {
# install MTCAP mts-io init script
install -m 0755 ${WORKDIR}/mts-io.mtcap.init ${D}${sysconfdir}/init.d/mts-io
install -m 0755 ${WORKDIR}/lora-led-updater ${D}${sbindir}/lora-led-updater
-
- # disable radio-reset for the mtcap hardware
- sed -i 's/ENABLED="yes"/ENABLED="no"/g' ${D}${sysconfdir}/default/radio-reset
}
-fakeroot do_install_append_mtr() {
- # disable radio-reset on shutdown for the mtr hardware
- sed -i 's/ENABLED="yes"/ENABLED="no"/g' ${D}${sysconfdir}/default/radio-reset
+# Radio-reset is on boot and shutdown for AEP/mlinux
+fakeroot do_install_append_mtcdt() {
+ # install MTCAP mts-io init script
+ sed -i 's/STOP="no"/STOP="yes"/' ${D}${sysconfdir}/default/radio-reset
}
-fakeroot do_install_append_mtrv1() {
- # disable radio-reset on shutdown for the mtrv1 hardware
- sed -i 's/ENABLED="yes"/ENABLED="no"/g' ${D}${sysconfdir}/default/radio-reset
-}
diff --git a/recipes-bsp/multitech/mts-io/mts-io.init b/recipes-bsp/multitech/mts-io/mts-io.init
index 42a35c0..d5d0879 100644
--- a/recipes-bsp/multitech/mts-io/mts-io.init
+++ b/recipes-bsp/multitech/mts-io/mts-io.init
@@ -225,7 +225,7 @@ case $1 in
read_card_info
/bin/busybox usleep $USLPTIME
reset_array
- [ -w ${sysdir}/radio-reset ] && ${SYSFS} store radio-reset 0
+ # use radio-reset init script for radio-reset
mfser_init
waitpins
@@ -273,7 +273,7 @@ case $1 in
fi
/bin/busybox usleep $USLPTIME
reset_array
- ${SYSFS} store radio-reset 0
+ # Use radio-reset init script for radio-reset
mfser_init
if ((fail == 0)) ; then
echo "OK"
diff --git a/recipes-bsp/multitech/mts-io/radio-reset.default b/recipes-bsp/multitech/mts-io/radio-reset.default
index 69f4bb7..ae2e241 100644
--- a/recipes-bsp/multitech/mts-io/radio-reset.default
+++ b/recipes-bsp/multitech/mts-io/radio-reset.default
@@ -1,2 +1,8 @@
-# set to "no" to disable radio-reset on reboot
+# If Enabled, it is possible to reset the radio on boot or shutdown.
+# It is always possible to reset the radio using
+# /etc/init.d/reload manually.
ENABLED="yes"
+# set to "no" to disable radio-reset on shutdown
+STOP="no"
+# set to "no" to disable radio-reset on boot
+START="yes"
diff --git a/recipes-bsp/multitech/mts-io/radio-reset.init b/recipes-bsp/multitech/mts-io/radio-reset.init
index 00bbe2b..f469df4 100644
--- a/recipes-bsp/multitech/mts-io/radio-reset.init
+++ b/recipes-bsp/multitech/mts-io/radio-reset.init
@@ -2,19 +2,29 @@
ENABLED="yes"
+if ! [[ -w /sys/devices/platform/mts-io/radio-reset ]] ; then
+ exit 0
+fi
[ -r /etc/default/radio-reset ] && source /etc/default/radio-reset
-[ "$ENABLED" == "yes" ] || exit 0
case $1 in
+ start)
+ if [[ $ENABLED == "yes" ]] && [[ $START == "yes" ]] ; then
+ mts-io-sysfs store radio-reset 0
+ echo "Resetting cellular radio"
+ fi
+ ;;
stop)
- if [ -w /sys/devices/platform/mts-io/radio-reset ] ; then
+ if [[ $ENABLED == "yes" ]] && [[ $STOP == "yes" ]] ; then
mts-io-sysfs store radio-reset 0
echo "Resetting cellular radio"
fi
;;
-
+ reload)
+ mts-io-sysfs store radio-reset 0
+ ;;
*)
- echo "Usage: $0 {stop}"
+ echo "Usage: $0 {start|stop|reload}"
exit 2
;;
esac