mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
hid: usbhid: enable hid to wakeup system if it supports remote wakeup
Refer to E.2 (P67) of Device Class Definition for Human Interface
Devices V1.11, the bmAttributes field of the standard configuration
descriptor bit 5 should be set if the HID support Remote Wakeup.
This patch enable the usb HID to wake up the system if the HID
supports remote wakeup.
Change-Id: I169c49ff6187b6400b91633332a72964caca1a94
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit e1653e4dc5)
This commit is contained in:
parent
6e01437ec4
commit
243d0b8d2a
|
|
@ -1180,6 +1180,10 @@ static int usbhid_start(struct hid_device *hid)
|
|||
usbhid_set_leds(hid);
|
||||
device_set_wakeup_enable(&dev->dev, 1);
|
||||
}
|
||||
|
||||
if (dev->actconfig->desc.bmAttributes & USB_CONFIG_ATT_WAKEUP)
|
||||
device_set_wakeup_enable(&dev->dev, 1);
|
||||
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user