]> git.baikalelectronics.ru Git - kernel.git/commit
HID: google: Get HID report on probe to confirm tablet switch state
authorNicolas Boichat <drinkcat@chromium.org>
Fri, 15 Jan 2021 05:42:16 +0000 (13:42 +0800)
committerJiri Kosina <jkosina@suse.cz>
Tue, 2 Feb 2021 10:30:23 +0000 (11:30 +0100)
commit5f7f76c0a7bcc27c92caecefddaadc8591dd681a
treeec631cbde3f2d1d1ff29f8f0e71a673cdc0319ef
parentf87d708784fbae29eef4a5f99b0517dacd59c6bd
HID: google: Get HID report on probe to confirm tablet switch state

This forces reading the base folded state anytime the device is
probed, to make sure it's in sync.

This is useful after a reboot, if the device re-enumerates for
any reason (e.g. ESD shock), or if the driver is unbound/rebound
(debugging/testing).

Without this, the tablet switch state is only synchronized after a
key is pressed (since the device would then send a report that
includes the switch state), leading to strange UX (e.g. UI
mode changes when a key is pressed after reboot).

This is not a problem on detachable base attach, as the device,
by itself, sends a report after it is booted up.

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-google-hammer.c