diff mbox series

[BlueZ,v3,5/5] input: Make HID devices wake capable

Message ID 20200127180433.BlueZ.v3.5.Ie24be91b472c0a274606191bc4d14df030fe3598@changeid
State Superseded
Headers show
Series [BlueZ,v3,1/5] mgmt: Add docs for Set Wake Capable | expand

Commit Message

Abhishek Pandit-Subedi Jan. 28, 2020, 2:05 a.m. UTC
HID devices can wake the host from a suspended state. Mark the profiles
to support wake when they are accepted.

---

Changes in v3:
* Mark HID device to support wake from suspend

Changes in v2: None

 profiles/input/device.c | 1 +
 profiles/input/hog.c    | 1 +
 2 files changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/profiles/input/device.c b/profiles/input/device.c
index 2cb3811c8..e5865d098 100644
--- a/profiles/input/device.c
+++ b/profiles/input/device.c
@@ -1381,6 +1381,7 @@  int input_device_register(struct btd_service *service)
 	}
 
 	btd_service_set_user_data(service, idev);
+	device_set_profile_wake_support(device, true);
 
 	return 0;
 }
diff --git a/profiles/input/hog.c b/profiles/input/hog.c
index 83c017dcb..227facf97 100644
--- a/profiles/input/hog.c
+++ b/profiles/input/hog.c
@@ -159,6 +159,7 @@  static int hog_probe(struct btd_service *service)
 		return -EINVAL;
 
 	btd_service_set_user_data(service, dev);
+	device_set_profile_wake_support(device, true);
 	return 0;
 }