summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2018-04-03 13:22:58 -0500
committerJohn Klug <john.klug@multitech.com>2018-04-03 13:22:58 -0500
commitd6f04ebcc1373fe9d739181a28ebc3a5f05e5bfb (patch)
treea87182c5205471fab01f8cf18ace783f040f046c
parentedfa2da09aedff4129156cf376951e7054aec81f (diff)
downloadmeta-multitech-d6f04ebcc1373fe9d739181a28ebc3a5f05e5bfb.tar.gz
meta-multitech-d6f04ebcc1373fe9d739181a28ebc3a5f05e5bfb.tar.bz2
meta-multitech-d6f04ebcc1373fe9d739181a28ebc3a5f05e5bfb.zip
Bump the mts-io driver revision for gps symlink code
-rw-r--r--recipes-bsp/multitech/mts-io.inc2
-rw-r--r--recipes-bsp/multitech/mts-io/mts-io.init26
2 files changed, 27 insertions, 1 deletions
diff --git a/recipes-bsp/multitech/mts-io.inc b/recipes-bsp/multitech/mts-io.inc
index 0b7b1c1..bce46e5 100644
--- a/recipes-bsp/multitech/mts-io.inc
+++ b/recipes-bsp/multitech/mts-io.inc
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://io-module/COPYING;md5=94d55d512a9ba36caa9b7df079bae19
file://io-tool/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
"
DEPENDS = "virtual/kernel"
-INC_PR = "r10"
+INC_PR = "r11"
SRCREV = "${PV}"
diff --git a/recipes-bsp/multitech/mts-io/mts-io.init b/recipes-bsp/multitech/mts-io/mts-io.init
index 52c6d1f..5ceb04a 100644
--- a/recipes-bsp/multitech/mts-io/mts-io.init
+++ b/recipes-bsp/multitech/mts-io/mts-io.init
@@ -26,6 +26,7 @@ port1=${sysdir}/ap1
port2=${sysdir}/ap2
USBRST=${sysdir}/usbhub-reset
+NEED_I2C_RESET=0
RST[0]="${sysdir}/wifi-bt-reset"
RST[1]="${sysdir}/mtq-reset"
@@ -174,12 +175,33 @@ mfser_init() {
}
+set_gpslink() {
+ HWVER=$(mts-io-sysfs show hw-version)
+ HWNAME=(${HWVER//-/ })
+ HWLVL=(${HWVER#${HWNAME}-})
+ if ! [[ ${HWNAME} =~ ^MTCDT ]] ; then
+ # No GPS (unless MTR, and that is TBD)
+ return
+ fi
+ if [[ ${HWNAME} == MTCDT ]] && [[ ${HWLVL} == 0.0 ]] ; then
+ # No GPS
+ return
+ fi
+ if [[ ${HWNAME} == MTCDTIPHP ]] ; then
+ NEED_I2C_RESET=1
+ ln -sf /dev/ttyXRUSB0 /dev/gps0
+ return
+ fi
+ ln -sf /dev/ttyXRUSB2 /dev/gps0
+}
+
case $1 in
start)
/usr/bin/logger -t "mts-io" -p daemon.info -s "Loading mts-io module"
if ! modprobe mts_io ; then
((fail++))
fi
+ set_gpslink
/usr/bin/logger -t "mts-io" -p daemon.info -s "Resetting system modules"
read_card_info
/bin/busybox usleep $USLPTIME
@@ -193,6 +215,10 @@ case $1 in
if ! reset_path $USBRST ; then
((fail++))
fi
+
+ if ((NEED_I2C_RESET == 1)) ; then
+ logger -s -p daemon.notice -t mts-io "TBD -- Need I2C reset here."
+ fi
if ((fail == 0)) ; then
echo "OK"