Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1400109 > unrolled thread

[PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to report multitouch data

Started byBenjamin Tissoires <benjamin.tissoires@redhat.com>
First post2016-05-12 16:20 +0200
Last post2016-05-17 20:00 +0200
Articles 8 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to report multitouch data Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2016-05-12 16:20 +0200
    Re: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to  report multitouch data Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-05-13 16:30 +0200
      Re: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to  report multitouch data Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2016-05-13 17:00 +0200
        Re: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to  report multitouch data Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-05-13 18:10 +0200
          Re: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to  report multitouch data Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-05-13 18:30 +0200
            Re: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to  report multitouch data Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2016-05-20 10:00 +0200
          Re: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to  report multitouch data Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2016-05-13 18:30 +0200
    Re: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to  report multitouch data Bastien Nocera <hadess@hadess.net> - 2016-05-17 20:00 +0200

#1400109 — [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to report multitouch data

FromBenjamin Tissoires <benjamin.tissoires@redhat.com>
Date2016-05-12 16:20 +0200
Subject[PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to report multitouch data
Message-ID<rxZD3-7Er-3@gated-at.bofh.it>
There is no reasons to filter out keyboard and consumer control collections
in hid-multitouch.
With the previous hid-input fix, there is now a full support of the Type
Cover and we can remove all specific bits from hid-core and hid-microsoft.

hid-multitouch will automatically set HID_QUIRK_NO_INIT_REPORTS so we can
also remove it from the list of ushbid quirks.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---

Andy, would you mind checking if this series is sufficient to enable the
TypeCover of the Surface Book?

Cheers,
Benjamin

 drivers/hid/hid-core.c          | 2 --
 drivers/hid/hid-ids.h           | 1 -
 drivers/hid/hid-microsoft.c     | 2 --
 drivers/hid/hid-multitouch.c    | 4 +++-
 drivers/hid/usbhid/hid-quirks.c | 1 -
 5 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 8ea3a26..f055a68 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -727,7 +727,6 @@ static void hid_scan_collection(struct hid_parser *parser, unsigned type)
 	    (hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3 ||
 	     hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2 ||
 	     hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP ||
-	     hid->product == USB_DEVICE_ID_MS_TYPE_COVER_3 ||
 	     hid->product == USB_DEVICE_ID_MS_POWER_COVER) &&
 	    hid->group == HID_GROUP_MULTITOUCH)
 		hid->group = HID_GROUP_GENERIC;
@@ -1976,7 +1975,6 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP) },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_7K) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_600) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3KV1) },
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 3eec09a1..99e9852 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -703,7 +703,6 @@
 #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3    0x07dc
 #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2  0x07e2
 #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP 0x07dd
-#define USB_DEVICE_ID_MS_TYPE_COVER_3    0x07de
 #define USB_DEVICE_ID_MS_POWER_COVER     0x07da
 
 #define USB_VENDOR_ID_MOJO		0x8282
diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c
index e924d55..cf6920b 100644
--- a/drivers/hid/hid-microsoft.c
+++ b/drivers/hid/hid-microsoft.c
@@ -288,8 +288,6 @@ static const struct hid_device_id ms_devices[] = {
 		.driver_data = MS_HIDINPUT },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP),
 		.driver_data = MS_HIDINPUT },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3),
