]> git.baikalelectronics.ru Git - kernel.git/commit
HID: wacom: set initial hardware touch switch state to 'off'
authorPing Cheng <ping.cheng@wacom.com>
Mon, 19 Jul 2021 20:55:29 +0000 (13:55 -0700)
committerJiri Kosina <jkosina@suse.cz>
Wed, 28 Jul 2021 09:45:40 +0000 (11:45 +0200)
commitfcb5902d3c63f28b5cde1a44f87ee50dad1dcca7
tree0b6c6238797d7191b3d05f33ced86987954e50a4
parent93b2d1fd302f1162f17f1d2b36b3c412a25a9e88
HID: wacom: set initial hardware touch switch state to 'off'

Wacom touch devices have two types of touch switches: softkey touch
toggle and hardware touch switch. For softkey toggle, we assume
touch is on by default in the driver. However the hardware touch
switch is controlled by end users. We don't know if it's on or off
before getting the status event.

This patch sets touch off for devices with a hardware switch until we
get the status. This is a bit safer for users who leave the switch "off"
and don't want any accidental touches. The tradeoff is a slight delay
between device connection and touch becoming enabled for users who
leave the switch "on".

Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Tested-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_sys.c
drivers/hid/wacom_wac.c
drivers/hid/wacom_wac.h