Skip to content

Commit 7a56e7b

Browse files
Angela CzubakBenjamin Tissoires
authored andcommitted
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>
1 parent b44779d commit 7a56e7b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

drivers/hid/hid-input.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,9 +683,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
683683
if (field->report_count < 1)
684684
goto ignore;
685685

686-
/* only LED usages are supported in output fields */
686+
/* only LED and HAPTIC usages are supported in output fields */
687687
if (field->report_type == HID_OUTPUT_REPORT &&
688-
(usage->hid & HID_USAGE_PAGE) != HID_UP_LED) {
688+
(usage->hid & HID_USAGE_PAGE) != HID_UP_LED &&
689+
(usage->hid & HID_USAGE_PAGE) != HID_UP_HAPTIC) {
689690
goto ignore;
690691
}
691692

0 commit comments

Comments
 (0)