• H
    HID: core: Add hid_hw_may_wakeup() function · 24e166f4
    Hans de Goede 提交于
    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: NHans de Goede <hdegoede@redhat.com>
    Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
    Signed-off-by: NJiri Kosina <jkosina@suse.cz>
    24e166f4
hid.h 37.4 KB