Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0349678c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull HID updates from Jiri Kosina:
 - i2c-hid race condition fix from Jean-Baptiste Maneyrol
 - Logitech driver now supports vendor-specific HID++ protocol, allowing
   us to deliver a full multitouch support on wider range of Logitech
   touchpads.  Written by Benjamin Tissoires
 - MS Surface Pro 3 Type Cover support added by Alan Wu
 - RMI touchpad support improvements from Andrew Duggan
 - a lot of updates to Wacom driver from Jason Gerecke and Ping Cheng
 - various small fixes all over the place

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (56 commits)
  HID: rmi: The address of query8 must be calculated based on which query registers are present
  HID: rmi: Check for additional ACM registers appended to F11 data report
  HID: i2c-hid: prevent buffer overflow in early IRQ
  HID: logitech-hidpp: disable io in probe error path
  HID: logitech-hidpp: add boundary check for name retrieval
  HID: logitech-hidpp: check name retrieval return code
  HID: logitech-hidpp: do not return the name length
  HID: wacom: Report input events for each finger on generic devices
  HID: wacom: Initialize MT slots for generic devices at post_parse_hid
  HID: wacom: Update maximum X/Y accounding to outbound offset
  HID: wacom: Add support for DTU-1031X
  HID: wacom: add defines for new Cintiq and DTU outbound tracking
  HID: wacom: fix freeze on open when autosuspend is on
  HID: wacom: re-add accidentally dropped Lenovo PID
  HID: make hid_report_len as a static inline function in hid.h
  HID: wacom: Consult the application usage when determining field type
  HID: wacom: PAD is independent with pen/touch
  HID: multitouch: Add quirk for VTL touch panels
  HID: i2c-hid: fix race condition reading reports
  HID: wacom: Add angular resolution data to some ABS axes
  ...
parents a7cb7bb6 019e129f
Loading
Loading
Loading
Loading
+21 −1
Original line number Diff line number Diff line
@@ -371,6 +371,7 @@ config HID_LOGITECH_DJ
	tristate "Logitech Unifying receivers full support"
	depends on HIDRAW
	depends on HID_LOGITECH
	select HID_LOGITECH_HIDPP
	---help---
	Say Y if you want support for Logitech Unifying receivers and devices.
	Unifying receivers are capable of pairing up to 6 Logitech compliant
@@ -378,6 +379,17 @@ config HID_LOGITECH_DJ
	generic USB_HID driver and all incoming events will be multiplexed
	into a single mouse and a single keyboard device.

config HID_LOGITECH_HIDPP
	tristate "Logitech HID++ devices support"
	depends on HID_LOGITECH
	---help---
	Support for Logitech devices relyingon the HID++ Logitech specification

	Say Y if you want support for Logitech devices relying on the HID++
	specification. Such devices are the various Logitech Touchpads (T650,
	T651, TK820), some mice (Zone Touch mouse), or even keyboards (Solar
	Keayboard).

config LOGITECH_FF
	bool "Logitech force feedback support"
	depends on HID_LOGITECH
@@ -613,6 +625,13 @@ config HID_PICOLCD_CIR
	---help---
	  Provide access to PicoLCD's CIR interface via remote control (LIRC).

config HID_PLANTRONICS
	tristate "Plantronics USB HID Driver"
	default !EXPERT
	depends on HID
	---help---
	Provides HID support for Plantronics telephony devices.

config HID_PRIMAX
	tristate "Primax non-fully HID-compliant devices"
	depends on HID
@@ -629,7 +648,7 @@ config HID_ROCCAT
	support for its special functionalities.

config HID_SAITEK
	tristate "Saitek non-fully HID-compliant devices"
	tristate "Saitek (Mad Catz) non-fully HID-compliant devices"
	depends on HID
	---help---
	Support for Saitek devices that are not fully compliant with the
@@ -637,6 +656,7 @@ config HID_SAITEK

	Supported devices:
	- PS1000 Dual Analog Pad
	- R.A.T.9 Gaming Mouse
	- R.A.T.7 Gaming Mouse
	- M.M.O.7 Gaming Mouse

