diff mbox series

[BlueZ,v7,6/6] input: Make HID devices support wake

Message ID 20200706132503.BlueZ.v7.6.I3290604153369ff32013f3dcadda4df3f2eb0f36@changeid (mailing list archive)
State Accepted
Headers show
Series device: Allow devices to be marked as wake capable | expand

Commit Message

Abhishek Pandit-Subedi July 6, 2020, 8:25 p.m. UTC
HID devices can wake the host from a suspended state. Mark the profiles
to support wake when they are accepted. If the device hasn't already
been configured with a Wake Allowed configuration, it will default to
yes when the profile is accepted.

---

Changes in v7: None
Changes in v6: None
Changes in v5:
* Only call device_set_wake_support

Changes in v4:
* Renamed device_set_profile_wake_support to just
device_set_wake_support

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 d3724ed54..2dc2ecab2 100644
--- a/profiles/input/device.c
+++ b/profiles/input/device.c
@@ -1409,6 +1409,7 @@  int input_device_register(struct btd_service *service)
 	}
 
 	btd_service_set_user_data(service, idev);
+	device_set_wake_support(device, true);
 
 	return 0;
 }
diff --git a/profiles/input/hog.c b/profiles/input/hog.c
index 9335b7e8b..130f696a9 100644
--- a/profiles/input/hog.c
+++ b/profiles/input/hog.c
@@ -166,6 +166,7 @@  static int hog_probe(struct btd_service *service)
 		return -EINVAL;
 
 	btd_service_set_user_data(service, dev);
+	device_set_wake_support(device, true);
 	return 0;
 }