summaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorMatthias Kaehlcke <mka@chromium.org>2021-11-02 21:40:25 +0300
committerJiri Kosina <jkosina@suse.cz>2021-11-19 17:50:31 +0300
commitd951ae1ce8033dea91c532810536809d0e691615 (patch)
tree3257c4bfe349dcc25276b6c28a2856928da9d1b0 /drivers/hid
parent5af06603c4090617be216a9185193a7be3ca60af (diff)
downloadlinux-d951ae1ce8033dea91c532810536809d0e691615.tar.xz
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>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/i2c-hid/i2c-hid-core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c
index 517141138b00..68d9a089e3e8 100644
--- a/drivers/hid/i2c-hid/i2c-hid-core.c
+++ b/drivers/hid/i2c-hid/i2c-hid-core.c
@@ -522,9 +522,12 @@ static void i2c_hid_get_input(struct i2c_hid *ihid)
i2c_hid_dbg(ihid, "input: %*ph\n", ret_size, ihid->inbuf);
- if (test_bit(I2C_HID_STARTED, &ihid->flags))
+ if (test_bit(I2C_HID_STARTED, &ihid->flags)) {
+ pm_wakeup_event(&ihid->client->dev, 0);
+
hid_input_report(ihid->hid, HID_INPUT_REPORT, ihid->inbuf + 2,
ret_size - 2, 1);
+ }
return;
}