Skip to content

Commit cf5425b

Browse files
committed
Merge branch 'for-3.8/upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
PullHID fixes from Jiri Kosina: - fix i2c-hid and hidraw interaction, by Benjamin Tissoires - a quirk to make a particular device (Formosa IR receiver) work properly, by Nicholas Santos * 'for-3.8/upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: i2c-hid: fix i2c_hid_output_raw_report HID: usbhid: quirk for Formosa IR receiver HID: remove x bit from sensor doc
2 parents bf6c8a8 + c284979 commit cf5425b

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

Documentation/hid/hid-sensor.txt

100755100644
File mode changed.

drivers/hid/hid-ids.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@
306306
#define USB_VENDOR_ID_EZKEY 0x0518
307307
#define USB_DEVICE_ID_BTC_8193 0x0002
308308

309+
#define USB_VENDOR_ID_FORMOSA 0x147a
310+
#define USB_DEVICE_ID_FORMOSA_IR_RECEIVER 0xe03e
311+
309312
#define USB_VENDOR_ID_FREESCALE 0x15A2
310313
#define USB_DEVICE_ID_FREESCALE_MX28 0x004F
311314

drivers/hid/i2c-hid/i2c-hid.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,13 +540,24 @@ static int i2c_hid_output_raw_report(struct hid_device *hid, __u8 *buf,
540540
{
541541
struct i2c_client *client = hid->driver_data;
542542
int report_id = buf[0];
543+
int ret;
543544

544545
if (report_type == HID_INPUT_REPORT)
545546
return -EINVAL;
546547

547-
return i2c_hid_set_report(client,
548+
if (report_id) {
549+
buf++;
550+
count--;
551+
}
552+
553+
ret = i2c_hid_set_report(client,
548554
report_type == HID_FEATURE_REPORT ? 0x03 : 0x02,
549555
report_id, buf, count);
556+
557+
if (report_id && ret >= 0)
558+
ret++; /* add report_id to the number of transfered bytes */
559+
560+
return ret;
550561
}
551562

552563
static int i2c_hid_parse(struct hid_device *hid)

drivers/hid/usbhid/hid-quirks.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ static const struct hid_blacklist {
7070
{ USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_AXIS_295, HID_QUIRK_NOGET },
7171
{ USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET },
7272
{ USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET },
73+
{ USB_VENDOR_ID_FORMOSA, USB_DEVICE_ID_FORMOSA_IR_RECEIVER, HID_QUIRK_NO_INIT_REPORTS },
7374
{ USB_VENDOR_ID_FREESCALE, USB_DEVICE_ID_FREESCALE_MX28, HID_QUIRK_NOGET },
7475
{ USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_NOGET },
7576
{ USB_VENDOR_ID_NOVATEK, USB_DEVICE_ID_NOVATEK_MOUSE, HID_QUIRK_NO_INIT_REPORTS },

0 commit comments

Comments
 (0)