mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "José Expósito" <jose.exposito89@gmail.com>
To: jikos@kernel.org
Cc: benjamin.tissoires@redhat.com, spbnick@gmail.com,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	"José Expósito" <jose.exposito89@gmail.com>
Subject: [PATCH for-5.19/uclogic 5/5] HID: uclogic: Disable pen usage for Huion keyboard interfaces
Date: Thu, 21 Apr 2022 19:50:52 +0200	[thread overview]
Message-ID: <20220421175052.911446-6-jose.exposito89@gmail.com> (raw)
In-Reply-To: <20220421175052.911446-1-jose.exposito89@gmail.com>

From: Nikolai Kondrashov <spbnick@gmail.com>

Disable pen usage inputs for Huion interfaces reporting on-the-frame
buttons. We don't want to change those, as they mostly work, but we want
to avoid creation of a mute pen interface, confusing to users.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/hid/hid-uclogic-params.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c
index b85585ac3372..22f9c4f9da8a 100644
--- a/drivers/hid/hid-uclogic-params.c
+++ b/drivers/hid/hid-uclogic-params.c
@@ -713,7 +713,8 @@ static int uclogic_params_huion_init(struct uclogic_params *params,
 
 	/* If it's a custom keyboard interface */
 	if (bInterfaceNumber == 1) {
-		/* Keep everything intact */
+		/* Keep everything intact, but mark pen usage invalid */
+		p.pen.usage_invalid = true;
 		goto output;
 	/* Else, if it's not a pen interface */
 	} else if (bInterfaceNumber != 0) {
-- 
2.25.1


  parent reply	other threads:[~2022-04-21 17:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21 17:50 [PATCH for-5.19/uclogic 0/5] DIGImend patches, part V José Expósito
2022-04-21 17:50 ` [PATCH for-5.19/uclogic 1/5] HID: uclogic: Clarify params desc_size description José Expósito
2022-04-21 17:50 ` [PATCH for-5.19/uclogic 2/5] HID: uclogic: Clarify pen/frame desc_ptr description José Expósito
2022-04-21 17:50 ` [PATCH for-5.19/uclogic 3/5] HID: uclogic: Pass keyboard reports as is José Expósito
2022-04-21 17:50 ` [PATCH for-5.19/uclogic 4/5] HID: uclogic: Support disabling pen usage José Expósito
2022-04-21 17:50 ` José Expósito [this message]
2022-05-06  6:35 ` [PATCH for-5.19/uclogic 0/5] DIGImend patches, part V Jiri Kosina

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=20220421175052.911446-6-jose.exposito89@gmail.com \
    --to=jose.exposito89@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spbnick@gmail.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

all inboxes | Powered by JetHome®