Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Angela Czubak and committed by
Benjamin Tissoires
7a56e7b2 b44779d4

+3 -2
+3 -2
drivers/hid/hid-input.c
··· 683 683 if (field->report_count < 1) 684 684 goto ignore; 685 685 686 - /* only LED usages are supported in output fields */ 686 + /* only LED and HAPTIC usages are supported in output fields */ 687 687 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) { 689 690 goto ignore; 690 691 } 691 692