diff options
author | John Klug <john.klug@multitech.com> | 2020-09-18 16:05:38 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2020-09-18 16:05:38 -0500 |
commit | e3bfc5c3019b23fe8762a6da6d2ffbd3c3cb365d (patch) | |
tree | faaa3eb30aecee20ece451defc9a23b5c5e9306b | |
parent | 401251df79b7b22fcb3c04af82db5e1e1da3ce6c (diff) | |
download | meta-multitech-e3bfc5c3019b23fe8762a6da6d2ffbd3c3cb365d.tar.gz meta-multitech-e3bfc5c3019b23fe8762a6da6d2ffbd3c3cb365d.tar.bz2 meta-multitech-e3bfc5c3019b23fe8762a6da6d2ffbd3c3cb365d.zip |
Update mts-io driver for GPS on MTCAP
-rw-r--r-- | recipes-bsp/multitech/mts-io.inc | 2 | ||||
-rw-r--r-- | recipes-bsp/multitech/mts-io/mts-io.mtcap.init | 21 |
2 files changed, 22 insertions, 1 deletions
diff --git a/recipes-bsp/multitech/mts-io.inc b/recipes-bsp/multitech/mts-io.inc index 77d04c4..42e4336 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 \ " do_fetch[depends] += "virtual/kernel:do_shared_workdir" -INC_PR = "r1" +INC_PR = "r2" SRCREV = "${PV}" PR = "${INC_PR}-${KERNEL_MODULE_PACKAGE_SUFFIX}" diff --git a/recipes-bsp/multitech/mts-io/mts-io.mtcap.init b/recipes-bsp/multitech/mts-io/mts-io.mtcap.init index d33e5f4..7b77ec2 100644 --- a/recipes-bsp/multitech/mts-io/mts-io.mtcap.init +++ b/recipes-bsp/multitech/mts-io/mts-io.mtcap.init @@ -8,6 +8,25 @@ i2c=/sys/bus/i2c/devices/ SYSFS="/usr/sbin/mts-io-sysfs" +GPSCONFIGTYPE="/var/run/config/gpstype" + +set_hw_name() { + hw=$(${SYSFS} show hw-version) + hw_name=(${hw//-/ }) +} + +set_gpslink() { + [[ -d /var/run/config ]] || mkdir /var/run/config + gpscap=$(cat ${sysdir}/capability/gps) + + # hw_name must be mtcap, and gpscap == 1 + if ! [[ ${hw_name} =~ ^MTCAP$ ]] || ((gpscap == 0)) ; then + return + fi + ln -sf /dev/ttyS1 /dev/gps0 + echo "u-blox" >"$GPSCONFIGTYPE" +} + setwificap() { WIFICAP=0 if [[ -f ${sysdir}/capability/wifi ]] && (($(cat ${sysdir}/capability/wifi) == 1)) ; then @@ -98,6 +117,8 @@ case $1 in modprobe atmel_mci (($WIFICAP)) && modprobe wilc1000 (($WIFICAP)) && modprobe wilc1000-sdio + set_hw_name + set_gps_link ;; stop) |