From: Yangfl <mmyangfl@gmail.com>
To: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] HID: kye: Add support for MousePen M508X
Date: Tue, 22 Nov 2022 19:55:22 +0800 [thread overview]
Message-ID: <CAAXyoMP3xCFD8hRJDxxaGun4i3SWsj51PorPq9kZAM91MSeHdA@mail.gmail.com> (raw)
In-Reply-To: <nycvar.YFH.7.76.2211221028170.6045@cbobk.fhfr.pm>
Jiri Kosina <jikos@kernel.org> 于2022年11月22日周二 17:29写道:
>
> On Sun, 20 Nov 2022, David Yang wrote:
>
> > Genius MousePen M508X digitizer tablet sends incorrect report descriptor by
> > default. This patch replaces it with a corrected one.
> >
> > Signed-off-by: David Yang <mmyangfl@gmail.com>
>
> Thanks for the fix. A few comments below.
>
> > @@ -626,18 +751,24 @@ static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc,
> > *rsize = sizeof(easypen_m610x_rdesc_fixed);
> > }
> > break;
> > - case USB_DEVICE_ID_KYE_EASYPEN_M406XE:
> > - if (*rsize == EASYPEN_M406XE_RDESC_ORIG_SIZE) {
> > - rdesc = easypen_m406xe_rdesc_fixed;
> > - *rsize = sizeof(easypen_m406xe_rdesc_fixed);
> > - }
> > - break;
> > case USB_DEVICE_ID_KYE_PENSKETCH_M912:
> > if (*rsize == PENSKETCH_M912_RDESC_ORIG_SIZE) {
> > rdesc = pensketch_m912_rdesc_fixed;
> > *rsize = sizeof(pensketch_m912_rdesc_fixed);
> > }
> > break;
> > + case USB_DEVICE_ID_KYE_MOUSEPEN_M508X:
> > + if (*rsize == MOUSEPEN_M508X_RDESC_ORIG_SIZE) {
> > + rdesc = mousepen_m508x_rdesc_fixed;
> > + *rsize = sizeof(mousepen_m508x_rdesc_fixed);
> > + }
> > + break;
> > + case USB_DEVICE_ID_KYE_EASYPEN_M406XE:
> > + if (*rsize == EASYPEN_M406XE_RDESC_ORIG_SIZE) {
> > + rdesc = easypen_m406xe_rdesc_fixed;
> > + *rsize = sizeof(easypen_m406xe_rdesc_fixed);
> > + }
> > + break;
>
> What is the reason for moving USB_DEVICE_ID_KYE_EASYPEN_M406XE around?
>
Reorder to match the sequence of device ids in hid-ids.h. Same below.
> > case USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE:
> > rdesc = kye_consumer_control_fixup(hdev, rdesc, rsize, 104,
> > "Genius Gila Gaming Mouse");
> > @@ -721,8 +852,9 @@ static int kye_probe(struct hid_device *hdev, const struct hid_device_id *id)
> > case USB_DEVICE_ID_KYE_MOUSEPEN_I608X:
> > case USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2:
> > case USB_DEVICE_ID_KYE_EASYPEN_M610X:
> > - case USB_DEVICE_ID_KYE_EASYPEN_M406XE:
> > case USB_DEVICE_ID_KYE_PENSKETCH_M912:
> > + case USB_DEVICE_ID_KYE_MOUSEPEN_M508X:
> > + case USB_DEVICE_ID_KYE_EASYPEN_M406XE:
>
> Same here.
>
> > ret = kye_tablet_enable(hdev);
> > if (ret) {
> > hid_err(hdev, "tablet enabling failed\n");
> > @@ -756,6 +888,10 @@ static const struct hid_device_id kye_devices[] = {
> > USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2) },
> > { HID_USB_DEVICE(USB_VENDOR_ID_KYE,
> > USB_DEVICE_ID_KYE_EASYPEN_M610X) },
> > + { HID_USB_DEVICE(USB_VENDOR_ID_KYE,
> > + USB_DEVICE_ID_KYE_PENSKETCH_M912) },
> > + { HID_USB_DEVICE(USB_VENDOR_ID_KYE,
> > + USB_DEVICE_ID_KYE_MOUSEPEN_M508X) },
> > { HID_USB_DEVICE(USB_VENDOR_ID_KYE,
> > USB_DEVICE_ID_KYE_EASYPEN_M406XE) },
> > { HID_USB_DEVICE(USB_VENDOR_ID_KYE,
> > @@ -764,8 +900,6 @@ static const struct hid_device_id kye_devices[] = {
> > USB_DEVICE_ID_GENIUS_GX_IMPERATOR) },
> > { HID_USB_DEVICE(USB_VENDOR_ID_KYE,
> > USB_DEVICE_ID_GENIUS_MANTICORE) },
> > - { HID_USB_DEVICE(USB_VENDOR_ID_KYE,
> > - USB_DEVICE_ID_KYE_PENSKETCH_M912) },
>
> This looks unrelated and incorrect, why are you dropping
> USB_DEVICE_ID_KYE_PENSKETCH_M912 from the device table?
>
USB_DEVICE_ID_KYE_PENSKETCH_M912 is moved upward, see -756,6 +888,10.
> Thanks,
>
> --
> Jiri Kosina
> SUSE Labs
>
prev parent reply other threads:[~2022-11-22 11:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-19 17:46 [PATCH] HID: kye: Add support for MousePen M508X David Yang
2022-11-19 19:17 ` [PATCH v2] " David Yang
2022-11-19 20:50 ` [PATCH v3] " David Yang
2022-11-22 9:29 ` Jiri Kosina
2022-11-22 11:55 ` Yangfl [this message]
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=CAAXyoMP3xCFD8hRJDxxaGun4i3SWsj51PorPq9kZAM91MSeHdA@mail.gmail.com \
--to=mmyangfl@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).