• Nicolas Boichat's avatar
    HID: google: Get HID report on probe to confirm tablet switch state · df7b6229
    Nicolas Boichat authored
    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: default avatarNicolas Boichat <drinkcat@chromium.org>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    df7b6229
hid-google-hammer.c 15.1 KB