diff options
Diffstat (limited to 'include/linux/hid.h')
-rw-r--r-- | include/linux/hid.h | 43 |
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 | */ | ||
1095 | static 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 | |||
1066 | int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, | 1101 | int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, |
1067 | int interrupt); | 1102 | int interrupt); |
1068 | 1103 | ||