Add RPI3 B+ model BT firmware file
[platform/adaptation/bluetooth-firmware-bcm.git] / scripts / bt-dev-end.sh
1 #!/bin/sh
2 PATH=/bin:/usr/bin:/sbin:/usr/sbin
3 PGREP=/usr/bin/pgrep
4
5 #
6 # Script for stopping Broadcom UART Bluetooth stack
7 #
8
9 # Device down
10 /usr/bin/hciconfig hci0 down
11
12 # OMAP4
13 REVISION_NUM=`grep Revision /proc/cpuinfo | awk "{print \\$3}"`
14 if [ $REVISION_NUM == "0006" ]; then
15         rmmod bt_drv.ko
16         rmmod st_drv.ko
17         sleep 1
18         UIM_RFKILL_PID=$($PGREP uim_rfkill)
19         kill $UIM_RFKILL_PID
20         exit 0
21 fi
22
23 HCIATTACH_PID=$($PGREP hciattach)
24 kill $HCIATTACH_PID
25
26 # Turn off Bluetooth Chip
27 /usr/sbin/rfkill block bluetooth
28
29 #if [ -e /sys/class/gpio/gpio17/value ]
30 #then
31 #       # Reset BT chip
32 #       echo 0 > /sys/class/gpio/gpio17/value
33 #       sleep 0.1
34 #       echo 1 > /sys/class/gpio/gpio17/value
35 #fi
36