summaryrefslogtreecommitdiff
path: root/recipes-kernel
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2021-11-22 16:13:44 -0600
committerJohn Klug <john.klug@multitech.com>2021-12-29 08:35:07 -0600
commitcb61fbd6f4a615b6867f2b5593fb62f339dea638 (patch)
tree24a9e5d9ef6e138707dca92063746269a104c4fc /recipes-kernel
parent6f49bdfbae7cf1826cbd34fc7363a052f8a36796 (diff)
downloadmeta-multitech-atmel-cb61fbd6f4a615b6867f2b5593fb62f339dea638.tar.gz
meta-multitech-atmel-cb61fbd6f4a615b6867f2b5593fb62f339dea638.tar.bz2
meta-multitech-atmel-cb61fbd6f4a615b6867f2b5593fb62f339dea638.zip
Wait for USB, not the interrupt pin which is too early
Diffstat (limited to 'recipes-kernel')
-rwxr-xr-xrecipes-kernel/rs9113/files/rs9113/rs9113.init18
1 files changed, 12 insertions, 6 deletions
diff --git a/recipes-kernel/rs9113/files/rs9113/rs9113.init b/recipes-kernel/rs9113/files/rs9113/rs9113.init
index d9fb21e..0d3d548 100755
--- a/recipes-kernel/rs9113/files/rs9113/rs9113.init
+++ b/recipes-kernel/rs9113/files/rs9113/rs9113.init
@@ -41,9 +41,9 @@ case "$1" in
while [ $N -lt 20 ] ; do
INT=$(cat $RS9113_INT)
if ((INT != 1)) ; then
- usleep $INTSLEEPTIME
+ usleep $INTSLEEPTIME
else
- break
+ break
fi
done
if [ $INT -ne 1 ] ; then
@@ -53,15 +53,21 @@ case "$1" in
# No WiFi BT, so exit quietly
exit 0
fi
- if /usr/bin/lsusb -d 1618:9113 >/dev/null ; then
- break
- fi
+ n=0
+ while ((n < 10)) ; do
+ usleep 50000
+ if /usr/bin/lsusb -d 1618:9113 ; then
+ break 2
+ fi
+ done
+ /usr/bin/logger -t "rs9113" -p error -s "Redpine not found on USB Hub."
sleep 15
((count++))
if ((count > 5)) ; then
- logger -t rs9113 -p error -s "RS9113 not found after $count resets"
+ /usr/bin/logger -t "rs9113" -p error -s "RS9113 not found after $count resets"
break
fi
+ echo 'RS9113 not found, try resetting again'
done
/usr/bin/logger -t "rs9113" -p info -s "Loading rs9113 modules with COEX=$COEX_MODE and Country=$SET_COUNTRY_CODE"
/usr/sbin/rs9113_load_modules.sh $CONFIG