linux-stable/drivers/hid/i2c-hid
Dmitry Torokhov ea829fbcb7 HID: i2c: let RMI devices decide what constitutes wakeup event
[ Upstream commit 9984fbf55b ]

HID-RMI is special in the sense that it does not carry HID events
directly, but rather uses HID protocol as a wrapper/transport for RMI
protocol.  Therefore we should not assume that all data coming from the
device via interrupt is associated with user activity and report wakeup
event indiscriminately, but rather let HID-RMI do that when appropriate.

HID-RMI devices tag responses to the commands issued by the host as
RMI_READ_DATA_REPORT_ID whereas motion and other input events from the
device are tagged as RMI_ATTN_REPORT_ID. Change hid-rmi to report wakeup
events when receiving the latter packets. This allows ChromeOS to
accurately identify wakeup source and make correct decision on the mode
of the resume the system should take ("dark" where the display stays off
vs normal one).

Fixes: d951ae1ce8 ("HID: i2c-hid: Report wakeup events")
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:26:00 +01:00
..
i2c-hid-acpi.c HID: i2c-hid-of: Expose the touchscreen-inverted properties 2021-12-14 11:38:04 +01:00
i2c-hid-core.c HID: i2c: let RMI devices decide what constitutes wakeup event 2022-12-31 13:26:00 +01:00
i2c-hid-dmi-quirks.c HID: i2c-hid: add Vero K147 to descriptor override 2020-11-27 16:17:49 +01:00
i2c-hid-of-elan.c HID: i2c-hid: elan: Add support for Elan eKTH6915 i2c-hid touchscreens 2022-06-08 11:46:23 +02:00
i2c-hid-of-goodix.c HID: i2c-hid: goodix: Fix a lockdep splat 2022-02-02 14:47:46 +01:00
i2c-hid-of.c HID: i2c-hid-of: Expose the touchscreen-inverted properties 2021-12-14 11:38:04 +01:00
i2c-hid.h HID: i2c-hid-of: Expose the touchscreen-inverted properties 2021-12-14 11:38:04 +01:00
Kconfig HID: fix I2C_HID not selected when I2C_HID_OF_ELAN is 2022-12-14 11:40:55 +01:00
Makefile HID: i2c-hid: elan: Add support for Elan eKTH6915 i2c-hid touchscreens 2022-06-08 11:46:23 +02:00