BLUETOOTH-SUSPEND: add bluetooth suspend as wifi suspend
Change-Id: I44123165c65308a1e076a1ac4a62b1fbd4c14f0a
This commit is contained in:
1 parent
4f1d165844
commit
9698c64aca
3 files changed
+85
No files matched your search
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Bluetooth brcmfmac sleep hook
|
||||
Before=sleep.target
|
||||
StopWhenUnneeded=yes
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=-/usr/bin/bluetooth_brcmfmac_driver.sh unbind
|
||||
ExecStop=-/usr/bin/bluetooth_brcmfmac_driver.sh bind
|
||||
|
||||
[Install]
|
||||
WantedBy=sleep.target
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
|
||||
COMPATIBLE_BOARD=$(cat /proc/device-tree/compatible | sed "s|st,|,|g" | cut -d ',' -f2)
|
||||
|
||||
case $COMPATIBLE_BOARD in
|
||||
stm32mp151a-dk2*)
|
||||
# supported
|
||||
;;
|
||||
stm32mp151f-dk2*)
|
||||
# supported
|
||||
;;
|
||||
stm32mp153a-dk2*)
|
||||
# supported
|
||||
;;
|
||||
stm32mp153f-dk2*)
|
||||
# supported
|
||||
;;
|
||||
stm32mp157c-dk2*)
|
||||
# supported
|
||||
;;
|
||||
stm32mp157f-dk2*)
|
||||
# supported
|
||||
;;
|
||||
*)
|
||||
exit 1;
|
||||
esac
|
||||
|
||||
case $1 in
|
||||
bind)
|
||||
echo "bind driver hci_uart";
|
||||
echo "bind driver hci_uart" > /dev/kmsg
|
||||
modprobe -r hci_uart
|
||||
modprobe hci_uart
|
||||
;;
|
||||
unbind)
|
||||
echo "unbind driver hci_uart";
|
||||
echo "unbind driver hci_uart" > /dev/kmsg
|
||||
modprobe -r hci_uart
|
||||
;;
|
||||
*)
|
||||
echo "$0 [bind|unbind]"
|
||||
echo "Bind/Unbind bluetooth driver brcmfmac."
|
||||
;;
|
||||
esac
|
||||
Reference in new issue
Block a user