Re: [BlueZ PATCH 2/2] input: Make HID devices wake capable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Abhishek,

On Fri, Jan 17, 2020 at 1:28 PM Abhishek Pandit-Subedi
<abhishekpandit@xxxxxxxxxxxx> wrote:
>
> HID devices can wake the host from a suspended state. Mark them as wake
> capable when they are accepted.

My suggestion is that we do this via application so we let the user
decide if he wants or not to wake up the system, you may still opt-in
to always enable to wake up in your system setting if you choose to,
going this route actually means the user can select not to wake up if
the device is somewhat broken or misbehaving in some respect which is
not that uncommon nowadays.

> ---
>
>  profiles/input/device.c | 1 +
>  profiles/input/hog.c    | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/profiles/input/device.c b/profiles/input/device.c
> index 2cb3811c8..a6b0e8053 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_wake_capable(device, true);
>
>         return 0;
>  }
> diff --git a/profiles/input/hog.c b/profiles/input/hog.c
> index 83c017dcb..8627f3557 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_wake_capable(device, true);
>         return 0;
>  }
>
> --
> 2.25.0.341.g760bfbb309-goog
>


-- 
Luiz Augusto von Dentz



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux