diff mbox series

[BlueZ,v4,5/5] input: Make HID devices support wake

Message ID 20200319185000.BlueZ.v4.5.Ie24be91b472c0a274606191bc4d14df030fe3598@changeid (mailing list archive)
State Superseded
Delegated to: Luiz Von Dentz
Headers show
Series device: Allow devices to be marked as wake capable | expand

Commit Message

Abhishek Pandit-Subedi March 20, 2020, 1:50 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 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 d89da2d7c..d2a4ec82e 100644
--- a/profiles/input/device.c
+++ b/profiles/input/device.c
@@ -1402,6 +1402,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 327a1d1c3..0e4bd1c34 100644
--- a/profiles/input/hog.c
+++ b/profiles/input/hog.c
@@ -168,6 +168,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;
 }