diff options
author | John Klug <john.klug@multitech.com> | 2021-12-08 09:15:21 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2021-12-08 09:15:21 -0600 |
commit | 556ff1c4e063e4dd196d7d55eb809ec0e0c2436c (patch) | |
tree | 3c9f5f81fccf469d5996d727e6d857121b8ee31b /recipes-kernel/rs9113 | |
parent | 15b1f62c132a63a35960486582ae36f7c752e593 (diff) | |
download | meta-multitech-atmel-556ff1c4e063e4dd196d7d55eb809ec0e0c2436c.tar.gz meta-multitech-atmel-556ff1c4e063e4dd196d7d55eb809ec0e0c2436c.tar.bz2 meta-multitech-atmel-556ff1c4e063e4dd196d7d55eb809ec0e0c2436c.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 7e9accd..fd3f7db 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 ." @@ -164,6 +170,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/ \ @@ -188,6 +198,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 \ |