Re: [PATCH v2] HID: i2c-hid: Skip SET_POWER SLEEP for Cirque touchpad on system suspend

From: Jiri Kosina
Date: Tue Jan 23 2024 - 05:26:49 EST


On Wed, 17 Jan 2024, Doug Anderson wrote:

> > There's a Cirque touchpad that wakes system up without anything
> > touched the touchpad. The input report is empty when this happens. The
> > reason is stated in HID over I2C spec, 7.2.8.2: "If the DEVICE wishes
> > to wake the HOST from its low power state, it can issue a wake by
> > asserting the interrupt."
> >
> > This is fine if OS can put system back to suspend by identifying input
> > wakeup count stays the same on resume, like Chrome OS Dark Resume [0].
> > But for regular distro such policy is lacking.
> >
> > Though the change doesn't bring any impact on power consumption for
> > touchpad is minimal, other i2c-hid device may depends on SLEEP control
> > power. So use a quirk to limit the change scope.
> >
> > [0] https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/power_manager/docs/dark_resume.md
> >
> > Signed-off-by: Kai-Heng Feng <kai.heng.feng@xxxxxxxxxxxxx>
> > ---
> > v2:
> > - Use quirk instead of applying the change universally.
> >
> > drivers/hid/hid-ids.h | 3 +++
> > drivers/hid/i2c-hid/i2c-hid-core.c | 6 +++++-
> > 2 files changed, 8 insertions(+), 1 deletion(-)
>
> This seems OK to me. As per my repy to v1, it doesn't feel fully
> explained what's going on. Why does it only wake the system without
> touches if you put it to sleep first? Is it truly a hardware quirk with
> the Cirque touchpad or is it a bug on the board you have it hooked up
> to? In any case, perhaps it doesn't matter since you said you measured
> power here and, on this touchpad it doesn't seem to save significant
> extra power to go into sleep mode. ...so I guess I'd be OK w/
>
> Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx>

Applied, thanks.

--
Jiri Kosina
SUSE Labs