-		.driver_data = MS_HIDINPUT },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER),
 		.driver_data = MS_HIDINPUT },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_KEYBOARD),
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index c741f5e..ac35731 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -835,7 +835,9 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 	if (!td->mtclass.export_all_inputs &&
 	    field->application != HID_DG_TOUCHSCREEN &&
 	    field->application != HID_DG_PEN &&
-	    field->application != HID_DG_TOUCHPAD)
+	    field->application != HID_DG_TOUCHPAD &&
+	    field->application != HID_GD_KEYBOARD &&
+	    field->application != HID_CP_CONSUMER_CONTROL)
 		return -1;
 
 	/*
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index b4b8c6a..baf2bad 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -98,7 +98,6 @@ static const struct hid_blacklist {
 	{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3, HID_QUIRK_NO_INIT_REPORTS },
 	{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2, HID_QUIRK_NO_INIT_REPORTS },
 	{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP, HID_QUIRK_NO_INIT_REPORTS },
-	{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3, HID_QUIRK_NO_INIT_REPORTS },
 	{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER, HID_QUIRK_NO_INIT_REPORTS },
 	{ USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL, HID_QUIRK_NO_INIT_REPORTS },
 	{ USB_VENDOR_ID_NEXIO, USB_DEVICE_ID_NEXIO_MULTITOUCH_PTI0750, HID_QUIRK_NO_INIT_REPORTS },
-- 
2.5.0

[toc] | [next] | [standalone]


#1400833 — Re: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to report multitouch data

FromAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Date2016-05-13 16:30 +0200
SubjectRe: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to report multitouch data
Message-ID<rymgj-55V-27@gated-at.bofh.it>
In reply to#1400109
On Thu, 2016-05-12 at 16:12 +0200, Benjamin Tissoires wrote:
> There is no reasons to filter out keyboard and consumer control
> collections
> in hid-multitouch.
> With the previous hid-input fix, there is now a full support of the
> Type
> Cover and we can remove all specific bits from hid-core and hid-
> microsoft.
> 
> hid-multitouch will automatically set HID_QUIRK_NO_INIT_REPORTS so we
> can
> also remove it from the list of ushbid quirks.
> 
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> ---
> 
> Andy, would you mind checking if this series is sufficient to enable
> the
> TypeCover of the Surface Book?

Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Noticed little difference that there is no event for the device anymore,
just /dev/usb/hiddev0. Would it work properly under X?

> 
> Cheers,
> Benjamin
> 
>  drivers/hid/hid-core.c          | 2 --
>  drivers/hid/hid-ids.h           | 1 -
>  drivers/hid/hid-microsoft.c     | 2 --
>  drivers/hid/hid-multitouch.c    | 4 +++-
>  drivers/hid/usbhid/hid-quirks.c | 1 -
>  5 files changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index 8ea3a26..f055a68 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -727,7 +727,6 @@ static void hid_scan_collection(struct hid_parser
> *parser, unsigned type)
>  	    (hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3 ||
>  	     hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2 ||
>  	     hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP ||
> -	     hid->product == USB_DEVICE_ID_MS_TYPE_COVER_3 ||
>  	     hid->product == USB_DEVICE_ID_MS_POWER_COVER) &&
>  	    hid->group == HID_GROUP_MULTITOUCH)
>  		hid->group = HID_GROUP_GENERIC;
> @@ -1976,7 +1975,6 @@ static const struct hid_device_id
> hid_have_special_driver[] = {
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> USB_DEVICE_ID_MS_TYPE_COVER_PRO_3) },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2) },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP) },
> -	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> USB_DEVICE_ID_MS_TYPE_COVER_3) },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> USB_DEVICE_ID_MS_DIGITAL_MEDIA_7K) },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> USB_DEVICE_ID_MS_DIGITAL_MEDIA_600) },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> USB_DEVICE_ID_MS_DIGITAL_MEDIA_3KV1) },
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> index 3eec09a1..99e9852 100644
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -703,7 +703,6 @@
>  #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3    0x07dc
>  #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2  0x07e2
>  #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP 0x07dd
> -#define USB_DEVICE_ID_MS_TYPE_COVER_3    0x07de
>  #define USB_DEVICE_ID_MS_POWER_COVER     0x07da
>  
>  #define USB_VENDOR_ID_MOJO		0x8282
> diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c
> index e924d55..cf6920b 100644
> --- a/drivers/hid/hid-microsoft.c
> +++ b/drivers/hid/hid-microsoft.c
> @@ -288,8 +288,6 @@ static const struct hid_device_id ms_devices[] = {
>  		.driver_data = MS_HIDINPUT },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP),
>  		.driver_data = MS_HIDINPUT },
> -	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> USB_DEVICE_ID_MS_TYPE_COVER_3),
> -		.driver_data = MS_HIDINPUT },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> USB_DEVICE_ID_MS_POWER_COVER),
>  		.driver_data = MS_HIDINPUT },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> USB_DEVICE_ID_MS_COMFORT_KEYBOARD),
> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-
> multitouch.c
> index c741f5e..ac35731 100644
> --- a/drivers/hid/hid-multitouch.c
> +++ b/drivers/hid/hid-multitouch.c
> @@ -835,7 +835,9 @@ static int mt_input_mapping(struct hid_device
> *hdev, struct hid_input *hi,
>  	if (!td->mtclass.export_all_inputs &&
>  	    field->application != HID_DG_TOUCHSCREEN &&
>  	    field->application != HID_DG_PEN &&
> -	    field->application != HID_DG_TOUCHPAD)
> +	    field->application != HID_DG_TOUCHPAD &&
> +	    field->application != HID_GD_KEYBOARD &&
> +	    field->application != HID_CP_CONSUMER_CONTROL)
>  		return -1;
>  
>  	/*
> diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-
> quirks.c
> index b4b8c6a..baf2bad 100644
> --- a/drivers/hid/usbhid/hid-quirks.c
> +++ b/drivers/hid/usbhid/hid-quirks.c
> @@ -98,7 +98,6 @@ static const struct hid_blacklist {
>  	{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3,
> HID_QUIRK_NO_INIT_REPORTS },
>  	{ USB_VENDOR_ID_MICROSOFT,
> USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2, HID_QUIRK_NO_INIT_REPORTS },
>  	{ USB_VENDOR_ID_MICROSOFT,
> USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP, HID_QUIRK_NO_INIT_REPORTS },
> -	{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3,
> HID_QUIRK_NO_INIT_REPORTS },
>  	{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER,
> HID_QUIRK_NO_INIT_REPORTS },
>  	{ USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL,
> HID_QUIRK_NO_INIT_REPORTS },
>  	{ USB_VENDOR_ID_NEXIO,
> USB_DEVICE_ID_NEXIO_MULTITOUCH_PTI0750, HID_QUIRK_NO_INIT_REPORTS },

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

[toc] | [prev] | [next] | [standalone]


#1400841 — Re: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to report multitouch data

FromBenjamin Tissoires <benjamin.tissoires@redhat.com>
Date2016-05-13 17:00 +0200
SubjectRe: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to report multitouch data
Message-ID<rymJk-5r8-3@gated-at.bofh.it>
In reply to#1400833
On May 13 2016 or thereabouts, Andy Shevchenko wrote:
> On Thu, 2016-05-12 at 16:12 +0200, Benjamin Tissoires wrote:
> > There is no reasons to filter out keyboard and consumer control
> > collections
> > in hid-multitouch.
> > With the previous hid-input fix, there is now a full support of the
> > Type
> > Cover and we can remove all specific bits from hid-core and hid-
> > microsoft.
> > 
> > hid-multitouch will automatically set HID_QUIRK_NO_INIT_REPORTS so we
> > can
> > also remove it from the list of ushbid quirks.
> > 
> > Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> > ---
> > 
> > Andy, would you mind checking if this series is sufficient to enable
> > the
> > TypeCover of the Surface Book?
> 
> Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Noticed little difference that there is no event for the device anymore,
> just /dev/usb/hiddev0. Would it work properly under X?

Not sure what you mean.
I get 3 input nodes:
Microsoft Surface Type Cover Keyboard
Microsoft Surface Type Cover Consumer Control
Microsoft Surface Type Cover Touchpad

Each on this input device is properly assigned an event node and X works
with them.

If there is no /dev/input/eventX created for your cover, then this is
not normal and needs to be investigated.

Cheers,
Benjamin

> 
> > 
> > Cheers,
> > Benjamin
> > 
> >  drivers/hid/hid-core.c          | 2 --
> >  drivers/hid/hid-ids.h           | 1 -
> >  drivers/hid/hid-microsoft.c     | 2 --
> >  drivers/hid/hid-multitouch.c    | 4 +++-
> >  drivers/hid/usbhid/hid-quirks.c | 1 -
> >  5 files changed, 3 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> > index 8ea3a26..f055a68 100644
> > --- a/drivers/hid/hid-core.c
> > +++ b/drivers/hid/hid-core.c
> > @@ -727,7 +727,6 @@ static void hid_scan_collection(struct hid_parser
> > *parser, unsigned type)
> >  	    (hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3 ||
> >  	     hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2 ||
> >  	     hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP ||
> > -	     hid->product == USB_DEVICE_ID_MS_TYPE_COVER_3 ||
> >  	     hid->product == USB_DEVICE_ID_MS_POWER_COVER) &&
> >  	    hid->group == HID_GROUP_MULTITOUCH)
> >  		hid->group = HID_GROUP_GENERIC;
> > @@ -1976,7 +1975,6 @@ static const struct hid_device_id
> > hid_have_special_driver[] = {
> >  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> > USB_DEVICE_ID_MS_TYPE_COVER_PRO_3) },
> >  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> > USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2) },
> >  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> > USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP) },
> > -	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> > USB_DEVICE_ID_MS_TYPE_COVER_3) },
> >  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> > USB_DEVICE_ID_MS_DIGITAL_MEDIA_7K) },
> >  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> > USB_DEVICE_ID_MS_DIGITAL_MEDIA_600) },
> >  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> > USB_DEVICE_ID_MS_DIGITAL_MEDIA_3KV1) },
> > diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> > index 3eec09a1..99e9852 100644
> > --- a/drivers/hid/hid-ids.h
> > +++ b/drivers/hid/hid-ids.h
> > @@ -703,7 +703,6 @@
> >  #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3    0x07dc
> >  #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2  0x07e2
> >  #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP 0x07dd
> > -#define USB_DEVICE_ID_MS_TYPE_COVER_3    0x07de
> >  #define USB_DEVICE_ID_MS_POWER_COVER     0x07da
> >  
> >  #define USB_VENDOR_ID_MOJO		0x8282
> > diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c
> > index e924d55..cf6920b 100644
> > --- a/drivers/hid/hid-microsoft.c
> > +++ b/drivers/hid/hid-microsoft.c
> > @@ -288,8 +288,6 @@ static const struct hid_device_id ms_devices[] = {
> >  		.driver_data = MS_HIDINPUT },
> >  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> > USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP),
> >  		.driver_data = MS_HIDINPUT },
> > -	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> > USB_DEVICE_ID_MS_TYPE_COVER_3),
> > -		.driver_data = MS_HIDINPUT },
> >  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> > USB_DEVICE_ID_MS_POWER_COVER),
> >  		.driver_data = MS_HIDINPUT },
> >  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> > USB_DEVICE_ID_MS_COMFORT_KEYBOARD),
> > diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-
> > multitouch.c
> > index c741f5e..ac35731 100644
> > --- a/drivers/hid/hid-multitouch.c
> > +++ b/drivers/hid/hid-multitouch.c
> > @@ -835,7 +835,9 @@ static int mt_input_mapping(struct hid_device
> > *hdev, struct hid_input *hi,
> >  	if (!td->mtclass.export_all_inputs &&
> >  	    field->application != HID_DG_TOUCHSCREEN &&
> >  	    field->application != HID_DG_PEN &&
> > -	    field->application != HID_DG_TOUCHPAD)
> > +	    field->application != HID_DG_TOUCHPAD &&
> > +	    field->application != HID_GD_KEYBOARD &&
> > +	    field->application != HID_CP_CONSUMER_CONTROL)
> >  		return -1;
> >  
> >  	/*
> > diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-
> > quirks.c
> > index b4b8c6a..baf2bad 100644
> > --- a/drivers/hid/usbhid/hid-quirks.c
> > +++ b/drivers/hid/usbhid/hid-quirks.c
> > @@ -98,7 +98,6 @@ static const struct hid_blacklist {
> >  	{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3,
> > HID_QUIRK_NO_INIT_REPORTS },
> >  	{ USB_VENDOR_ID_MICROSOFT,
> > USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2, HID_QUIRK_NO_INIT_REPORTS },
> >  	{ USB_VENDOR_ID_MICROSOFT,
> > USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP, HID_QUIRK_NO_INIT_REPORTS },
> > -	{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3,
> > HID_QUIRK_NO_INIT_REPORTS },
> >  	{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER,
> > HID_QUIRK_NO_INIT_REPORTS },
> >  	{ USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL,
> > HID_QUIRK_NO_INIT_REPORTS },
> >  	{ USB_VENDOR_ID_NEXIO,
> > USB_DEVICE_ID_NEXIO_MULTITOUCH_PTI0750, HID_QUIRK_NO_INIT_REPORTS },
> 
> -- 
> Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Intel Finland Oy
> 

[toc] | [prev] | [next] | [standalone]


#1400883 — Re: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to report multitouch data

FromAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Date2016-05-13 18:10 +0200
SubjectRe: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to report multitouch data
Message-ID<rynP6-70e-33@gated-at.bofh.it>
In reply to#1400841
On Fri, 2016-05-13 at 16:49 +0200, Benjamin Tissoires wrote:
> On May 13 2016 or thereabouts, Andy Shevchenko wrote:
> > 
> > On Thu, 2016-05-12 at 16:12 +0200, Benjamin Tissoires wrote:
> > > 
> > > There is no reasons to filter out keyboard and consumer control
> > > collections
> > > in hid-multitouch.
> > > With the previous hid-input fix, there is now a full support of
> > > the
> > > Type
> > > Cover and we can remove all specific bits from hid-core and hid-
> > > microsoft.
> > > 
> > > hid-multitouch will automatically set HID_QUIRK_NO_INIT_REPORTS so
> > > we
> > > can
> > > also remove it from the list of ushbid quirks.
> > > 
> > > Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> > > ---
> > > 
> > > Andy, would you mind checking if this series is sufficient to
> > > enable
> > > the
> > > TypeCover of the Surface Book?
> > Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > 
> > Noticed little difference that there is no event for the device
> > anymore,
> > just /dev/usb/hiddev0. Would it work properly under X?
> Not sure what you mean.
> I get 3 input nodes:
> Microsoft Surface Type Cover Keyboard
> Microsoft Surface Type Cover Consumer Control
> Microsoft Surface Type Cover Touchpad
> 
> Each on this input device is properly assigned an event node and X
> works
> with them.
> 
> If there is no /dev/input/eventX created for your cover, then this is
> not normal and needs to be investigated.

There is no /dev/input/eventX for the touchpad. 
It prints that input device is under /usb.../input8, but the actual node
I got events from is /dev/usb/hiddev0.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

[toc] | [prev] | [next] | [standalone]


#1400891 — Re: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to report multitouch data

FromAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Date2016-05-13 18:30 +0200
SubjectRe: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to report multitouch data
Message-ID<ryo8q-7bl-15@gated-at.bofh.it>
In reply to#1400883
On Fri, 2016-05-13 at 19:09 +0300, Andy Shevchenko wrote:
> On Fri, 2016-05-13 at 16:49 +0200, Benjamin Tissoires wrote:
> > 
> > On May 13 2016 or thereabouts, Andy Shevchenko wrote:
> > > 
> > > 
> > > On Thu, 2016-05-12 at 16:12 +0200, Benjamin Tissoires wrote:
> > > > 
> > > > 
> > > > There is no reasons to filter out keyboard and consumer control
> > > > collections
> > > > in hid-multitouch.
> > > > With the previous hid-input fix, there is now a full support of
> > > > the
> > > > Type
> > > > Cover and we can remove all specific bits from hid-core and hid-
> > > > microsoft.
> > > > 
> > > > hid-multitouch will automatically set HID_QUIRK_NO_INIT_REPORTS
> > > > so
> > > > we
> > > > can
> > > > also remove it from the list of ushbid quirks.
> > > > 
> > > > Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com
> > > > >
> > > > ---
> > > > 
> > > > Andy, would you mind checking if this series is sufficient to
> > > > enable
> > > > the
> > > > TypeCover of the Surface Book?
> > > Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > 
> > > Noticed little difference that there is no event for the device
> > > anymore,
> > > just /dev/usb/hiddev0. Would it work properly under X?
> > Not sure what you mean.
> > I get 3 input nodes:
> > Microsoft Surface Type Cover Keyboard
> > Microsoft Surface Type Cover Consumer Control
> > Microsoft Surface Type Cover Touchpad
> > 
> > Each on this input device is properly assigned an event node and X
> > works
> > with them.
> > 
> > If there is no /dev/input/eventX created for your cover, then this
> > is
> > not normal and needs to be investigated.
> There is no /dev/input/eventX for the touchpad. 
> It prints that input device is under /usb.../input8, but the actual
> node
> I got events from is /dev/usb/hiddev0.

Correction, it seems the event node is there (event6), but I got nothing
from it

total 0
lrwxrwxrwx    1 root     root             0 May 13 19:17 event0 ->
../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input0/event0
lrwxrwxrwx    1 root     root             0 May 13 19:17 event1 ->
../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input1/event1
lrwxrwxrwx    1 root     root             0 May 13 19:17 event2 ->
../../devices/LNXSYSTM:00/LNXPWRBN:00/input/input2/event2
lrwxrwxrwx    1 root     root             0 May 13 19:17 event3 ->
../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:18/PNP0C09:00/MS
HW0040:00/input/input3/event3
lrwxrwxrwx    1 root     root             0 May 13 19:19 event4 ->
../../devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.4/1-
1.4:1.0/0003:045E:07CD.0001/input/input4/event4
lrwxrwxrwx    1 root     root             0 May 13 19:19 event5 ->
../../devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.4/1-
1.4:1.0/0003:045E:07CD.0001/input/input6/event5
lrwxrwxrwx    1 root     root             0 May 13 19:19 event6 ->
../../devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.4/1-
1.4:1.0/0003:045E:07CD.0001/input/input8/event6
lrwxrwxrwx    1 root     root             0 May 13 19:17 input0 ->
../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input0
lrwxrwxrwx    1 root     root             0 May 13 19:17 input1 ->
../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input1
lrwxrwxrwx    1 root     root             0 May 13 19:17 input2 ->
../../devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
lrwxrwxrwx    1 root     root             0 May 13 19:17 input3 ->
../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:18/PNP0C09:00/MS
HW0040:00/input/input3
lrwxrwxrwx    1 root     root             0 May 13 19:19 input4 ->
../../devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.4/1-
1.4:1.0/0003:045E:07CD.0001/input/input4
lrwxrwxrwx    1 root     root             0 May 13 19:19 input6 ->
../../devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.4/1-
1.4:1.0/0003:045E:07CD.0001/input/input6
lrwxrwxrwx    1 root     root             0 May 13 19:19 input8 ->
../../devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.4/1-
1.4:1.0/0003:045E:07CD.0001/input/input8
lrwxrwxrwx    1 root     root             0 May 13 19:17 mice ->
../../devices/virtual/input/mice
lrwxrwxrwx    1 root     root             0 May 13 19:19 mouse0 ->
../../devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.4/1-
1.4:1.0/0003:045E:07CD.0001/input/input8/mouse0


I tried today's linux-next + your patches.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

[toc] | [prev] | [next] | [standalone]


#1404210 — Re: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to report multitouch data

FromBenjamin Tissoires <benjamin.tissoires@redhat.com>
Date2016-05-20 10:00 +0200
SubjectRe: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to report multitouch data
Message-ID<rANvI-2Kb-37@gated-at.bofh.it>
In reply to#1400891
On May 13 2016 or thereabouts, Andy Shevchenko wrote:
> On Fri, 2016-05-13 at 19:09 +0300, Andy Shevchenko wrote:
> > On Fri, 2016-05-13 at 16:49 +0200, Benjamin Tissoires wrote:
> > > 
> > > On May 13 2016 or thereabouts, Andy Shevchenko wrote:
> > > > 
> > > > 
> > > > On Thu, 2016-05-12 at 16:12 +0200, Benjamin Tissoires wrote:
> > > > > 
> > > > > 
> > > > > There is no reasons to filter out keyboard and consumer control
> > > > > collections
> > > > > in hid-multitouch.
> > > > > With the previous hid-input fix, there is now a full support of
> > > > > the
> > > > > Type
> > > > > Cover and we can remove all specific bits from hid-core and hid-
> > > > > microsoft.
> > > > > 
> > > > > hid-multitouch will automatically set HID_QUIRK_NO_INIT_REPORTS
> > > > > so
> > > > > we
> > > > > can
> > > > > also remove it from the list of ushbid quirks.
> > > > > 
> > > > > Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com
> > > > > >
> > > > > ---
> > > > > 
> > > > > Andy, would you mind checking if this series is sufficient to
> > > > > enable
> > > > > the
> > > > > TypeCover of the Surface Book?
> > > > Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > > 
> > > > Noticed little difference that there is no event for the device
> > > > anymore,
> > > > just /dev/usb/hiddev0. Would it work properly under X?
> > > Not sure what you mean.
> > > I get 3 input nodes:
> > > Microsoft Surface Type Cover Keyboard
> > > Microsoft Surface Type Cover Consumer Control
> > > Microsoft Surface Type Cover Touchpad
> > > 
> > > Each on this input device is properly assigned an event node and X
> > > works
> > > with them.
> > > 
> > > If there is no /dev/input/eventX created for your cover, then this
> > > is
> > > not normal and needs to be investigated.
> > There is no /dev/input/eventX for the touchpad. 
> > It prints that input device is under /usb.../input8, but the actual
> > node
> > I got events from is /dev/usb/hiddev0.
> 
> Correction, it seems the event node is there (event6), but I got nothing
> from it

Would you mind sending me a hid-recorder[1] trace of the device while
typing few keys and using the touchpad?

Not receiving events from the actual touchpad node means that the
device did not switch to the mutlitouch mode, or that something else
is going on. I should be able to see that in the hid-recorder log.


[1] http://bentiss.github.io/hid-replay-docs/

Cheers,
Benjamin

[toc] | [prev] | [next] | [standalone]


#1400892 — Re: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to report multitouch data

FromBenjamin Tissoires <benjamin.tissoires@redhat.com>
Date2016-05-13 18:30 +0200
SubjectRe: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to report multitouch data
Message-ID<ryo8q-7bl-19@gated-at.bofh.it>
In reply to#1400883
On May 13 2016 or thereabouts, Andy Shevchenko wrote:
> On Fri, 2016-05-13 at 16:49 +0200, Benjamin Tissoires wrote:
> > On May 13 2016 or thereabouts, Andy Shevchenko wrote:
> > > 
> > > On Thu, 2016-05-12 at 16:12 +0200, Benjamin Tissoires wrote:
> > > > 
> > > > There is no reasons to filter out keyboard and consumer control
> > > > collections
> > > > in hid-multitouch.
> > > > With the previous hid-input fix, there is now a full support of
> > > > the
> > > > Type
> > > > Cover and we can remove all specific bits from hid-core and hid-
> > > > microsoft.
> > > > 
> > > > hid-multitouch will automatically set HID_QUIRK_NO_INIT_REPORTS so
> > > > we
> > > > can
> > > > also remove it from the list of ushbid quirks.
> > > > 
> > > > Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> > > > ---
> > > > 
> > > > Andy, would you mind checking if this series is sufficient to
> > > > enable
> > > > the
> > > > TypeCover of the Surface Book?
> > > Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > 
> > > Noticed little difference that there is no event for the device
> > > anymore,
> > > just /dev/usb/hiddev0. Would it work properly under X?
> > Not sure what you mean.
> > I get 3 input nodes:
> > Microsoft Surface Type Cover Keyboard
> > Microsoft Surface Type Cover Consumer Control
> > Microsoft Surface Type Cover Touchpad
> > 
> > Each on this input device is properly assigned an event node and X
> > works
> > with them.
> > 
> > If there is no /dev/input/eventX created for your cover, then this is
> > not normal and needs to be investigated.
> 
> There is no /dev/input/eventX for the touchpad. 
> It prints that input device is under /usb.../input8, but the actual node
> I got events from is /dev/usb/hiddev0.
> 

Hmm, have you also applied 1/2?

If so, please can you provide me the hid-recorder[1] output of the type
cover?

Cheers,
Benjamin

[1] http://bentiss.github.io/hid-replay-docs/

[toc] | [prev] | [next] | [standalone]


#1402504 — Re: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to report multitouch data

FromBastien Nocera <hadess@hadess.net>
Date2016-05-17 20:00 +0200
SubjectRe: [PATCH 2/2] HID: multitouch: enable the Surface 3 Type Cover to report multitouch data
Message-ID<rzRrI-7CL-29@gated-at.bofh.it>
In reply to#1400109
On Thu, 2016-05-12 at 16:12 +0200, Benjamin Tissoires wrote:
> There is no reasons to filter out keyboard and consumer control
> collections
> in hid-multitouch.
> With the previous hid-input fix, there is now a full support of the
> Type
> Cover and we can remove all specific bits from hid-core and hid-
> microsoft.
> 
> hid-multitouch will automatically set HID_QUIRK_NO_INIT_REPORTS so we
> can
> also remove it from the list of ushbid quirks.
> 
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Works on my machine with up to 3 simultaneous touchpoints. A 4th one
releases all fingers (is that expected?).

Tested-by: Bastien Nocera <hadess@hadess.net>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web