+2 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ obj-$(CONFIG_HID_LCPOWER) += hid-lcpower.o
obj-$(CONFIG_HID_LENOVO)	+= hid-lenovo.o
obj-$(CONFIG_HID_LOGITECH)	+= hid-logitech.o
obj-$(CONFIG_HID_LOGITECH_DJ)	+= hid-logitech-dj.o
obj-$(CONFIG_HID_LOGITECH_HIDPP)	+= hid-logitech-hidpp.o
obj-$(CONFIG_HID_MAGICMOUSE)    += hid-magicmouse.o
obj-$(CONFIG_HID_MICROSOFT)	+= hid-microsoft.o
obj-$(CONFIG_HID_MONTEREY)	+= hid-monterey.o
@@ -94,6 +95,7 @@ ifdef CONFIG_DEBUG_FS
hid-picolcd-y			+= hid-picolcd_debugfs.o
endif

obj-$(CONFIG_HID_PLANTRONICS)	+= hid-plantronics.o
obj-$(CONFIG_HID_PRIMAX)	+= hid-primax.o
obj-$(CONFIG_HID_ROCCAT)	+= hid-roccat.o hid-roccat-common.o \
	hid-roccat-arvo.o hid-roccat-isku.o hid-roccat-kone.o \
+19 −17
Original line number Diff line number Diff line
@@ -702,6 +702,11 @@ static void hid_scan_collection(struct hid_parser *parser, unsigned type)
	if (((parser->global.usage_page << 16) == HID_UP_SENSOR) &&
	    type == HID_COLLECTION_PHYSICAL)
		hid->group = HID_GROUP_SENSOR_HUB;

	if (hid->vendor == USB_VENDOR_ID_MICROSOFT &&
	    hid->product == USB_DEVICE_ID_MS_TYPE_COVER_3 &&
	    hid->group == HID_GROUP_MULTITOUCH)
		hid->group = HID_GROUP_GENERIC;
}

static int hid_scan_main(struct hid_parser *parser, struct hid_item *item)
@@ -779,16 +784,6 @@ static int hid_scan_report(struct hid_device *hid)
	    (hid->group == HID_GROUP_MULTITOUCH))
		hid->group = HID_GROUP_MULTITOUCH_WIN_8;

	/*
	* Vendor specific handlings
	*/
	if ((hid->vendor == USB_VENDOR_ID_SYNAPTICS) &&
	    (hid->group == HID_GROUP_GENERIC) &&
	    /* only bind to the mouse interface of composite USB devices */
	    (hid->bus != BUS_USB || hid->type == HID_TYPE_USBMOUSE))
		/* hid-rmi should take care of them, not hid-generic */
		hid->group = HID_GROUP_RMI;

	/*
	 * Vendor specific handlings
	 */
@@ -796,6 +791,13 @@ static int hid_scan_report(struct hid_device *hid)
	case USB_VENDOR_ID_WACOM:
		hid->group = HID_GROUP_WACOM;
		break;
	case USB_VENDOR_ID_SYNAPTICS:
		if ((hid->group == HID_GROUP_GENERIC) &&
		    (hid->bus != BUS_USB || hid->type == HID_TYPE_USBMOUSE))
			/* hid-rmi should only bind to the mouse interface of
			 * composite USB devices */
			hid->group = HID_GROUP_RMI;
		break;
	}

	vfree(parser);
@@ -1280,12 +1282,6 @@ void hid_output_report(struct hid_report *report, __u8 *data)
}
EXPORT_SYMBOL_GPL(hid_output_report);

static int hid_report_len(struct hid_report *report)
{
	/* equivalent to DIV_ROUND_UP(report->size, 8) + !!(report->id > 0) */
	return ((report->size - 1) >> 3) + 1 + (report->id > 0);
}

/*
 * Allocator for buffer that is going to be passed to hid_output_report()
 */
@@ -1822,6 +1818,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER_2) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RECEIVER) },
	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_PS3) },
	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_T651) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_DINOVO_DESKTOP) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_DINOVO_EDGE) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_DINOVO_MINI) },
@@ -1862,6 +1859,7 @@ 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_3) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_MONTEREY, USB_DEVICE_ID_GENIUS_KB29E) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN) },
@@ -1887,6 +1885,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT, USB_DEVICE_ID_PENMOUNT_6000) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS, HID_ANY_ID) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_KEYBOARD) },
#if IS_ENABLED(CONFIG_HID_ROCCAT)
	{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_ARVO) },
@@ -1910,10 +1909,12 @@ static const struct hid_device_id hid_have_special_driver[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_PS1000) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RAT7) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_MMO7) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_RAT9) },
#endif
	{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SMK, USB_DEVICE_ID_SMK_PS3_BDREMOTE) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_BUZZ_CONTROLLER) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER) },
	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_BDREMOTE) },
