input: Make HID devices support wake
authorAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
Mon, 6 Jul 2020 20:25:18 +0000 (13:25 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 12 Apr 2021 09:00:49 +0000 (14:30 +0530)
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.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
profiles/input/device.c
profiles/input/hog.c

index a4f9e3b..0552fe5 100644 (file)
@@ -1501,6 +1501,7 @@ int input_device_register(struct btd_service *service)
        }
 
        btd_service_set_user_data(service, idev);
+       device_set_wake_support(device, true);
 
        return 0;
 }
index a87df32..3623ba2 100755 (executable)
@@ -171,6 +171,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;
 }