From: Angela Czubak Date: Mon, 18 Aug 2025 23:08:46 +0000 (+0000) Subject: HID: input: allow mapping of haptic output X-Git-Tag: v6.18-rc1~81^2~7^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a56e7b211e5b6e78cd87786ea4c5a62231d1da2;p=thirdparty%2Flinux.git 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 Co-developed-by: Jonathan Denose Signed-off-by: Jonathan Denose Reviewed-by: Dmitry Torokhov Signed-off-by: Benjamin Tissoires --- diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index f45f856a127fe..f6a920fe3102e 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -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; }