summaryrefslogtreecommitdiff
path: root/recipes-kernel/rs9113
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2021-12-09 18:44:58 -0600
committerSerhii Voloshynov <serhii.voloshynov@globallogic.com>2022-01-11 16:56:04 +0200
commitf2c8288cf7a4e1f35b2b69c013c569bacb1098f5 (patch)
tree61094ed1f043f91b1233e88895636b2663849a72 /recipes-kernel/rs9113
parente183f5fb4fda9eb2a9af423453adf4332810005b (diff)
downloadmeta-multitech-atmel-f2c8288cf7a4e1f35b2b69c013c569bacb1098f5.tar.gz
meta-multitech-atmel-f2c8288cf7a4e1f35b2b69c013c569bacb1098f5.tar.bz2
meta-multitech-atmel-f2c8288cf7a4e1f35b2b69c013c569bacb1098f5.zip
Do not create extra file in /var/config for rs9113 reset. Use dmesg
Diffstat (limited to 'recipes-kernel/rs9113')
-rwxr-xr-xrecipes-kernel/rs9113/files/rs9113/rs9113.init15
1 files changed, 3 insertions, 12 deletions
diff --git a/recipes-kernel/rs9113/files/rs9113/rs9113.init b/recipes-kernel/rs9113/files/rs9113/rs9113.init
index 5a5ed47..6adeb5a 100755
--- a/recipes-kernel/rs9113/files/rs9113/rs9113.init
+++ b/recipes-kernel/rs9113/files/rs9113/rs9113.init
@@ -16,7 +16,6 @@ MTS_IODIR=/sys/devices/platform/mts-io
RS9113_RESET=${MTS_IODIR}/wifi-bt-reset
RS9113_INT=${MTS_IODIR}/wifi-bt-int
RS9113_WKUP=${MTS_IODIR}/wifi-bt-lpwkup
-RSTLOG=/var/config/rs9113rstlog
[ -f $CONFIG ] || exit 1
@@ -27,21 +26,13 @@ LOG_ERR=3
LOG_INFO=6
name=rs9113
format="%s[%d] %12.2fs: %s"
-prefix1="<${pr}>rs9113[${pid}]: "
-prefix2="rs9113[${pid}]: "
+
function syslog {
pr=$1
shift
[[ $(cat /proc/uptime) =~ ([^[:space:]]+) ]]
s=$(printf "${format}" $name $pid ${BASH_REMATCH[1]} "$@")
echo "<${pr}>${s}" >/dev/kmsg
- echo "$s" >>${RSTLOG}
-}
-
-function logfile {
- [[ $(cat /proc/uptime) =~ ([^[:space:]]+) ]]
- s=$(printf "${format}" $pr $name $pid ${BASH_REMATCH[1]} "$@")
- echo "$s" >>${RSTLOG}
}
function logpipe {
@@ -71,10 +62,10 @@ function rs9113_reset {
# No WiFi BT, so exit quietly
exit 0
fi
- logfile "After reset $i complete"
+ syslog $LOG_INFO "After reset $i complete"
for j in {0..250} ; do
if /usr/bin/lsusb -d 1618:9113 ; then
- logfile "lsusb found 1618:9113 after reset $i"
+ syslog $LOG_INFO "lsusb found 1618:9113 after reset $i"
break 2
fi
usleep 100000