HID: i2c-hid: Add sleep between POWER ON and RESET
authorBrendan McGrath <redmcg@redmandi.dyndns.org>
Fri, 6 Jan 2017 21:01:38 +0000 (08:01 +1100)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Jun 2017 12:04:41 +0000 (14:04 +0200)
commit02f1f3f6b8eea3f16c8ada4da8a89688bf4cd525
tree457a3912953081870920a6dd1452c475eb6e7de3
parent2ee4455f07c9e4fffe2ff126c003f31f55b26ff6
HID: i2c-hid: Add sleep between POWER ON and RESET

commit a89af4abdf9b353cdd6f61afc0eaaac403304873 upstream.

Support for the Asus Touchpad was recently added. It turns out this
device can fail initialisation (and become unusable) when the RESET
command is sent too soon after the POWER ON command.

Unfortunately the i2c-hid specification does not specify the need for
a delay between these two commands. But it was discovered the Windows
driver has a 1ms delay.

As a result, this patch modifies the i2c-hid module to add a sleep
inbetween the POWER ON and RESET commands which lasts between 1ms and 5ms.

See https://github.com/vlasenko/hid-asus-dkms/issues/24 for further
details.

Signed-off-by: Brendan McGrath <redmcg@redmandi.dyndns.org>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/hid/i2c-hid/i2c-hid.c