summaryrefslogtreecommitdiff
path: root/recipes-bsp/multitech/mts-io/mts-io.init
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2018-05-11 10:42:00 -0500
committerJohn Klug <john.klug@multitech.com>2018-05-11 10:42:00 -0500
commit58d7261d5e48fc578f0bbb84fa344c1c471c9167 (patch)
treea7eea53623b1b2ef599321b4458a4ce8706d4668 /recipes-bsp/multitech/mts-io/mts-io.init
parenta355a2994318de88449bfb41223a6c842bd3c4af (diff)
downloadmeta-multitech-58d7261d5e48fc578f0bbb84fa344c1c471c9167.tar.gz
meta-multitech-58d7261d5e48fc578f0bbb84fa344c1c471c9167.tar.bz2
meta-multitech-58d7261d5e48fc578f0bbb84fa344c1c471c9167.zip
Fix /dev/gps0 for all devices, and remove unneeded radio-reset, not in MTR
Diffstat (limited to 'recipes-bsp/multitech/mts-io/mts-io.init')
-rw-r--r--recipes-bsp/multitech/mts-io/mts-io.init20
1 files changed, 16 insertions, 4 deletions
diff --git a/recipes-bsp/multitech/mts-io/mts-io.init b/recipes-bsp/multitech/mts-io/mts-io.init
index 048c697..8910e64 100644
--- a/recipes-bsp/multitech/mts-io/mts-io.init
+++ b/recipes-bsp/multitech/mts-io/mts-io.init
@@ -185,11 +185,22 @@ mfser_init() {
set_gpslink() {
hw=$(${SYSFS} show hw-version)
hw_name=(${hw//-/ })
-
- if ! [[ ${hw} =~ ^MTCDT ]] ; then
- # No GPS (unless MTR, and that is TBD)
+ gpscap=$(cat ${sysdir}/capability/gps)
+
+ if ((gpscap == 0)) && [[ ${hw_name} != MTCDTIPHP ]] ; then
+ return
+ fi
+
+ if [[ ${hw_name} == MTRV1 ]] ; then
+ ln -sf /dev/ttyXRUSB0 /dev/gps0
+ return
+ fi
+
+ if [[ ${hw_name} == MTR ]] ; then
+ ln -sf /dev/ttyS0 /dev/gps0
return
fi
+
if [[ ${hw} == MTCDT ]] && [[ ${HWLVL} == 0.0 ]] ; then
# No GPS
return
@@ -199,6 +210,7 @@ set_gpslink() {
ln -sf /dev/ttyXRUSB0 /dev/gps0
return
fi
+ # Default MTCDT-0.1
ln -sf /dev/ttyXRUSB2 /dev/gps0
}
@@ -213,7 +225,7 @@ case $1 in
read_card_info
/bin/busybox usleep $USLPTIME
reset_array
- [ -w ${sysdir}/radio-reset ] && ${SYSFS} store radio-reset 0
+ # Radio reset has its own init script
mfser_init
waitpins