aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2022-01-10 09:56:27 +0100
committerJiri Kosina <jkosina@suse.cz>2022-01-10 09:56:27 +0100
commit906095af85e8b2e53ee9f8c50b3dff365aa09df8 (patch)
tree00c63a3578e4f941d6a21fed03e7fc05bf16f965 /drivers/hid
parentMerge branch 'for-5.17/hidraw' into for-linus (diff)
parentHID: i2c-hid: Report wakeup events (diff)
downloadlinux-dev-906095af85e8b2e53ee9f8c50b3dff365aa09df8.tar.xz
linux-dev-906095af85e8b2e53ee9f8c50b3dff365aa09df8.zip
Merge branch 'for-5.17/i2c-hid' into for-linus
- PM wakeup support for i2c-hid driver (Matthias Kaehlcke)
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 be00e07df06c..6726567d7297 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;
}