Re: [PATCH] hid: i2c: let RMI devices decide what constitutes wakeup event
From: Jiri Kosina
Date: Mon Nov 21 2022 - 12:57:07 EST
On Fri, 18 Nov 2022, Dmitry Torokhov wrote:
> 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: d951ae1ce803 ("HID: i2c-hid: Report wakeup events")
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
Applied, thanks Dmitry.
--
Jiri Kosina
SUSE Labs