• Dmitry Torokhov's avatar
    HID: google: whiskers: more robust tablet mode detection · 38e57f06
    Dmitry Torokhov authored
    The USB interface may get detected before the platform/EC one, so let's
    note the state of the base (if we receive event) and use it to correctly
    initialize the tablet mode switch state.
    
    Also let's start the HID interface immediately when probing, this will
    ensure that we correctly process "base folded" events that may be sent
    as we initialize the base. Note that this requires us to add a remove()
    function where we stop and close the hardware and switch the LED
    registration away from devm interface as we need to make sure that we
    destroy the LED instance before we stop the hardware.
    Signed-off-by: default avatarDmitry Torokhov <dtor@chromium.org>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    38e57f06
hid-google-hammer.c 13.4 KB