linux/drivers/hid/i2c-hid
Hans de Goede af93a167ed HID: i2c-hid: Move i2c_hid_finish_hwreset() to after reading the report-descriptor
A recent bug made me look at Microsoft's i2c-hid docs again
and I noticed the following:

"""
4. Issue a RESET (Host Initiated Reset) to the Device.
5. Retrieve report descriptor from the device.

Note: Steps 4 and 5 may be done in parallel to optimize for time on I²C.
Since report descriptors are (a) static and (b) quite long, Windows 8 may
issue a request for 5 while it is waiting for a response from the device
on 4.
"""

Which made me think that maybe on some touchpads the reset ack is delayed
till after the report descriptor is read ?

Testing a T-BAO Tbook Air 12.5 with a 0911:5288 (SIPODEV SP1064?) touchpad,
for which the I2C_HID_QUIRK_NO_IRQ_AFTER_RESET quirk was first introduced,
shows that reading the report descriptor before waiting for the reset
helps with the missing reset IRQ. Now the reset does get acked properly,
but the ack sometimes still does not happen unfortunately.

Still moving the wait for ack to after reading the report-descriptor,
is probably a good idea, both to make i2c-hid's behavior closer to
Windows as well as to speed up probing i2c-hid devices.

While at it drop the dbg_hid() for a malloc failure, malloc failures
already get logged extensively by malloc itself.

Link: https://bugzilla.redhat.com/show_bug.cgi?id=2247751
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2023-12-06 11:48:40 +01:00
..
i2c-hid-acpi.c HID: i2c-hid: Switch i2c drivers back to use .probe() 2023-06-08 16:21:55 +02:00
i2c-hid-core.c HID: i2c-hid: Move i2c_hid_finish_hwreset() to after reading the report-descriptor 2023-12-06 11:48:40 +01:00
i2c-hid-dmi-quirks.c HID: retain initial quirks set up when creating HID devices 2023-02-09 14:24:30 +01:00
i2c-hid-of-elan.c HID: i2c-hid: elan: Add ili9882t timing 2023-08-21 17:21:43 +02:00
i2c-hid-of-goodix.c Merge branch 'for-6.5/i2c-hid' into for-linus 2023-06-27 22:42:28 +02:00
i2c-hid-of.c HID: i2c-hid: Switch i2c drivers back to use .probe() 2023-06-08 16:21:55 +02:00
i2c-hid.h HID: multitouch: Add quirks for flipped axes 2023-01-18 10:08:51 +01:00
Kconfig HID: i2c-hid: add more DRM dependencies 2023-08-03 07:36:41 -07:00
Makefile HID: i2c-hid: elan: Add support for Elan eKTH6915 i2c-hid touchscreens 2022-06-08 11:46:23 +02:00