HID: input: allow mapping of haptic output

This change makes it possible to parse output reports by input mapping
functions by HID drivers.

Signed-off-by: Angela Czubak <aczubak@google.com>
Co-developed-by: Jonathan Denose <jdenose@google.com>
Signed-off-by: Jonathan Denose <jdenose@google.com>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
This commit is contained in:
Angela Czubak
2025-09-15 14:32:54 +02:00
committed by Benjamin Tissoires
parent b44779d44f
commit 7a56e7b211
+3 -2
View File
@@ -683,9 +683,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
if (field->report_count < 1)
goto ignore;
/* only LED usages are supported in output fields */
/* only LED and HAPTIC usages are supported in output fields */
if (field->report_type == HID_OUTPUT_REPORT &&
(usage->hid & HID_USAGE_PAGE) != HID_UP_LED) {
(usage->hid & HID_USAGE_PAGE) != HID_UP_LED &&
(usage->hid & HID_USAGE_PAGE) != HID_UP_HAPTIC) {
goto ignore;
}