bluesleep: stop/start based on HCI_DEV_REG/HCI_DEV_UNREG events
authorNagarjuna Kristam <nkristam@nvidia.com>
Wed, 11 Jul 2012 11:19:24 +0000 (16:19 +0530)
committerRohan Somvanshi <rsomvanshi@nvidia.com>
Fri, 13 Jul 2012 12:49:30 +0000 (05:49 -0700)
commit9d9cd69f3129ad2643bf8cd30015266d020347cb
treeef2899fbd9a9339e01944b03bce01474e858676f
parentc9ce3ff77d029d99ddae5577b8358258feff08a0
bluesleep: stop/start based on HCI_DEV_REG/HCI_DEV_UNREG events

when BT is turned off HCI_DEV_DOWN event is received and bluesleep
protocol is stopped. On bluesleep stop, EXT_WAKE gpio will be set to
default high level. This condition does not allow BT chip to enter
low power mode. So, start and stop bluesleep based on HCI_DEV_REG
and HCI_DEV_UNREG events instead of HCI_DEV_UP and HCI_DEV_DOWN.

Also, enable and disable host wake functionality based on HCI_DEV_UP and
HCI_DEV_DOWN events, as these events indicate BT turn ON and OFF

Bug 1014590

Change-Id: I3929c1328ac024eb080359283107dabf3712e9ea
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: http://git-master/r/114984
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
drivers/bluetooth/bluesleep.c