• José Expósito's avatar
    HID: uclogic: Handle wireless device reconnection · a251d657
    José Expósito authored
    UGEEv2 tablets with battery can be connected using a USB cable or a USB
    Bluetooth dongle.
    
    When the Bluetooth dongle is used, the connection to that tablet can be
    lost because the tablet is out of the range of the receiver or because
    it was switched off using the switch placed in the back of the tablet's
    frame.
    
    After losing connection, the tablet is able to reconnect automatically
    and its firmware sends a special packet indicating that the device was
    reconnected. In response to this packet, the tablet needs to receive the
    same array of magic data it expects on probe to enable its interfaces.
    
    This patch implements a generic mechanism to hook raw events and
    schedule a work to perform any custom action.
    Tested-by: default avatarMia Kanashi <chad@redpilled.dev>
    Tested-by: default avatarAndreas Grosse <andig.mail@t-online.de>
    Signed-off-by: default avatarJosé Expósito <jose.exposito89@gmail.com>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    a251d657
hid-uclogic-core-test.c 2.5 KB