HID: i2c-hid: Use address probe to wake on resume
authorKenny Levinsen <kl@kl.wtf>
Mon, 29 Apr 2024 23:33:15 +0000 (01:33 +0200)
committerJiri Kosina <jkosina@suse.com>
Mon, 6 May 2024 21:27:37 +0000 (23:27 +0200)
commit7d6f065de37c31c37e56611efd41260c66c868ca
tree0a08cffd3c383abfc36a9c770ba1834b59fc40df
parentab5ec06a7070840bb64a125fe6e5b0ddcb36346c
HID: i2c-hid: Use address probe to wake on resume

Certain devices, both from STM and Weida Tech, need to be woken up after
having entered a deeper sleep state. The relevant places to wake up such
device is during our initial HID probe, and after resuming.

A retry for power commands was previously added to i2c_hid_set_power to
wake up Weida Tech devices, but lacked sufficient sleep for STM devices.
Replace the power command retry with the same address probe we using
during our initial HID probe.

Signed-off-by: Kenny Levinsen <kl@kl.wtf>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/i2c-hid/i2c-hid-core.c