linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tero Kristo <tero.kristo@linux.intel.com>
To: linux-input@vger.kernel.org, benjamin.tissoires@redhat.com,
	jikos@kernel.org, mika.westerberg@linux.intel.com,
	tero.kristo@linux.intel.com
Cc: linux-kernel@vger.kernel.org, dmitry.torokhov@gmail.com,
	peter.hutterer@who-t.net
Subject: [PATCHv4 2/5] HID: hid-input: Add suffix also for HID_DG_PEN
Date: Fri, 10 Dec 2021 13:11:35 +0200	[thread overview]
Message-ID: <20211210111138.1248187-3-tero.kristo@linux.intel.com> (raw)
In-Reply-To: <20211210111138.1248187-1-tero.kristo@linux.intel.com>

From: Mika Westerberg <mika.westerberg@linux.intel.com>

This and HID_DG_STYLUS are pretty much the same thing so add suffix for
HID_DG_PEN too. This makes the input device name look better.

While doing this, remove the suffix override from hid-multitouch, as it
is now handled by hid-input. Also, the suffix override done by
hid-multitouch was wrong, as it mapped HID_DG_PEN => "Stylus" and
HID_DG_STYLUS => "Pen".

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Tero Kristo <tero.kristo@linux.intel.com>
---
 drivers/hid/hid-input.c      | 1 +
 drivers/hid/hid-multitouch.c | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index ad718ceb8af3..78205e445652 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -1741,6 +1741,7 @@ static struct hid_input *hidinput_allocate(struct hid_device *hid,
 		case HID_GD_MOUSE:
 			suffix = "Mouse";
 			break;
+		case HID_DG_PEN:
 		case HID_DG_STYLUS:
 			suffix = "Pen";
 			break;
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 082376a6cb3d..99eabfb4145b 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -1606,9 +1606,6 @@ static int mt_input_configured(struct hid_device *hdev, struct hid_input *hi)
 	case HID_DG_STYLUS:
 		/* force BTN_STYLUS to allow tablet matching in udev */
 		__set_bit(BTN_STYLUS, hi->input->keybit);
-		fallthrough;
-	case HID_DG_PEN:
-		suffix = "Stylus";
 		break;
 	default:
 		suffix = "UNKNOWN";
-- 
2.25.1


  parent reply	other threads:[~2021-12-10 11:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10 11:11 [PATCHv4 0/5] HID: initial USI support patches Tero Kristo
2021-12-10 11:11 ` [PATCHv4 1/5] HID: Add map_msc() to avoid boilerplate code Tero Kristo
2021-12-10 11:11 ` Tero Kristo [this message]
2021-12-10 16:21   ` [PATCHv4 2/5] HID: hid-input: Add suffix also for HID_DG_PEN Benjamin Tissoires
2021-12-10 17:51     ` Tero Kristo
2021-12-14 12:35       ` Benjamin Tissoires
2021-12-14 12:50         ` Tero Kristo
2021-12-10 11:11 ` [PATCHv4 3/5] HID: Add hid usages for USI style pens Tero Kristo
2021-12-10 11:11 ` [PATCHv4 4/5] HID: input: Make hidinput_find_field() static Tero Kristo
2021-12-10 11:11 ` [PATCHv4 5/5] HID: debug: Add USI usages Tero Kristo

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=20211210111138.1248187-3-tero.kristo@linux.intel.com \
    --to=tero.kristo@linux.intel.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=peter.hutterer@who-t.net \
    /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).