Commit 8723bc8f authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull HID fixes from Jiri Kosina:

 - resume timing fix for intel-ish driver (Ye Xiang)

 - fix for using incorrect MMIO register in amd_sfh driver (Dylan
   MacKenzie)

 - Cintiq 24HDT / 27QHDT regression fix and touch processing fix for
   Wacom driver (Jason Gerecke)

 - device removal bugfix for ft260 driver (Michael Zaidman)

 - other small assorted fixes

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
  HID: ft260: fix device removal due to USB disconnect
  HID: wacom: Skip processing of touches with negative slot values
  HID: wacom: Re-enable touch by default for Cintiq 24HDT / 27QHDT
  HID: Kconfig: Fix spelling mistake "Uninterruptable" -> "Uninterruptible"
  HID: apple: Add support for Keychron K1 wireless keyboard
  HID: fix typo in Kconfig
  HID: ft260: fix format type warning in ft260_word_show()
  HID: amd_sfh: Use correct MMIO register for DMA address
  HID: asus: Remove check for same LED brightness on set
  HID: intel-ish-hid: use async resume function
parents ad6ec09d db8d3a21
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ static void amd_stop_sensor_v2(struct amd_mp2_dev *privdata, u16 sensor_idx)
	cmd_base.cmd_v2.sensor_id = sensor_idx;
	cmd_base.cmd_v2.length  = 16;

	writeq(0x0, privdata->mmio + AMD_C2P_MSG2);
	writeq(0x0, privdata->mmio + AMD_C2P_MSG1);
	writel(cmd_base.ul, privdata->mmio + AMD_C2P_MSG0);
}

+2 −0
Original line number Diff line number Diff line
@@ -501,6 +501,8 @@ static const struct hid_device_id apple_devices[] = {
			APPLE_RDESC_JIS },
	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_ANSI),
		.driver_data = APPLE_HAS_FN },
	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_ANSI),
		.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),
+0 −3
Original line number Diff line number Diff line
@@ -485,9 +485,6 @@ static void asus_kbd_backlight_set(struct led_classdev *led_cdev,
{
	struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds,
						 cdev);
	if (led->brightness == brightness)
		return;

	led->brightness = brightness;
	schedule_work(&led->work);
}
+9 −18
Original line number Diff line number Diff line
@@ -742,7 +742,7 @@ static int ft260_is_interface_enabled(struct hid_device *hdev)
	int ret;

	ret = ft260_get_system_config(hdev, &cfg);
	if (ret)
	if (ret < 0)
		return ret;

	ft260_dbg("interface:  0x%02x\n", interface);
@@ -754,23 +754,16 @@ static int ft260_is_interface_enabled(struct hid_device *hdev)
	switch (cfg.chip_mode) {
	case FT260_MODE_ALL:
	case FT260_MODE_BOTH:
		if (interface == 1) {
		if (interface == 1)
			hid_info(hdev, "uart interface is not supported\n");
			return 0;
		}
		else
			ret = 1;
		break;
	case FT260_MODE_UART:
		if (interface == 0) {
			hid_info(hdev, "uart is unsupported on interface 0\n");
			ret = 0;
		}
		hid_info(hdev, "uart interface is not supported\n");
		break;
	case FT260_MODE_I2C:
		if (interface == 1) {
			hid_info(hdev, "i2c is unsupported on interface 1\n");
			ret = 0;
		}
		ret = 1;
		break;
	}
	return ret;
@@ -785,7 +778,7 @@ static int ft260_byte_show(struct hid_device *hdev, int id, u8 *cfg, int len,
	if (ret < 0)
		return ret;

	return scnprintf(buf, PAGE_SIZE, "%hi\n", *field);
	return scnprintf(buf, PAGE_SIZE, "%d\n", *field);
}

static int ft260_word_show(struct hid_device *hdev, int id, u8 *cfg, int len,
@@ -797,7 +790,7 @@ static int ft260_word_show(struct hid_device *hdev, int id, u8 *cfg, int len,
	if (ret < 0)
		return ret;

	return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field));
	return scnprintf(buf, PAGE_SIZE, "%d\n", le16_to_cpu(*field));
}

#define FT260_ATTR_SHOW(name, reptype, id, type, func)			       \
@@ -1004,11 +997,9 @@ static int ft260_probe(struct hid_device *hdev, const struct hid_device_id *id)

static void ft260_remove(struct hid_device *hdev)
{
	int ret;
	struct ft260_device *dev = hid_get_drvdata(hdev);

	ret = ft260_is_interface_enabled(hdev);
	if (ret <= 0)
	if (!dev)
		return;

	sysfs_remove_group(&hdev->dev.kobj, &ft260_attr_group);
+14 −1
Original line number Diff line number Diff line
@@ -784,6 +784,17 @@ static void hid_ishtp_cl_reset_handler(struct work_struct *work)
	}
}

static void hid_ishtp_cl_resume_handler(struct work_struct *work)
{
	struct ishtp_cl_data *client_data = container_of(work, struct ishtp_cl_data, resume_work);
	struct ishtp_cl *hid_ishtp_cl = client_data->hid_ishtp_cl;

	if (ishtp_wait_resume(ishtp_get_ishtp_device(hid_ishtp_cl))) {
		client_data->suspended = false;
		wake_up_interruptible(&client_data->ishtp_resume_wait);
	}
}

ishtp_print_log ishtp_hid_print_trace;

/**
@@ -822,6 +833,8 @@ static int hid_ishtp_cl_probe(struct ishtp_cl_device *cl_device)
	init_waitqueue_head(&client_data->ishtp_resume_wait);

	INIT_WORK(&client_data->work, hid_ishtp_cl_reset_handler);
	INIT_WORK(&client_data->resume_work, hid_ishtp_cl_resume_handler);


	ishtp_hid_print_trace = ishtp_trace_callback(cl_device);

@@ -921,7 +934,7 @@ static int hid_ishtp_cl_resume(struct device *device)

	hid_ishtp_trace(client_data, "%s hid_ishtp_cl %p\n", __func__,
			hid_ishtp_cl);
	client_data->suspended = false;
	schedule_work(&client_data->resume_work);
	return 0;
}

Loading