diff options
author | John Klug <john.klug@multitech.com> | 2021-12-08 09:15:21 -0600 |
---|---|---|
committer | Serhii Voloshynov <serhii.voloshynov@globallogic.com> | 2022-01-11 16:54:07 +0200 |
commit | 0e2ddfb80af9165ed63b3fb420876bf6f1056698 (patch) | |
tree | ebcdca0490e571f11840b6748e549ce68c924765 /recipes-kernel/rs9113 | |
parent | 9b31c9e2c04e23cd94e4a3274409a82fa3f8adb0 (diff) | |
download | meta-multitech-atmel-0e2ddfb80af9165ed63b3fb420876bf6f1056698.tar.gz meta-multitech-atmel-0e2ddfb80af9165ed63b3fb420876bf6f1056698.tar.bz2 meta-multitech-atmel-0e2ddfb80af9165ed63b3fb420876bf6f1056698.zip |
Add rs9113-reset package for mPower to reset rs9113
Diffstat (limited to 'recipes-kernel/rs9113')
-rwxr-xr-x | recipes-kernel/rs9113/files/rs9113/rs9113.reset | 27 | ||||
-rw-r--r-- | recipes-kernel/rs9113/rs9113.inc | 13 | ||||
-rw-r--r-- | recipes-kernel/rs9113/rs9113_1.6.5.bb | 1 |
3 files changed, 40 insertions, 1 deletions
diff --git a/recipes-kernel/rs9113/files/rs9113/rs9113.reset b/recipes-kernel/rs9113/files/rs9113/rs9113.reset new file mode 100755 index 0000000..b4aca45 --- /dev/null +++ b/recipes-kernel/rs9113/files/rs9113/rs9113.reset @@ -0,0 +1,27 @@ +#!/bin/sh +# Reset rs9113 +# Must be done after /etc/init.d/mts-io executes, and +# before any code that probes the USB bus. +function do_reset { + if ! [[ -w /sys/devices/platform/mts-io/wifi-bt-reset ]] ; then + exit 0 + fi + mts-io-sysfs store wifi-bt-reset 0 + usleep 60000 + mts-io-sysfs store wifi-bt-reset 1 +} + +case $1 in + start) + do_reset + ;; + stop) + ;; + reload) + do_reset + ;; + *) + echo "Usage: $0 {start|stop|reload}" + exit 2 + ;; +esac diff --git a/recipes-kernel/rs9113/rs9113.inc b/recipes-kernel/rs9113/rs9113.inc index 3f0eb66..9365a3e 100644 --- a/recipes-kernel/rs9113/rs9113.inc +++ b/recipes-kernel/rs9113/rs9113.inc @@ -17,6 +17,7 @@ PACKAGES = " \ ${PN}-dbg \ ${PN}-autostart \ ${PN}-btclonly \ + ${PN}-reset \ ${PN}-noarch \ " @@ -40,10 +41,15 @@ ALLOW_EMPTY_${PN}-btclonly = "1" DR = "${DL_DIR}/rs9113-ipk" FILESEXTRAPATHS_append := "${DR}:" -INITSCRIPT_PACKAGES = "${PN}-autostart ${PN}-rm" +INITSCRIPT_PACKAGES = "${PN}-autostart ${PN}-rm ${PN}-reset" INITSCRIPT_NAME_${PN}-autostart = "rs9113" INITSCRIPT_PARAMS_${PN}-autostart = "start 50 S ." + +INITSCRIPT_NAME_${PN}-reset = "rs9113-reset" +INITSCRIPT_PARAMS_${PN}-reset = "start 40 S ." + + # ${PN}-rm must start after mts-io driver is loaded. INITSCRIPT_NAME_${PN}-rm = "mts-rm-rs9113" INITSCRIPT_PARAMS_${PN}-rm = "start 39 S ." @@ -168,6 +174,10 @@ FILES_${PN}-misc = " \ CONFFILES_${PN}-noarch = "${sysconfdir}/default/" +FILES_${PN}-reset = " \ + ${sysconfdir}/init.d/rs9113-reset \ + " + # noarch gets what is left to package. FILES_${PN}-noarch = " \ /opt/ \ @@ -192,6 +202,7 @@ do_install () { install -d ${D}${sysconfdir}/default/ install -m 0755 ${MR}/wpa_supplicant ${D}/opt/rs9113/init.d install -m 0755 ${MR}/rs9113.init ${D}${sysconfdir}/init.d/rs9113 + install -m 0755 ${MR}/rs9113.reset ${D}${sysconfdir}/init.d/rs9113-reset install -m 0644 ${MR}/rs9113.default ${D}${sysconfdir}/default/rs9113 install -m 0755 ${MR}/mts-rm-rs9113 ${D}${sysconfdir}/init.d/mts-rm-rs9113 } diff --git a/recipes-kernel/rs9113/rs9113_1.6.5.bb b/recipes-kernel/rs9113/rs9113_1.6.5.bb index 0627dcb..89d7d55 100644 --- a/recipes-kernel/rs9113/rs9113_1.6.5.bb +++ b/recipes-kernel/rs9113/rs9113_1.6.5.bb @@ -21,6 +21,7 @@ PR = "r12${KERNEL_MODULE_PACKAGE_SUFFIX}" SRC_URI = " \ file://rs9113/rs9113.init \ file://rs9113/rs9113.default \ + file://rs9113/rs9113.reset \ file://rs9113/mts-rm-rs9113 \ file://rs9113/wpa_supplicant \ file://rs9113-ipk/rs9113-from-src_${PV}-${PR}.0_${MACHINE}.ipk;name=binaries \ |