]> 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)
commit83030bb75dff30abd112b0bb405a281c1012a81c
treeec631cbde3f2d1d1ff29f8f0e71a673cdc0319ef
parent523e674c92231a82a957250f302c82e34caebff5
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