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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jul 2017 12:37:20 +0000 (14:37 +0200)
commit4ac60b20f703f15a6a0e6607fd2d570510abb99a
treec73e26ed4ee0a226f6effa64d8e5b775b557ba8e
parent70f41003b9d18e24ad90b81be5a47a5f32e756d3
HID: i2c-hid: Add sleep between POWER ON and RESET

[ Upstream commit a89af4abdf9b353cdd6f61afc0eaaac403304873 ]

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: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/i2c-hid/i2c-hid.c