summaryrefslogtreecommitdiffstats
path: root/drivers/hid/usbhid/hid-core.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-05-29 17:14:21 +0200
committerJiri Kosina <jkosina@suse.cz>2021-06-25 14:02:58 +0200
commit24e166f43e93de0e9b0a460ecfe4bab1f12212d7 (patch)
tree742acbeb0c903086fc3008ad795c7a15ee40705d /drivers/hid/usbhid/hid-core.c
parent231bc539066760aaa44d46818c85b14ca2f56d9f (diff)
downloadlinux-stable-24e166f43e93de0e9b0a460ecfe4bab1f12212d7.tar.gz
linux-stable-24e166f43e93de0e9b0a460ecfe4bab1f12212d7.tar.bz2
linux-stable-24e166f43e93de0e9b0a460ecfe4bab1f12212d7.zip
HID: core: Add hid_hw_may_wakeup() function
Add a hid_hw_may_wakeup() function, which is the equivalent of device_may_wakeup() for hid devices. In most cases this just returns device_may_wakeup(hdev->dev.parent), but for some ll-drivers this is not correct. E.g. usb_hid_driver instantiated hid devices have their parent set to the usb-interface to which the usb_hid_driver is bound, but the power/wakeup* sysfs attributes are part of the usb-device, which is the usb-interface's parent. For these special cases a new may_wakeup callback is added to hid_ll_driver, so that ll-drivers can override the default behavior. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/usbhid/hid-core.c')
0 files changed, 0 insertions, 0 deletions