@@ -2539,7 +2540,8 @@ int hid_add_device(struct hid_device *hdev)
	 * Scan generic devices for group information
	 */
	if (hid_ignore_special_drivers ||
	    !hid_match_id(hdev, hid_have_special_driver)) {
	    (!hdev->group &&
	     !hid_match_id(hdev, hid_have_special_driver))) {
		ret = hid_scan_report(hdev);
		if (ret)
			hid_warn(hdev, "bad device descriptor (%d)\n", ret);
+12 −0
Original line number Diff line number Diff line
@@ -300,6 +300,7 @@
#define USB_DEVICE_ID_ELAN_TOUCHSCREEN	0x0089
#define USB_DEVICE_ID_ELAN_TOUCHSCREEN_009B	0x009b
#define USB_DEVICE_ID_ELAN_TOUCHSCREEN_0103	0x0103
#define USB_DEVICE_ID_ELAN_TOUCHSCREEN_010c	0x010c
#define USB_DEVICE_ID_ELAN_TOUCHSCREEN_016F	0x016f

#define USB_VENDOR_ID_ELECOM		0x056e
@@ -578,6 +579,7 @@

#define USB_VENDOR_ID_LOGITECH		0x046d
#define USB_DEVICE_ID_LOGITECH_AUDIOHUB 0x0a0e
#define USB_DEVICE_ID_LOGITECH_T651	0xb00c
#define USB_DEVICE_ID_LOGITECH_RECEIVER	0xc101
#define USB_DEVICE_ID_LOGITECH_HARMONY_FIRST  0xc110
#define USB_DEVICE_ID_LOGITECH_HARMONY_LAST 0xc14f
@@ -620,6 +622,7 @@

#define USB_VENDOR_ID_MADCATZ		0x0738
#define USB_DEVICE_ID_MADCATZ_BEATPAD	0x4540
#define USB_DEVICE_ID_MADCATZ_RAT9	0x1709

#define USB_VENDOR_ID_MCC		0x09db
#define USB_DEVICE_ID_MCC_PMD1024LS	0x0076
@@ -649,6 +652,7 @@
#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_DEVICE_ID_MS_TYPE_COVER_3    0x07dc

#define USB_VENDOR_ID_MOJO		0x8282
#define USB_DEVICE_ID_RETRO_ADAPTER	0x3201
@@ -716,6 +720,8 @@
#define USB_DEVICE_ID_ORTEK_PKB1700	0x1700
#define USB_DEVICE_ID_ORTEK_WKB2000	0x2000

#define USB_VENDOR_ID_PLANTRONICS	0x047f

#define USB_VENDOR_ID_PANASONIC		0x04da
#define USB_DEVICE_ID_PANABOARD_UBT780	0x1044
#define USB_DEVICE_ID_PANABOARD_UBT880	0x104d
@@ -813,6 +819,9 @@
#define USB_VENDOR_ID_SKYCABLE			0x1223
#define	USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER	0x3F07

#define USB_VENDOR_ID_SMK		0x0609
#define USB_DEVICE_ID_SMK_PS3_BDREMOTE	0x0306

#define USB_VENDOR_ID_SONY			0x054c
#define USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE	0x024b
#define USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE	0x0374
@@ -931,6 +940,9 @@
#define USB_DEVICE_ID_VERNIER_CYCLOPS	0x0004
#define USB_DEVICE_ID_VERNIER_LCSPEC	0x0006

#define USB_VENDOR_ID_VTL		0x0306
#define USB_DEVICE_ID_VTL_MULTITOUCH_FF3F	0xff3f

#define USB_VENDOR_ID_WACOM		0x056a
#define USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH	0x81
#define USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH   0x00BD
+2 −2
Original line number Diff line number Diff line
@@ -872,7 +872,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
		case 0x2cb: map_key_clear(KEY_KBDINPUTASSIST_ACCEPT);	break;
		case 0x2cc: map_key_clear(KEY_KBDINPUTASSIST_CANCEL);	break;

		default:    goto ignore;
		default: map_key_clear(KEY_UNKNOWN);
		}
		break;

@@ -1215,7 +1215,7 @@ static void hidinput_led_worker(struct work_struct *work)
		return hid->ll_driver->request(hid, report, HID_REQ_SET_REPORT);

	/* fall back to generic raw-output-report */
	len = ((report->size - 1) >> 3) + 1 + (report->id > 0);
	len = hid_report_len(report);
	buf = hid_alloc_report_buf(report, GFP_KERNEL);
	if (!buf)
		return;
Loading