HID: uclogic: Support faking Wacom pad device ID
Add support for inserting a Wacom pad device ID into hid-uclogic reports. This allows reporting dial inputs in a way compatible with the Wacom driver. Needed for Ugee G5 support in particular. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
This commit is contained in:

committed by
Benjamin Tissoires

parent
08367be171
commit
fde44ac556
@@ -300,6 +300,16 @@ static int uclogic_raw_event(struct hid_device *hdev,
|
||||
}
|
||||
}
|
||||
|
||||
/* Tweak frame control reports, if necessary */
|
||||
if ((report->type == HID_INPUT_REPORT) &&
|
||||
(report->id == params->frame.id)) {
|
||||
/* If need to, and can, set pad device ID for Wacom drivers */
|
||||
if (params->frame.dev_id_byte > 0 &&
|
||||
params->frame.dev_id_byte < size) {
|
||||
data[params->frame.dev_id_byte] = 0xf;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user