aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-12 13:26:47 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-12 13:26:47 -0500
commit0349678ccd74d16c1f2bb58ecafec13ef7110e36 (patch)
treef9ec0afd9659bebb37ab116064137bd5192e255e /include
parenta7cb7bb664543e4562ab0e9a072470d2d18c761f (diff)
parent019e129f9b2d582e5901c0594427cb4026daa413 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID updates from Jiri Kosina: - i2c-hid race condition fix from Jean-Baptiste Maneyrol - Logitech driver now supports vendor-specific HID++ protocol, allowing us to deliver a full multitouch support on wider range of Logitech touchpads. Written by Benjamin Tissoires - MS Surface Pro 3 Type Cover support added by Alan Wu - RMI touchpad support improvements from Andrew Duggan - a lot of updates to Wacom driver from Jason Gerecke and Ping Cheng - various small fixes all over the place * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (56 commits) HID: rmi: The address of query8 must be calculated based on which query registers are present HID: rmi: Check for additional ACM registers appended to F11 data report HID: i2c-hid: prevent buffer overflow in early IRQ HID: logitech-hidpp: disable io in probe error path HID: logitech-hidpp: add boundary check for name retrieval HID: logitech-hidpp: check name retrieval return code HID: logitech-hidpp: do not return the name length HID: wacom: Report input events for each finger on generic devices HID: wacom: Initialize MT slots for generic devices at post_parse_hid HID: wacom: Update maximum X/Y accounding to outbound offset HID: wacom: Add support for DTU-1031X HID: wacom: add defines for new Cintiq and DTU outbound tracking HID: wacom: fix freeze on open when autosuspend is on HID: wacom: re-add accidentally dropped Lenovo PID HID: make hid_report_len as a static inline function in hid.h HID: wacom: Consult the application usage when determining field type HID: wacom: PAD is independent with pen/touch HID: multitouch: Add quirk for VTL touch panels HID: i2c-hid: fix race condition reading reports HID: wacom: Add angular resolution data to some ABS axes ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/hid.h43
1 files changed, 39 insertions, 4 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 78ea9bf941cd..06c4607744f6 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -234,6 +234,33 @@ struct hid_item {
234#define HID_DG_BARRELSWITCH 0x000d0044 234#define HID_DG_BARRELSWITCH 0x000d0044
235#define HID_DG_ERASER 0x000d0045 235#define HID_DG_ERASER 0x000d0045
236#define HID_DG_TABLETPICK 0x000d0046 236#define HID_DG_TABLETPICK 0x000d0046
237
238#define HID_CP_CONSUMERCONTROL 0x000c0001
239#define HID_CP_NUMERICKEYPAD 0x000c0002
240#define HID_CP_PROGRAMMABLEBUTTONS 0x000c0003
241#define HID_CP_MICROPHONE 0x000c0004
242#define HID_CP_HEADPHONE 0x000c0005
243#define HID_CP_GRAPHICEQUALIZER 0x000c0006
244#define HID_CP_FUNCTIONBUTTONS 0x000c0036
245#define HID_CP_SELECTION 0x000c0080
246#define HID_CP_MEDIASELECTION 0x000c0087
247#define HID_CP_SELECTDISC 0x000c00ba
248#define HID_CP_PLAYBACKSPEED 0x000c00f1
249#define HID_CP_PROXIMITY 0x000c0109
250#define HID_CP_SPEAKERSYSTEM 0x000c0160
251#define HID_CP_CHANNELLEFT 0x000c0161
252#define HID_CP_CHANNELRIGHT 0x000c0162
253#define HID_CP_CHANNELCENTER 0x000c0163
254#define HID_CP_CHANNELFRONT 0x000c0164
255#define HID_CP_CHANNELCENTERFRONT 0x000c0165
256#define HID_CP_CHANNELSIDE 0x000c0166
257#define HID_CP_CHANNELSURROUND 0x000c0167
258#define HID_CP_CHANNELLOWFREQUENCYENHANCEMENT 0x000c0168
259#define HID_CP_CHANNELTOP 0x000c0169
260#define HID_CP_CHANNELUNKNOWN 0x000c016a
261#define HID_CP_APPLICATIONLAUNCHBUTTONS 0x000c0180
262#define HID_CP_GENERICGUIAPPLICATIONCONTROLS 0x000c0200
263
237#define HID_DG_CONFIDENCE 0x000d0047 264#define HID_DG_CONFIDENCE 0x000d0047
238#define HID_DG_WIDTH 0x000d0048 265#define HID_DG_WIDTH 0x000d0048
239#define HID_DG_HEIGHT 0x000d0049 266#define HID_DG_HEIGHT 0x000d0049
@@ -312,11 +339,8 @@ struct hid_item {
312 * Vendor specific HID device groups 339 * Vendor specific HID device groups
313 */ 340 */
314#define HID_GROUP_RMI 0x0100 341#define HID_GROUP_RMI 0x0100
315
316/*
317 * Vendor specific HID device groups
318 */
319#define HID_GROUP_WACOM 0x0101 342#define HID_GROUP_WACOM 0x0101
343#define HID_GROUP_LOGITECH_DJ_DEVICE 0x0102
320 344
321/* 345/*
322 * This is the global environment of the parser. This information is 346 * This is the global environment of the parser. This information is
@@ -1063,6 +1087,17 @@ static inline void hid_hw_wait(struct hid_device *hdev)
1063 hdev->ll_driver->wait(hdev); 1087 hdev->ll_driver->wait(hdev);
1064} 1088}
1065 1089
1090/**
1091 * hid_report_len - calculate the report length
1092 *
1093 * @report: the report we want to know the length
1094 */
1095static inline int hid_report_len(struct hid_report *report)
1096{
1097 /* equivalent to DIV_ROUND_UP(report->size, 8) + !!(report->id > 0) */
1098 return ((report->size - 1) >> 3) + 1 + (report->id > 0);
1099}
1100
1066int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, 1101int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size,
1067 int interrupt); 1102 int interrupt);
1068 1103