From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Derya <derya.kiran@yahoo.de>
Cc: linux-input <linux-input@vger.kernel.org>, Jiri Kosina <jkosina@suse.cz>
Subject: Re: [PATCH 2/2] Surface Pro 2 USB composite device handling
Date: Mon, 10 Mar 2014 16:23:25 -0400 [thread overview]
Message-ID: <20140310202325.GB4125@mail.corp.redhat.com> (raw)
In-Reply-To: <531CAB67.4020202@yahoo.de>
On Mar 09 2014 or thereabouts, Derya wrote:
> Surface Pro 2 USB composite device handling
>
> (device changes it product id with attached keyboard cover)
> - Adds MS Surface Pro 2's composite device ids, with and without attached
> keyboard, to the hid-ids
> - Ensures to load hid-core instead of hid-multitouch for the keyboard covers
> - Adds HID_QUIRK_NO_INIT_INPUT_REPORTS to prevent USB submit urb failure
> during keyboard cover (de)attaching
>
> Signed-off-by: Derya <derya.kiran@yahoo.de>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cheers,
Benjamin
> ---
> drivers/hid/hid-core.c | 9 +++++++++
> drivers/hid/hid-ids.h | 3 +++
> drivers/hid/usbhid/hid-quirks.c | 3 +++
> 3 files changed, 15 insertions(+)
>
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index bb5c494..f4e4820 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -775,6 +775,15 @@ static int hid_scan_report(struct hid_device *hid)
> if ((parser->scan_flags & HID_SCAN_FLAG_MT_WIN_8) &&
> (hid->group == HID_GROUP_MULTITOUCH))
> hid->group = HID_GROUP_MULTITOUCH_WIN_8;
> +
> + /*
> + * Handle vendor specific handlings
> + */
> + if ((hid->vendor == USB_VENDOR_ID_MICROSOFT) &&
> + (hid->product == USB_DEVICE_ID_MS_TYPE_COVER_2 ||
> + hid->product == USB_DEVICE_ID_MS_TOUCH_COVER_2) &&
> + (hid->group == HID_GROUP_MULTITOUCH))
> + hid->group = HID_GROUP_GENERIC;
>
> vfree(parser);
> return 0;
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> index 07cd28c..f61c0d8 100644
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -624,6 +624,9 @@
> #define USB_DEVICE_ID_MS_PRESENTER_8K_USB 0x0713
> #define USB_DEVICE_ID_MS_DIGITAL_MEDIA_3K 0x0730
> #define USB_DEVICE_ID_MS_COMFORT_MOUSE_4500 0x076c
> +#define USB_DEVICE_ID_MS_SURFACE_PRO_2 0x0799
> +#define USB_DEVICE_ID_MS_TOUCH_COVER_2 0x07a7
> +#define USB_DEVICE_ID_MS_TYPE_COVER_2 0x07a9
>
> #define USB_VENDOR_ID_MOJO 0x8282
> #define USB_DEVICE_ID_RETRO_ADAPTER 0x3201
> diff --git a/drivers/hid/usbhid/hid-quirks.c
> b/drivers/hid/usbhid/hid-quirks.c
> index dbd8387..7c4f86e 100644
> --- a/drivers/hid/usbhid/hid-quirks.c
> +++ b/drivers/hid/usbhid/hid-quirks.c
> @@ -73,6 +73,9 @@ static const struct hid_blacklist {
> { USB_VENDOR_ID_FORMOSA, USB_DEVICE_ID_FORMOSA_IR_RECEIVER,
> HID_QUIRK_NO_INIT_REPORTS },
> { USB_VENDOR_ID_FREESCALE, USB_DEVICE_ID_FREESCALE_MX28,
> HID_QUIRK_NOGET },
> { USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_NOGET },
> + { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_SURFACE_PRO_2,
> HID_QUIRK_NO_INIT_INPUT_REPORTS },
> + { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_2,
> HID_QUIRK_NO_INIT_INPUT_REPORTS },
> + { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TOUCH_COVER_2,
> HID_QUIRK_NO_INIT_INPUT_REPORTS },
> { USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GX680R_LED_PANEL,
> HID_QUIRK_NO_INIT_REPORTS },
> { USB_VENDOR_ID_NEXIO, USB_DEVICE_ID_NEXIO_MULTITOUCH_PTI0750,
> HID_QUIRK_NO_INIT_REPORTS },
> { USB_VENDOR_ID_NOVATEK, USB_DEVICE_ID_NOVATEK_MOUSE,
> HID_QUIRK_NO_INIT_REPORTS },
> --
> 1.8.3.2
>
prev parent reply other threads:[~2014-03-10 20:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-09 17:51 [Patch v2] Surface Pro 2 USB composite device handling Derya
2014-03-09 17:53 ` [PATCH 1/2] Revert "HID: microsoft: Add ID's for Surface Type/Touch, Cover 2" Derya
2014-03-10 20:22 ` Benjamin Tissoires
2014-03-11 15:54 ` Jiri Kosina
2014-03-09 17:56 ` [PATCH 2/2] Surface Pro 2 USB composite device handling Derya
2014-03-10 20:23 ` Benjamin Tissoires [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=20140310202325.GB4125@mail.corp.redhat.com \
--to=benjamin.tissoires@redhat.com \
--cc=derya.kiran@yahoo.de \
--cc=jkosina@suse.cz \
--cc=linux-input@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).