Re: [PATCH] usb:gadget:hid: Remote wakeup support

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

 



On Fri, Jun 30, 2017 at 2:48 PM, Abdulhadi Mohamed
<abdulahhadi2@xxxxxxxxx> wrote:
> Currently linux HID gadgets do not support remote wakeup (the ability
> to wake up a host from suspend). This is an important feature for
> gadgets that want to properly emulate the normal operation of a mouse
> and keyboard. Ultimately, This feature has to be enabled/supported by
> the underlying UDC driver to have any impact.

Is this a new version of a patch? Is it a resend? There is no version number :-/


> Signed-off-by: Abdulhadi Mohamed <abdulahhadi2@xxxxxxxxx>
> ---
>  drivers/usb/gadget/function/f_hid.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c
> index c60b882..eeb01bd 100644
> --- a/drivers/usb/gadget/function/f_hid.c
> +++ b/drivers/usb/gadget/function/f_hid.c
> @@ -339,6 +339,7 @@ static ssize_t f_hidg_write(struct file *file, const char __user *buffer,
>                             size_t count, loff_t *offp)
>  {
>         struct f_hidg *hidg  = file->private_data;
> +       struct usb_composite_dev *cdev = hidg->func.config->cdev;
>         struct usb_request *req;
>         unsigned long flags;
>         ssize_t status = -ENOMEM;
> @@ -346,6 +347,7 @@ static ssize_t f_hidg_write(struct file *file, const char __user *buffer,
>         if (!access_ok(VERIFY_READ, buffer, count))
>                 return -EFAULT;
>
> +       usb_gadget_wakeup(cdev->gadget);
>         spin_lock_irqsave(&hidg->write_spinlock, flags);
>
>  #define WRITE_COND (!hidg->write_pending)
> --
> 2.9.3
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux