Bluetooth: btusb: Add shutdown routine for BTUSB_INTEL_NEW devices
authorRaghuram Hegde <raghuram.hegde@intel.com>
Tue, 29 Jan 2019 12:24:48 +0000 (17:54 +0530)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 29 Jan 2019 15:15:29 +0000 (16:15 +0100)
commit017a01ccfbc5a35aed83acbf2ee2735f8c3efe8a
treeb0cb2687e69abede6b7570a757bc6762e17bd5af
parent2de66bb87351086ce9bef37c1b98d9bae93eddcd
Bluetooth: btusb: Add shutdown routine for BTUSB_INTEL_NEW devices

If BT operations (BREDR inquiry/LE scan) were triggered
through the stack, followed by BT turn off through
'hciconfig hci0 down', the controller would still be active
and consume power.
Also, there is a possibility that a race condition/
synchronization issue might arise on the subsequent BT turn
on, as the controller might try to push the
events that were queued up before processing the HCI Reset
command.

btusb_shutdown_intel_new routine shall reset the controller
and stop all BT operation.
Advantages:
1. Power save on the platform
2. Host and controller will be in Sync.

Signed-off-by: Raghuram Hegde <raghuram.hegde@intel.com>
Signed-off-by: Chethan T N <chethan.tumkur.narayan@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btusb.c