linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Denose <jdenose@google.com>
To: Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <bentiss@kernel.org>,
	 Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>,
	 Henrik Rydberg <rydberg@bitmath.org>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-doc@vger.kernel.org, Angela Czubak <aczubak@google.com>,
	 "Sean O'Brien" <seobrien@google.com>,
	Jonathan Denose <jdenose@google.com>
Subject: [PATCH v2 05/11] HID: input: allow mapping of haptic output
Date: Mon, 04 Aug 2025 14:11:20 +0000	[thread overview]
Message-ID: <20250804-support-forcepads-v2-5-138ca980261d@google.com> (raw)
In-Reply-To: <20250804-support-forcepads-v2-0-138ca980261d@google.com>

From: Angela Czubak <aczubak@google.com>

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>
---
 drivers/hid/hid-input.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 9d80635a91ebd8d8bdafaac07b5f85693b179cb4..d42c1fbd20a1cc01c04f93cf10f1d1c18043929c 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -682,9 +682,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;
 	}
 

-- 
2.50.1.565.gc32cd1483b-goog


  parent reply	other threads:[~2025-08-04 14:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-04 14:11 [PATCH v2 00/11] HID: Implement haptic touchpad support Jonathan Denose
2025-08-04 14:11 ` [PATCH v2 01/11] HID: add haptics page defines Jonathan Denose
2025-08-04 14:11 ` [PATCH v2 02/11] Input: add FF_HID effect type Jonathan Denose
2025-08-04 20:34   ` tomasz.pakula.oficjalny
2025-08-11 15:26     ` Jonathan Denose
2025-08-04 14:11 ` [PATCH v2 03/11] Input: add INPUT_PROP_HAPTIC_TOUCHPAD Jonathan Denose
2025-08-04 14:11 ` [PATCH v2 04/11] HID: haptic: introduce hid_haptic_device Jonathan Denose
2025-08-04 14:11 ` Jonathan Denose [this message]
2025-08-04 14:11 ` [PATCH v2 06/11] HID: haptic: initialize haptic device Jonathan Denose
2025-08-04 14:11 ` [PATCH v2 07/11] HID: input: calculate resolution for pressure Jonathan Denose
2025-08-04 14:11 ` [PATCH v2 08/11] HID: haptic: add functions handling events Jonathan Denose
2025-08-04 14:11 ` [PATCH v2 09/11] Input: MT - add INPUT_MT_TOTAL_FORCE flags Jonathan Denose
2025-08-04 14:11 ` [PATCH v2 10/11] HID: haptic: add hid_haptic_switch_mode Jonathan Denose
2025-08-04 14:11 ` [PATCH v2 11/11] HID: multitouch: add haptic multitouch support Jonathan Denose
2025-08-13  9:22   ` Benjamin Tissoires
2025-08-13 15:52     ` Jonathan Denose
  -- strict thread matches above, loose matches on Subject: below --
2025-08-18 14:28 [PATCH v2 00/11] HID: Implement haptic touchpad support Jonathan Denose
2025-08-18 14:28 ` [PATCH v2 05/11] HID: input: allow mapping of haptic output Jonathan Denose

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250804-support-forcepads-v2-5-138ca980261d@google.com \
    --to=jdenose@google.com \
    --cc=aczubak@google.com \
    --cc=bentiss@kernel.org \
    --cc=corbet@lwn.net \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rydberg@bitmath.org \
    --cc=seobrien@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).