All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bt usb-device initialize as wakeup enable
@ 2017-08-14 18:24 Sukumar Ghorai
  2017-08-14  6:10 ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Sukumar Ghorai @ 2017-08-14 18:24 UTC (permalink / raw)
  To: Marcel Holtmann, Gustavo Padovan, Johan Hedberg
  Cc: linux-bluetooth, Sukumar Ghorai, Amit K Bag #

BT-Controller connected as platform non-root-hub device and
usb-driver initialize such device with wakeup disabled,
Ref. usb_new_device().

At present wakeup-capability get enabled by hid-input device from usb
function driver(e.g. BT HID device) at runtime. Again some functional
driver does not set usb-wakeup capability(e.g LE HID device implement
as HID-over-GATT), and can't wakeup the host on USB.

Hence usb-wakeup capability enable form btusc driver as a generic
solution for multiple profile usecase and required for USB remote
wakeup (in-bus wakeup) while host is suspended.

Signed-off-by: Sukumar Ghorai <sukumar.ghorai@intel.com>
Signed-off-by: Amit K Bag <amit.k.bag@intel.com>#
---
 drivers/bluetooth/btusb.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index e1124ba44154..7eeeeb6ffae6 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -1083,6 +1083,10 @@ static int btusb_open(struct hci_dev *hdev)
 	}
 
 	data->intf->needs_remote_wakeup = 1;
+	/* device specific wakeup source enabled and required for USB
+	 * remote wakeup while host is suspended
+	 */
+	device_init_wakeup(&data->udev->dev, true);
 
 	if (test_and_set_bit(BTUSB_INTR_RUNNING, &data->flags))
 		goto done;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-14 18:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-14 18:24 [PATCH] bt usb-device initialize as wakeup enable Sukumar Ghorai
2017-08-14  6:10 ` Marcel Holtmann
2017-08-14  7:25   ` Oliver Neukum
2017-08-14 11:49     ` Ghorai, Sukumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.