diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-05-07 19:07:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-05-07 19:07:58 -0400 |
commit | 7ceeff443be92913f7edd1134d677fa2a1824cd0 (patch) | |
tree | 78a352b689b019c22994e01e2c9e4f338363ac47 | |
parent | f56cfe0c35fd3419a0f5230e3638f9fe53f17c42 (diff) | |
parent | 825747bb85634a2a7b7dce4e373831e211ab1644 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID fixes from Jiri Kosina:
- fix a small bug in computation of report size, which might cause some
devices (Atmel touchpad found on the Samsung Ativ 9) to reject
reports with otherwise valid contents
- a few device-ID specific quirks/additions piggy-backing on top of it
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: sensor-hub: Add in quirk for sensor hub in Lenovo Ideapad Yogas
HID: add NO_INIT_REPORTS quirk for Synaptics Touch Pad V 103S
HID: core: fix computation of the report size
HID: multitouch: add support of EliteGroup 05D8 panels
-rw-r--r-- | drivers/hid/hid-core.c | 5 | ||||
-rw-r--r-- | drivers/hid/hid-ids.h | 7 | ||||
-rw-r--r-- | drivers/hid/hid-multitouch.c | 5 | ||||
-rw-r--r-- | drivers/hid/hid-sensor-hub.c | 3 | ||||
-rw-r--r-- | drivers/hid/usbhid/hid-quirks.c | 1 |
5 files changed, 19 insertions, 2 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 10a2c0866459..da52279de939 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1253,7 +1253,8 @@ EXPORT_SYMBOL_GPL(hid_output_report); | |||
1253 | 1253 | ||
1254 | static int hid_report_len(struct hid_report *report) | 1254 | static int hid_report_len(struct hid_report *report) |
1255 | { | 1255 | { |
1256 | return ((report->size - 1) >> 3) + 1 + (report->id > 0) + 7; | 1256 | /* equivalent to DIV_ROUND_UP(report->size, 8) + !!(report->id > 0) */ |
1257 | return ((report->size - 1) >> 3) + 1 + (report->id > 0); | ||
1257 | } | 1258 | } |
1258 | 1259 | ||
1259 | /* | 1260 | /* |
@@ -1266,7 +1267,7 @@ u8 *hid_alloc_report_buf(struct hid_report *report, gfp_t flags) | |||
1266 | * of implement() working on 8 byte chunks | 1267 | * of implement() working on 8 byte chunks |
1267 | */ | 1268 | */ |
1268 | 1269 | ||
1269 | int len = hid_report_len(report); | 1270 | int len = hid_report_len(report) + 7; |
1270 | 1271 | ||
1271 | return kmalloc(len, flags); | 1272 | return kmalloc(len, flags); |
1272 | } | 1273 | } |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index c8af7202c28d..34bb2205d2ea 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
@@ -301,6 +301,9 @@ | |||
301 | 301 | ||
302 | #define USB_VENDOR_ID_DREAM_CHEEKY 0x1d34 | 302 | #define USB_VENDOR_ID_DREAM_CHEEKY 0x1d34 |
303 | 303 | ||
304 | #define USB_VENDOR_ID_ELITEGROUP 0x03fc | ||
305 | #define USB_DEVICE_ID_ELITEGROUP_05D8 0x05d8 | ||
306 | |||
304 | #define USB_VENDOR_ID_ELO 0x04E7 | 307 | #define USB_VENDOR_ID_ELO 0x04E7 |
305 | #define USB_DEVICE_ID_ELO_TS2515 0x0022 | 308 | #define USB_DEVICE_ID_ELO_TS2515 0x0022 |
306 | #define USB_DEVICE_ID_ELO_TS2700 0x0020 | 309 | #define USB_DEVICE_ID_ELO_TS2700 0x0020 |
@@ -834,6 +837,10 @@ | |||
834 | #define USB_DEVICE_ID_SYNAPTICS_LTS2 0x1d10 | 837 | #define USB_DEVICE_ID_SYNAPTICS_LTS2 0x1d10 |
835 | #define USB_DEVICE_ID_SYNAPTICS_HD 0x0ac3 | 838 | #define USB_DEVICE_ID_SYNAPTICS_HD 0x0ac3 |
836 | #define USB_DEVICE_ID_SYNAPTICS_QUAD_HD 0x1ac3 | 839 | #define USB_DEVICE_ID_SYNAPTICS_QUAD_HD 0x1ac3 |
840 | #define USB_DEVICE_ID_SYNAPTICS_TP_V103 0x5710 | ||
841 | |||
842 | #define USB_VENDOR_ID_TEXAS_INSTRUMENTS 0x2047 | ||
843 | #define USB_DEVICE_ID_TEXAS_INSTRUMENTS_LENOVO_YOGA 0x0855 | ||
837 | 844 | ||
838 | #define USB_VENDOR_ID_THINGM 0x27b8 | 845 | #define USB_VENDOR_ID_THINGM 0x27b8 |
839 | #define USB_DEVICE_ID_BLINK1 0x01ed | 846 | #define USB_DEVICE_ID_BLINK1 0x01ed |
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index 35278e43c7a4..51e25b9407f2 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c | |||
@@ -1155,6 +1155,11 @@ static const struct hid_device_id mt_devices[] = { | |||
1155 | MT_USB_DEVICE(USB_VENDOR_ID_DWAV, | 1155 | MT_USB_DEVICE(USB_VENDOR_ID_DWAV, |
1156 | USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) }, | 1156 | USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) }, |
1157 | 1157 | ||
1158 | /* Elitegroup panel */ | ||
1159 | { .driver_data = MT_CLS_SERIAL, | ||
1160 | MT_USB_DEVICE(USB_VENDOR_ID_ELITEGROUP, | ||
1161 | USB_DEVICE_ID_ELITEGROUP_05D8) }, | ||
1162 | |||
1158 | /* Flatfrog Panels */ | 1163 | /* Flatfrog Panels */ |
1159 | { .driver_data = MT_CLS_FLATFROG, | 1164 | { .driver_data = MT_CLS_FLATFROG, |
1160 | MT_USB_DEVICE(USB_VENDOR_ID_FLATFROG, | 1165 | MT_USB_DEVICE(USB_VENDOR_ID_FLATFROG, |
diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index af8244b1c1f4..be14b5690e94 100644 --- a/drivers/hid/hid-sensor-hub.c +++ b/drivers/hid/hid-sensor-hub.c | |||
@@ -708,6 +708,9 @@ static const struct hid_device_id sensor_hub_devices[] = { | |||
708 | { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_STM_0, | 708 | { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_STM_0, |
709 | USB_DEVICE_ID_STM_HID_SENSOR), | 709 | USB_DEVICE_ID_STM_HID_SENSOR), |
710 | .driver_data = HID_SENSOR_HUB_ENUM_QUIRK}, | 710 | .driver_data = HID_SENSOR_HUB_ENUM_QUIRK}, |
711 | { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_TEXAS_INSTRUMENTS, | ||
712 | USB_DEVICE_ID_TEXAS_INSTRUMENTS_LENOVO_YOGA), | ||
713 | .driver_data = HID_SENSOR_HUB_ENUM_QUIRK}, | ||
711 | { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, HID_ANY_ID, | 714 | { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, HID_ANY_ID, |
712 | HID_ANY_ID) }, | 715 | HID_ANY_ID) }, |
713 | { } | 716 | { } |
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index dbd83878ff99..8e4ddb369883 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c | |||
@@ -119,6 +119,7 @@ static const struct hid_blacklist { | |||
119 | { USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_LTS2, HID_QUIRK_NO_INIT_REPORTS }, | 119 | { USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_LTS2, HID_QUIRK_NO_INIT_REPORTS }, |
120 | { USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_HD, HID_QUIRK_NO_INIT_REPORTS }, | 120 | { USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_HD, HID_QUIRK_NO_INIT_REPORTS }, |
121 | { USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_QUAD_HD, HID_QUIRK_NO_INIT_REPORTS }, | 121 | { USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_QUAD_HD, HID_QUIRK_NO_INIT_REPORTS }, |
122 | { USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_TP_V103, HID_QUIRK_NO_INIT_REPORTS }, | ||
122 | 123 | ||
123 | { 0, 0 } | 124 | { 0, 0 } |
124 | }; | 125 | }; |