Skip to content

Commit 622d97c

Browse files
jwrdegoedeJiri Kosina
authored andcommitted
HID: logitech-dj: Implement may_wakeup ll-driver callback
Without a ll-driver callback hid_hw_may_wakeup() will return: device_may_wakeup(hdev->dev.parent), but for the hid devices instantiated by logitech-dj for devices behind the receiver the logitech-dj hid(pp)-device is the parent. Add a logi_dj_ll_may_wakeup() callback which calls hid_hw_may_wakeup() on the logitech-dj hid(pp) parent-hid-device. Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 978e786 commit 622d97c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/hid/hid-logitech-dj.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,6 +1489,13 @@ static void logi_dj_ll_stop(struct hid_device *hid)
14891489
dbg_hid("%s\n", __func__);
14901490
}
14911491

1492+
static bool logi_dj_ll_may_wakeup(struct hid_device *hid)
1493+
{
1494+
struct dj_device *djdev = hid->driver_data;
1495+
struct dj_receiver_dev *djrcv_dev = djdev->dj_receiver_dev;
1496+
1497+
return hid_hw_may_wakeup(djrcv_dev->hidpp);
1498+
}
14921499

14931500
static struct hid_ll_driver logi_dj_ll_driver = {
14941501
.parse = logi_dj_ll_parse,
@@ -1497,6 +1504,7 @@ static struct hid_ll_driver logi_dj_ll_driver = {
14971504
.open = logi_dj_ll_open,
14981505
.close = logi_dj_ll_close,
14991506
.raw_request = logi_dj_ll_raw_request,
1507+
.may_wakeup = logi_dj_ll_may_wakeup,
15001508
};
15011509

15021510
static int logi_dj_dj_event(struct hid_device *hdev,

0 commit comments

Comments
 (0)