Skip to content

Commit d951ae1

Browse files
Matthias KaehlckeJiri Kosina
authored andcommitted
HID: i2c-hid: Report wakeup events
The i2c-hid driver generally supports wakeup, bit it currently doesn't report wakeup events to the PM subsystem. Change that. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1 parent 5af0660 commit d951ae1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/hid/i2c-hid/i2c-hid-core.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,9 +522,12 @@ static void i2c_hid_get_input(struct i2c_hid *ihid)
522522

523523
i2c_hid_dbg(ihid, "input: %*ph\n", ret_size, ihid->inbuf);
524524

525-
if (test_bit(I2C_HID_STARTED, &ihid->flags))
525+
if (test_bit(I2C_HID_STARTED, &ihid->flags)) {
526+
pm_wakeup_event(&ihid->client->dev, 0);
527+
526528
hid_input_report(ihid->hid, HID_INPUT_REPORT, ihid->inbuf + 2,
527529
ret_size - 2, 1);
530+
}
528531

529532
return;
530533
}

0 commit comments

Comments
 (0)