1/**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19#ifndef _UAPI_HIDDEV_H 20#define _UAPI_HIDDEV_H 21#include <linux/types.h> 22struct hiddev_event { 23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 unsigned hid; 25 signed int value; 26}; 27struct hiddev_devinfo { 28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 __u32 bustype; 30 __u32 busnum; 31 __u32 devnum; 32 __u32 ifnum; 33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 __s16 vendor; 35 __s16 product; 36 __s16 version; 37 __u32 num_applications; 38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39}; 40struct hiddev_collection_info { 41 __u32 index; 42 __u32 type; 43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 __u32 usage; 45 __u32 level; 46}; 47#define HID_STRING_SIZE 256 48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49struct hiddev_string_descriptor { 50 __s32 index; 51 char value[HID_STRING_SIZE]; 52}; 53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54struct hiddev_report_info { 55 __u32 report_type; 56 __u32 report_id; 57 __u32 num_fields; 58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59}; 60#define HID_REPORT_ID_UNKNOWN 0xffffffff 61#define HID_REPORT_ID_FIRST 0x00000100 62#define HID_REPORT_ID_NEXT 0x00000200 63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64#define HID_REPORT_ID_MASK 0x000000ff 65#define HID_REPORT_ID_MAX 0x000000ff 66#define HID_REPORT_TYPE_INPUT 1 67#define HID_REPORT_TYPE_OUTPUT 2 68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69#define HID_REPORT_TYPE_FEATURE 3 70#define HID_REPORT_TYPE_MIN 1 71#define HID_REPORT_TYPE_MAX 3 72struct hiddev_field_info { 73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 __u32 report_type; 75 __u32 report_id; 76 __u32 field_index; 77 __u32 maxusage; 78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 __u32 flags; 80 __u32 physical; 81 __u32 logical; 82 __u32 application; 83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 __s32 logical_minimum; 85 __s32 logical_maximum; 86 __s32 physical_minimum; 87 __s32 physical_maximum; 88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 __u32 unit_exponent; 90 __u32 unit; 91}; 92#define HID_FIELD_CONSTANT 0x001 93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94#define HID_FIELD_VARIABLE 0x002 95#define HID_FIELD_RELATIVE 0x004 96#define HID_FIELD_WRAP 0x008 97#define HID_FIELD_NONLINEAR 0x010 98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99#define HID_FIELD_NO_PREFERRED 0x020 100#define HID_FIELD_NULL_STATE 0x040 101#define HID_FIELD_VOLATILE 0x080 102#define HID_FIELD_BUFFERED_BYTE 0x100 103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104struct hiddev_usage_ref { 105 __u32 report_type; 106 __u32 report_id; 107 __u32 field_index; 108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 __u32 usage_index; 110 __u32 usage_code; 111 __s32 value; 112}; 113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114#define HID_MAX_MULTI_USAGES 1024 115struct hiddev_usage_ref_multi { 116 struct hiddev_usage_ref uref; 117 __u32 num_values; 118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 __s32 values[HID_MAX_MULTI_USAGES]; 120}; 121#define HID_FIELD_INDEX_NONE 0xffffffff 122#define HID_VERSION 0x010004 123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124#define HIDIOCGVERSION _IOR('H', 0x01, int) 125#define HIDIOCAPPLICATION _IO('H', 0x02) 126#define HIDIOCGDEVINFO _IOR('H', 0x03, struct hiddev_devinfo) 127#define HIDIOCGSTRING _IOR('H', 0x04, struct hiddev_string_descriptor) 128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129#define HIDIOCINITREPORT _IO('H', 0x05) 130#define HIDIOCGNAME(len) _IOC(_IOC_READ, 'H', 0x06, len) 131#define HIDIOCGREPORT _IOW('H', 0x07, struct hiddev_report_info) 132#define HIDIOCSREPORT _IOW('H', 0x08, struct hiddev_report_info) 133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134#define HIDIOCGREPORTINFO _IOWR('H', 0x09, struct hiddev_report_info) 135#define HIDIOCGFIELDINFO _IOWR('H', 0x0A, struct hiddev_field_info) 136#define HIDIOCGUSAGE _IOWR('H', 0x0B, struct hiddev_usage_ref) 137#define HIDIOCSUSAGE _IOW('H', 0x0C, struct hiddev_usage_ref) 138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139#define HIDIOCGUCODE _IOWR('H', 0x0D, struct hiddev_usage_ref) 140#define HIDIOCGFLAG _IOR('H', 0x0E, int) 141#define HIDIOCSFLAG _IOW('H', 0x0F, int) 142#define HIDIOCGCOLLECTIONINDEX _IOW('H', 0x10, struct hiddev_usage_ref) 143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144#define HIDIOCGCOLLECTIONINFO _IOWR('H', 0x11, struct hiddev_collection_info) 145#define HIDIOCGPHYS(len) _IOC(_IOC_READ, 'H', 0x12, len) 146#define HIDIOCGUSAGES _IOWR('H', 0x13, struct hiddev_usage_ref_multi) 147#define HIDIOCSUSAGES _IOW('H', 0x14, struct hiddev_usage_ref_multi) 148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149#define HIDDEV_FLAG_UREF 0x1 150#define HIDDEV_FLAG_REPORT 0x2 151#define HIDDEV_FLAGS 0x3 152#endif 153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154