mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID fixes from Jiri Kosina: - device descriptor length validation fix to hid-cypress driver from Greg - introduction of a short delay into i2c-hid, which is not really mandated by the spec, but fixes Asus Touchpads - Petzl USB connectable flashlight quirk from myself * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: i2c-hid: Add sleep between POWER ON and RESET HID: hid-cypress: validate length of report HID: ignore Petzl USB headlamp
This commit is contained in:
commit
95ce13138e
@ -2496,6 +2496,7 @@ static const struct hid_device_id hid_ignore_list[] = {
|
|||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0002) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0002) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0003) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0003) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0004) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0004) },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_PETZL, USB_DEVICE_ID_PETZL_HEADLAMP) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_POWERCOM, USB_DEVICE_ID_POWERCOM_UPS) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_POWERCOM, USB_DEVICE_ID_POWERCOM_UPS) },
|
||||||
#if IS_ENABLED(CONFIG_MOUSE_SYNAPTICS_USB)
|
#if IS_ENABLED(CONFIG_MOUSE_SYNAPTICS_USB)
|
||||||
|
@ -39,6 +39,9 @@ static __u8 *cp_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
|||||||
if (!(quirks & CP_RDESC_SWAPPED_MIN_MAX))
|
if (!(quirks & CP_RDESC_SWAPPED_MIN_MAX))
|
||||||
return rdesc;
|
return rdesc;
|
||||||
|
|
||||||
|
if (*rsize < 4)
|
||||||
|
return rdesc;
|
||||||
|
|
||||||
for (i = 0; i < *rsize - 4; i++)
|
for (i = 0; i < *rsize - 4; i++)
|
||||||
if (rdesc[i] == 0x29 && rdesc[i + 2] == 0x19) {
|
if (rdesc[i] == 0x29 && rdesc[i + 2] == 0x19) {
|
||||||
rdesc[i] = 0x19;
|
rdesc[i] = 0x19;
|
||||||
|
@ -816,6 +816,9 @@
|
|||||||
#define USB_VENDOR_ID_PETALYNX 0x18b1
|
#define USB_VENDOR_ID_PETALYNX 0x18b1
|
||||||
#define USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE 0x0037
|
#define USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE 0x0037
|
||||||
|
|
||||||
|
#define USB_VENDOR_ID_PETZL 0x2122
|
||||||
|
#define USB_DEVICE_ID_PETZL_HEADLAMP 0x1234
|
||||||
|
|
||||||
#define USB_VENDOR_ID_PHILIPS 0x0471
|
#define USB_VENDOR_ID_PHILIPS 0x0471
|
||||||
#define USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE 0x0617
|
#define USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE 0x0617
|
||||||
|
|
||||||
|
@ -426,6 +426,15 @@ static int i2c_hid_hwreset(struct i2c_client *client)
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The HID over I2C specification states that if a DEVICE needs time
|
||||||
|
* after the PWR_ON request, it should utilise CLOCK stretching.
|
||||||
|
* However, it has been observered that the Windows driver provides a
|
||||||
|
* 1ms sleep between the PWR_ON and RESET requests and that some devices
|
||||||
|
* rely on this.
|
||||||
|
*/
|
||||||
|
usleep_range(1000, 5000);
|
||||||
|
|
||||||
i2c_hid_dbg(ihid, "resetting...\n");
|
i2c_hid_dbg(ihid, "resetting...\n");
|
||||||
|
|
||||||
ret = i2c_hid_command(client, &hid_reset_cmd, NULL, 0);
|
ret = i2c_hid_command(client, &hid_reset_cmd, NULL, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user