HID: i2c-hid: Add a small delay after sleep command for Raydium touchpanel
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Fri, 5 Oct 2018 04:46:29 +0000 (12:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Nov 2018 15:13:02 +0000 (16:13 +0100)
commit48d49b635b66f3017ecd795c211190d6d1beca57
tree952c3462dc42cb182997021ca1c8d39a295a63a4
parent1d5dfce77c957056f9d92fffa1df7daea757ba13
HID: i2c-hid: Add a small delay after sleep command for Raydium touchpanel

[ Upstream commit 00b790ea545b6ef30221adef6e9c3707e03b82b5 ]

Raydium touchpanel (2386:4B33) sometimes does not work in desktop session
although it works in display manager.

During user logging, the display manager exits, close the HID device,
then the device gets runtime suspended and powered off. The desktop
session begins shortly after, opens the HID device, then the device gets
runtime resumed and powered on.

If the trasition from display manager to desktop sesesion is fast, the
touchpanel cannot switch from powered off to powered on in short
timeframe. So add a small delay to workaround the issue.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/hid-ids.h
drivers/hid/i2c-hid/i2c-hid.c