Re: [PATCH v2] HID: multitouch: add support for Type Cover Pro 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jun 18 2016 or thereabouts, Dennis Chen wrote:
> Include Microsoft Type Cover 3 support into hid-multitouch.c
> Allow touchpad device to have multitouch functionality.
> Drop Type Cover 3 support in hid-microsoft.c
> 
> Signed-off-by: Dennis Chen <barracks510@xxxxxxxxx>
> ---
>  drivers/hid/Kconfig          |  1 +
>  drivers/hid/hid-core.c       | 10 +---------
>  drivers/hid/hid-microsoft.c  |  8 --------
>  drivers/hid/hid-multitouch.c | 14 ++++++++++++++
>  4 files changed, 16 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
> index 5646ca4..5af0603 100644
> --- a/drivers/hid/Kconfig
> +++ b/drivers/hid/Kconfig
> @@ -530,6 +530,7 @@ config HID_MULTITOUCH
>  	  - IrTouch Infrared USB panels
>  	  - LG Display panels (Dell ST2220Tc)
>  	  - Lumio CrystalTouch panels
> +	  - Microsoft Type Cover 3 touchpad
>  	  - MosArt dual-touch panels
>  	  - Panasonic multitouch panels
>  	  - PenMount dual touch panels
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index 8ea3a26..ddeadd9 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -724,11 +724,7 @@ static void hid_scan_collection(struct hid_parser *parser, unsigned type)
>  		hid->group = HID_GROUP_SENSOR_HUB;
>  
>  	if (hid->vendor == USB_VENDOR_ID_MICROSOFT &&
> -	    (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->product == USB_DEVICE_ID_MS_POWER_COVER &&
>  	    hid->group == HID_GROUP_MULTITOUCH)
>  		hid->group = HID_GROUP_GENERIC;
>  
> @@ -1973,10 +1969,6 @@ static const struct hid_device_id hid_have_special_driver[] = {
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3K) },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0) },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_OFFICE_KB) },
> -	{ 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-microsoft.c b/drivers/hid/hid-microsoft.c
> index e924d55..b88a429 100644
> --- a/drivers/hid/hid-microsoft.c
> +++ b/drivers/hid/hid-microsoft.c
> @@ -282,14 +282,6 @@ static const struct hid_device_id ms_devices[] = {
>  		.driver_data = MS_NOGET },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_MOUSE_4500),
>  		.driver_data = MS_DUPLICATE_USAGES },
> -	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3),
> -		.driver_data = MS_HIDINPUT },
> -	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2),
> -		.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 95b7d61..1bf002f 100644
> --- a/drivers/hid/hid-multitouch.c
> +++ b/drivers/hid/hid-multitouch.c
> @@ -1377,6 +1377,20 @@ static const struct hid_device_id mt_devices[] = {
>  		MT_USB_DEVICE(USB_VENDOR_ID_ILITEK,
>  			USB_DEVICE_ID_ILITEK_MULTITOUCH) },
>  
> +	/* Microsoft Type Cover 3 touchpad */
> +	{ .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
> +		MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> +			USB_DEVICE_ID_MS_TYPE_COVER_PRO_3) },
> +	{ .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
> +		MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> +			USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2) },
> +	{ .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
> +		MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> +			USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP) },
> +	{ .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
> +		MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
> +			USB_DEVICE_ID_MS_TYPE_COVER_3) },
> +

Hopefully, this hunk is not required with the 2 pending patches I
mentioned in v1.

Cheers,
Benjamin

>  	/* MosArt panels */
>  	{ .driver_data = MT_CLS_CONFIDENCE_MINUS_ONE,
>  		MT_USB_DEVICE(USB_VENDOR_ID_ASUS,
> -- 
> 2.5.5




--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux