1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linu 1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 2 /* 2 /* 3 * Copyright (c) 1999 Andreas Gal 3 * Copyright (c) 1999 Andreas Gal 4 * Copyright (c) 2000-2001 Vojtech Pavlik 4 * Copyright (c) 2000-2001 Vojtech Pavlik 5 * Copyright (c) 2006-2007 Jiri Kosina 5 * Copyright (c) 2006-2007 Jiri Kosina 6 */ 6 */ 7 /* 7 /* 8 * This program is free software; you can redi 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Publi 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either versio 10 * the Free Software Foundation; either version 2 of the License, or 11 * (at your option) any later version. 11 * (at your option) any later version. 12 * 12 * 13 * This program is distributed in the hope tha 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details 16 * GNU General Public License for more details. 17 * 17 * 18 * You should have received a copy of the GNU 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to t 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 59 Temple Place, Suite 33 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 * 21 * 22 * Should you need to contact me, the author, 22 * Should you need to contact me, the author, you can do so either by 23 * e-mail - mail your message to <vojtech@ucw. 23 * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail: 24 * Vojtech Pavlik, Simunkova 1594, Prague 8, 1 24 * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic 25 */ 25 */ 26 #ifndef _UAPI__HID_H 26 #ifndef _UAPI__HID_H 27 #define _UAPI__HID_H 27 #define _UAPI__HID_H 28 28 29 29 30 30 31 /* 31 /* 32 * USB HID (Human Interface Device) interface 32 * USB HID (Human Interface Device) interface class code 33 */ 33 */ 34 34 35 #define USB_INTERFACE_CLASS_HID 3 35 #define USB_INTERFACE_CLASS_HID 3 36 36 37 /* 37 /* 38 * USB HID interface subclass and protocol cod 38 * USB HID interface subclass and protocol codes 39 */ 39 */ 40 40 41 #define USB_INTERFACE_SUBCLASS_BOOT 1 41 #define USB_INTERFACE_SUBCLASS_BOOT 1 42 #define USB_INTERFACE_PROTOCOL_KEYBOARD 1 42 #define USB_INTERFACE_PROTOCOL_KEYBOARD 1 43 #define USB_INTERFACE_PROTOCOL_MOUSE 2 43 #define USB_INTERFACE_PROTOCOL_MOUSE 2 44 44 45 /* 45 /* 46 * HID report types --- Ouch! HID spec says 1 46 * HID report types --- Ouch! HID spec says 1 2 3! 47 */ 47 */ 48 48 49 enum hid_report_type { 49 enum hid_report_type { 50 HID_INPUT_REPORT = 0, 50 HID_INPUT_REPORT = 0, 51 HID_OUTPUT_REPORT = 1, 51 HID_OUTPUT_REPORT = 1, 52 HID_FEATURE_REPORT = 2, 52 HID_FEATURE_REPORT = 2, 53 53 54 HID_REPORT_TYPES, 54 HID_REPORT_TYPES, 55 }; 55 }; 56 56 57 /* 57 /* 58 * HID class requests 58 * HID class requests 59 */ 59 */ 60 60 61 enum hid_class_request { 61 enum hid_class_request { 62 HID_REQ_GET_REPORT = 0x01 62 HID_REQ_GET_REPORT = 0x01, 63 HID_REQ_GET_IDLE = 0x02 63 HID_REQ_GET_IDLE = 0x02, 64 HID_REQ_GET_PROTOCOL = 0x03 64 HID_REQ_GET_PROTOCOL = 0x03, 65 HID_REQ_SET_REPORT = 0x09 65 HID_REQ_SET_REPORT = 0x09, 66 HID_REQ_SET_IDLE = 0x0A 66 HID_REQ_SET_IDLE = 0x0A, 67 HID_REQ_SET_PROTOCOL = 0x0B 67 HID_REQ_SET_PROTOCOL = 0x0B, 68 }; 68 }; 69 69 70 /* 70 /* 71 * HID class descriptor types 71 * HID class descriptor types 72 */ 72 */ 73 73 74 #define HID_DT_HID (USB_T 74 #define HID_DT_HID (USB_TYPE_CLASS | 0x01) 75 #define HID_DT_REPORT (USB_T 75 #define HID_DT_REPORT (USB_TYPE_CLASS | 0x02) 76 #define HID_DT_PHYSICAL (USB_T 76 #define HID_DT_PHYSICAL (USB_TYPE_CLASS | 0x03) 77 77 78 #define HID_MAX_DESCRIPTOR_SIZE 4096 78 #define HID_MAX_DESCRIPTOR_SIZE 4096 79 79 80 80 81 #endif /* _UAPI__HID_H */ 81 #endif /* _UAPI__HID_H */ 82 82
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.