summaryrefslogtreecommitdiff
path: root/recipes-kernel
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2021-12-08 09:15:21 -0600
committerJohn Klug <john.klug@multitech.com>2021-12-29 08:35:07 -0600
commit8007aeb47108a3ccd38e5e607b81056a568f9240 (patch)
tree3c9f5f81fccf469d5996d727e6d857121b8ee31b /recipes-kernel
parent5d23f884ee7063db5bc23a23794789868617d0a8 (diff)
downloadmeta-multitech-atmel-8007aeb47108a3ccd38e5e607b81056a568f9240.tar.gz
meta-multitech-atmel-8007aeb47108a3ccd38e5e607b81056a568f9240.tar.bz2
meta-multitech-atmel-8007aeb47108a3ccd38e5e607b81056a568f9240.zip
Add rs9113-reset package for mPower to reset rs9113
Diffstat (limited to 'recipes-kernel')
-rwxr-xr-xrecipes-kernel/rs9113/files/rs9113/rs9113.reset27
-rw-r--r--recipes-kernel/rs9113/rs9113.inc13
-rw-r--r--recipes-kernel/rs9113/rs9113_1.6.5.bb1
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 \