[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAO-hwJ+nrL9FD2jvkx6qngMrRQv8KmHWzYy-HOwKJ7TPHz-Xmg@mail.gmail.com>
Date: Wed, 8 Dec 2021 16:06:16 +0100
From: Benjamin Tissoires <benjamin.tissoires@...hat.com>
To: Tero Kristo <tero.kristo@...ux.intel.com>
Cc: "open list:HID CORE LAYER" <linux-input@...r.kernel.org>,
Jiri Kosina <jikos@...nel.org>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
lkml <linux-kernel@...r.kernel.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Peter Hutterer <peter.hutterer@...-t.net>
Subject: Re: [RFCv3 2/7] HID: hid-input: Add suffix also for HID_DG_PEN
On Wed, Dec 1, 2021 at 5:43 PM Tero Kristo <tero.kristo@...ux.intel.com> wrote:
>
> From: Mika Westerberg <mika.westerberg@...ux.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.
>
> Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
> ---
> drivers/hid/hid-input.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> index 39ebedb2323b..73c2edda742e 100644
> --- a/drivers/hid/hid-input.c
> +++ b/drivers/hid/hid-input.c
> @@ -1737,6 +1737,7 @@ static struct hid_input *hidinput_allocate(struct hid_device *hid,
> case HID_GD_MOUSE:
> suffix = "Mouse";
> break;
> + case HID_DG_PEN:
hid-multitouch overrides this in mt_input_configured() and sets
"Stylus" instead.
A common code would be best, but now I realizes that this would mean:
HID_DG_PEN -> "Stylus"
HID_DG_STYLUS -> "Pen"
This is part of the configuration API, because we can have
configuration snippets based on the device name :)
So ideally, we need:
this patch to add DG_PEN support in hid-input.c and remove the special
case from hid-multitouch, with a comment explaining the Pen/Stylus
mistake :)
Cheers,
Benjamin
> case HID_DG_STYLUS:
> suffix = "Pen";
> break;
> --
> 2.25.1
>
Powered by blists - more mailing lists