Commit bf36c6b9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull HID updates from Jiri Kosina:

 - Lenovo X1 Tablet support improvements from Mikael Wikström

 - "heartbeat" report fix for several Wacom devices from Jason Gerecke

 - bounds checking fix in hid-roccat from Dan Carpenter

 - stylus battery reporting fix from Dmitry Torokhov

 - i2c-hid support for wakeup from suspend-to-idle from Kai-Heng Feng

 - new driver for Vivaldi devices from Sean O'Brien

 - other assorted small fixes and device ID additions

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
  HID: i2c-hid: Enable wakeup capability from Suspend-to-Idle
  HID: add vivaldi HID driver
  HID: hid-input: fix stylus battery reporting
  HID: wacom: Avoid entering wacom_wac_pen_report for pad / battery
  HID: i2c-hid: fix kerneldoc warnings in i2c-hid-core.c
  HID: core: fix kerneldoc warnings in hid-core.c
  HID: multitouch: Lenovo X1 Tablet Gen2 trackpoint and buttons
  HID: multitouch: Lenovo X1 Tablet Gen3 trackpoint and buttons
  HID: alps: clean up indentation issue
  HID: intel-ish-hid: simplify the return expression of ishtp_bus_remove_device()
  HID: hid-debug: fix nonblocking read semantics wrt EIO/ERESTARTSYS
  HID: i2c-hid: Prefer asynchronous probe
  HID: ite: Add USB id match for Acer One S1003 keyboard dock
  HID: roccat: add bounds checking in kone_sysfs_write_settings()
  HID: wiimote: narrow spinlock range in wiimote_hid_event()
  HID: wiimote: make handlers[] const
  HID: apple: Add support for Matias wireless keyboard
  HID: cp2112: Use irqchip template
parents 0cd7d979 3504e85c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -397,6 +397,15 @@ config HID_GOOGLE_HAMMER
	help
	Say Y here if you have a Google Hammer device.

config HID_VIVALDI
	tristate "Vivaldi Keyboard"
	depends on HID
	help
	  Say Y here if you want to enable support for Vivaldi keyboards.

	  Vivaldi keyboards use a vendor-specific (Google) HID usage to report
	  how the keys in the top row are physically ordered.

config HID_GT683R
	tristate "MSI GT68xR LED support"
	depends on LEDS_CLASS && USB_HID
+1 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ obj-$(CONFIG_HID_GEMBIRD) += hid-gembird.o
obj-$(CONFIG_HID_GFRM)		+= hid-gfrm.o
obj-$(CONFIG_HID_GLORIOUS)  += hid-glorious.o
obj-$(CONFIG_HID_GOOGLE_HAMMER)	+= hid-google-hammer.o
obj-$(CONFIG_HID_VIVALDI)	+= hid-vivaldi.o
obj-$(CONFIG_HID_GT683R)	+= hid-gt683r.o
obj-$(CONFIG_HID_GYRATION)	+= hid-gyration.o
obj-$(CONFIG_HID_HOLTEK)	+= hid-holtek-kbd.o
+2 −0
Original line number Diff line number Diff line
@@ -503,6 +503,8 @@ static const struct hid_device_id apple_devices[] = {
		.driver_data = APPLE_HAS_FN },
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_ISO),
		.driver_data = APPLE_HAS_FN },
	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_ISO),
		.driver_data = APPLE_HAS_FN },
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_JIS),
		.driver_data = APPLE_HAS_FN },
	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
+11 −4
Original line number Diff line number Diff line
@@ -814,6 +814,13 @@ static void hid_scan_collection(struct hid_parser *parser, unsigned type)

	if ((parser->global.usage_page << 16) >= HID_UP_MSVENDOR)
		parser->scan_flags |= HID_SCAN_FLAG_VENDOR_SPECIFIC;

	if ((parser->global.usage_page << 16) == HID_UP_GOOGLEVENDOR)
		for (i = 0; i < parser->local.usage_index; i++)
			if (parser->local.usage[i] ==
					(HID_UP_GOOGLEVENDOR | 0x0001))
				parser->device->group =
					HID_GROUP_VIVALDI;
}

static int hid_scan_main(struct hid_parser *parser, struct hid_item *item)
@@ -920,7 +927,7 @@ static int hid_scan_report(struct hid_device *hid)
/**
 * hid_parse_report - parse device report
 *
 * @device: hid device
 * @hid: hid device
 * @start: report start
 * @size: report size
 *
@@ -945,7 +952,7 @@ static const char * const hid_report_names[] = {
/**
 * hid_validate_values - validate existing device report's value indexes
 *
 * @device: hid device
 * @hid: hid device
 * @type: which report type to examine
 * @id: which report ID to examine (0 for first)
 * @field_index: which report field to examine
@@ -1444,7 +1451,7 @@ static int search(__s32 *array, __s32 value, unsigned n)
 * hid_match_report - check if driver's raw_event should be called
 *
 * @hid: hid device
 * @report_type: type to match against
 * @report: hid report to match against
 *
 * compare hid->driver->report_table->report_type to report->type
 */
@@ -2120,7 +2127,7 @@ struct hid_dynid {

/**
 * store_new_id - add a new HID device ID to this driver and re-probe devices
 * @driver: target device driver
 * @drv: target device driver
 * @buf: buffer for scanning device ID data
 * @count: input size
 *
+10 −9
Original line number Diff line number Diff line
@@ -1235,6 +1235,7 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id)
	struct cp2112_device *dev;
	u8 buf[3];
	struct cp2112_smbus_config_report config;
	struct gpio_irq_chip *girq;
	int ret;

	dev = devm_kzalloc(&hdev->dev, sizeof(*dev), GFP_KERNEL);
@@ -1338,6 +1339,15 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id)
	dev->gc.can_sleep		= 1;
	dev->gc.parent			= &hdev->dev;

	girq = &dev->gc.irq;
	girq->chip = &cp2112_gpio_irqchip;
	/* The event comes from the outside so no parent handler */
	girq->parent_handler = NULL;
	girq->num_parents = 0;
	girq->parents = NULL;
	girq->default_type = IRQ_TYPE_NONE;
	girq->handler = handle_simple_irq;

	ret = gpiochip_add_data(&dev->gc, dev);
	if (ret < 0) {
		hid_err(hdev, "error registering gpio chip\n");
@@ -1353,17 +1363,8 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id)
	chmod_sysfs_attrs(hdev);
	hid_hw_power(hdev, PM_HINT_NORMAL);

	ret = gpiochip_irqchip_add(&dev->gc, &cp2112_gpio_irqchip, 0,
				   handle_simple_irq, IRQ_TYPE_NONE);
	if (ret) {
		dev_err(dev->gc.parent, "failed to add IRQ chip\n");
		goto err_sysfs_remove;
	}

	return ret;

err_sysfs_remove:
	sysfs_remove_group(&hdev->dev.kobj, &cp2112_attr_group);
err_gpiochip_remove:
	gpiochip_remove(&dev->gc);
err_free_i2c:
Loading