• J
    HID: wacom: generic: Support and use 'Custom HID' mode and usages · c9c09587
    Jason Gerecke 提交于
    Wacom's new "MobileStudio Pro" tablets are the first devices in their
    branded product line-up to include a usable HID descriptor for the pen
    interface. Like prior branded products, the device can operate in one
    of two modes: 'Standard HID', and 'Wacom Custom HID'. Although the
    first mode is usable by the HID_GENERIC codepath as-is (huzzah!), it is
    subject to some restrictions -- most notably pressure being limited
    to 2048 levels instead of 8192. To ensure tablets that include support
    for Custom HID mode work optimally, we add support for its usages and
    switch the device to Custom HID mode if possible.
    
    The usages defined for Custom HID mode are often numerically similar to
    their standard HID equivalents, allowing us to write a simple translation
    function that takes arbitrary HID usages as input and which returns
    the corresponding standard HID usage as output (if one exists). Switching
    on this translated usage instead of the actual usage allows the existing
    cases to apply to both modes of operation without having to explicitly
    define every Custom HID usage.
    Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
    Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
    Signed-off-by: NJiri Kosina <jkosina@suse.cz>
    c9c09587
wacom_wac.h 6.2 KB