Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
hid.h File Reference
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/mod_devicetable.h>
#include <linux/timer.h>
#include <linux/workqueue.h>
#include <linux/input.h>
#include <linux/semaphore.h>
#include <linux/power_supply.h>
#include <uapi/linux/hid.h>

Go to the source code of this file.

Data Structures

struct  hid_item
 
struct  hid_global
 
struct  hid_local
 
struct  hid_collection
 
struct  hid_usage
 
struct  hid_field
 
struct  hid_report
 
struct  hid_report_enum
 
struct  hid_control_fifo
 
struct  hid_output_fifo
 
struct  hid_input
 
struct  hid_device
 
struct  hid_parser
 
struct  hid_class_descriptor
 
struct  hid_descriptor
 
struct  hid_report_id
 
struct  hid_usage_id
 
struct  hid_driver
 
struct  hid_ll_driver
 

Macros

#define HID_ITEM_FORMAT_SHORT   0
 
#define HID_ITEM_FORMAT_LONG   1
 
#define HID_ITEM_TAG_LONG   15
 
#define HID_ITEM_TYPE_MAIN   0
 
#define HID_ITEM_TYPE_GLOBAL   1
 
#define HID_ITEM_TYPE_LOCAL   2
 
#define HID_ITEM_TYPE_RESERVED   3
 
#define HID_MAIN_ITEM_TAG_INPUT   8
 
#define HID_MAIN_ITEM_TAG_OUTPUT   9
 
#define HID_MAIN_ITEM_TAG_FEATURE   11
 
#define HID_MAIN_ITEM_TAG_BEGIN_COLLECTION   10
 
#define HID_MAIN_ITEM_TAG_END_COLLECTION   12
 
#define HID_MAIN_ITEM_CONSTANT   0x001
 
#define HID_MAIN_ITEM_VARIABLE   0x002
 
#define HID_MAIN_ITEM_RELATIVE   0x004
 
#define HID_MAIN_ITEM_WRAP   0x008
 
#define HID_MAIN_ITEM_NONLINEAR   0x010
 
#define HID_MAIN_ITEM_NO_PREFERRED   0x020
 
#define HID_MAIN_ITEM_NULL_STATE   0x040
 
#define HID_MAIN_ITEM_VOLATILE   0x080
 
#define HID_MAIN_ITEM_BUFFERED_BYTE   0x100
 
#define HID_COLLECTION_PHYSICAL   0
 
#define HID_COLLECTION_APPLICATION   1
 
#define HID_COLLECTION_LOGICAL   2
 
#define HID_GLOBAL_ITEM_TAG_USAGE_PAGE   0
 
#define HID_GLOBAL_ITEM_TAG_LOGICAL_MINIMUM   1
 
#define HID_GLOBAL_ITEM_TAG_LOGICAL_MAXIMUM   2
 
#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MINIMUM   3
 
#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MAXIMUM   4
 
#define HID_GLOBAL_ITEM_TAG_UNIT_EXPONENT   5
 
#define HID_GLOBAL_ITEM_TAG_UNIT   6
 
#define HID_GLOBAL_ITEM_TAG_REPORT_SIZE   7
 
#define HID_GLOBAL_ITEM_TAG_REPORT_ID   8
 
#define HID_GLOBAL_ITEM_TAG_REPORT_COUNT   9
 
#define HID_GLOBAL_ITEM_TAG_PUSH   10
 
#define HID_GLOBAL_ITEM_TAG_POP   11
 
#define HID_LOCAL_ITEM_TAG_USAGE   0
 
#define HID_LOCAL_ITEM_TAG_USAGE_MINIMUM   1
 
#define HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM   2
 
#define HID_LOCAL_ITEM_TAG_DESIGNATOR_INDEX   3
 
#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MINIMUM   4
 
#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MAXIMUM   5
 
#define HID_LOCAL_ITEM_TAG_STRING_INDEX   7
 
#define HID_LOCAL_ITEM_TAG_STRING_MINIMUM   8
 
#define HID_LOCAL_ITEM_TAG_STRING_MAXIMUM   9
 
#define HID_LOCAL_ITEM_TAG_DELIMITER   10
 
#define HID_USAGE_PAGE   0xffff0000
 
#define HID_UP_UNDEFINED   0x00000000
 
#define HID_UP_GENDESK   0x00010000
 
#define HID_UP_SIMULATION   0x00020000
 
#define HID_UP_GENDEVCTRLS   0x00060000
 
#define HID_UP_KEYBOARD   0x00070000
 
#define HID_UP_LED   0x00080000
 
#define HID_UP_BUTTON   0x00090000
 
#define HID_UP_ORDINAL   0x000a0000
 
#define HID_UP_CONSUMER   0x000c0000
 
#define HID_UP_DIGITIZER   0x000d0000
 
#define HID_UP_PID   0x000f0000
 
#define HID_UP_HPVENDOR   0xff7f0000
 
#define HID_UP_HPVENDOR2   0xff010000
 
#define HID_UP_MSVENDOR   0xff000000
 
#define HID_UP_CUSTOM   0x00ff0000
 
#define HID_UP_LOGIVENDOR   0xffbc0000
 
#define HID_USAGE   0x0000ffff
 
#define HID_GD_POINTER   0x00010001
 
#define HID_GD_MOUSE   0x00010002
 
#define HID_GD_JOYSTICK   0x00010004
 
#define HID_GD_GAMEPAD   0x00010005
 
#define HID_GD_KEYBOARD   0x00010006
 
#define HID_GD_KEYPAD   0x00010007
 
#define HID_GD_MULTIAXIS   0x00010008
 
#define HID_GD_X   0x00010030
 
#define HID_GD_Y   0x00010031
 
#define HID_GD_Z   0x00010032
 
#define HID_GD_RX   0x00010033
 
#define HID_GD_RY   0x00010034
 
#define HID_GD_RZ   0x00010035
 
#define HID_GD_SLIDER   0x00010036
 
#define HID_GD_DIAL   0x00010037
 
#define HID_GD_WHEEL   0x00010038
 
#define HID_GD_HATSWITCH   0x00010039
 
#define HID_GD_BUFFER   0x0001003a
 
#define HID_GD_BYTECOUNT   0x0001003b
 
#define HID_GD_MOTION   0x0001003c
 
#define HID_GD_START   0x0001003d
 
#define HID_GD_SELECT   0x0001003e
 
#define HID_GD_VX   0x00010040
 
#define HID_GD_VY   0x00010041
 
#define HID_GD_VZ   0x00010042
 
#define HID_GD_VBRX   0x00010043
 
#define HID_GD_VBRY   0x00010044
 
#define HID_GD_VBRZ   0x00010045
 
#define HID_GD_VNO   0x00010046
 
#define HID_GD_FEATURE   0x00010047
 
#define HID_GD_UP   0x00010090
 
#define HID_GD_DOWN   0x00010091
 
#define HID_GD_RIGHT   0x00010092
 
#define HID_GD_LEFT   0x00010093
 
#define HID_DC_BATTERYSTRENGTH   0x00060020
 
#define HID_DG_DIGITIZER   0x000d0001
 
#define HID_DG_PEN   0x000d0002
 
#define HID_DG_LIGHTPEN   0x000d0003
 
#define HID_DG_TOUCHSCREEN   0x000d0004
 
#define HID_DG_TOUCHPAD   0x000d0005
 
#define HID_DG_STYLUS   0x000d0020
 
#define HID_DG_PUCK   0x000d0021
 
#define HID_DG_FINGER   0x000d0022
 
#define HID_DG_TIPPRESSURE   0x000d0030
 
#define HID_DG_BARRELPRESSURE   0x000d0031
 
#define HID_DG_INRANGE   0x000d0032
 
#define HID_DG_TOUCH   0x000d0033
 
#define HID_DG_UNTOUCH   0x000d0034
 
#define HID_DG_TAP   0x000d0035
 
#define HID_DG_TABLETFUNCTIONKEY   0x000d0039
 
#define HID_DG_PROGRAMCHANGEKEY   0x000d003a
 
#define HID_DG_INVERT   0x000d003c
 
#define HID_DG_TIPSWITCH   0x000d0042
 
#define HID_DG_TIPSWITCH2   0x000d0043
 
#define HID_DG_BARRELSWITCH   0x000d0044
 
#define HID_DG_ERASER   0x000d0045
 
#define HID_DG_TABLETPICK   0x000d0046
 
#define HID_DG_CONFIDENCE   0x000d0047
 
#define HID_DG_WIDTH   0x000d0048
 
#define HID_DG_HEIGHT   0x000d0049
 
#define HID_DG_CONTACTID   0x000d0051
 
#define HID_DG_INPUTMODE   0x000d0052
 
#define HID_DG_DEVICEINDEX   0x000d0053
 
#define HID_DG_CONTACTCOUNT   0x000d0054
 
#define HID_DG_CONTACTMAX   0x000d0055
 
#define HID_INPUT_REPORT   0
 
#define HID_OUTPUT_REPORT   1
 
#define HID_FEATURE_REPORT   2
 
#define HID_CONNECT_HIDINPUT   0x01
 
#define HID_CONNECT_HIDINPUT_FORCE   0x02
 
#define HID_CONNECT_HIDRAW   0x04
 
#define HID_CONNECT_HIDDEV   0x08
 
#define HID_CONNECT_HIDDEV_FORCE   0x10
 
#define HID_CONNECT_FF   0x20
 
#define HID_CONNECT_DEFAULT
 
#define MAX_USBHID_BOOT_QUIRKS   4
 
#define HID_QUIRK_INVERT   0x00000001
 
#define HID_QUIRK_NOTOUCH   0x00000002
 
#define HID_QUIRK_IGNORE   0x00000004
 
#define HID_QUIRK_NOGET   0x00000008
 
#define HID_QUIRK_HIDDEV_FORCE   0x00000010
 
#define HID_QUIRK_BADPAD   0x00000020
 
#define HID_QUIRK_MULTI_INPUT   0x00000040
 
#define HID_QUIRK_HIDINPUT_FORCE   0x00000080
 
#define HID_QUIRK_SKIP_OUTPUT_REPORTS   0x00010000
 
#define HID_QUIRK_FULLSPEED_INTERVAL   0x10000000
 
#define HID_QUIRK_NO_INIT_REPORTS   0x20000000
 
#define HID_QUIRK_NO_IGNORE   0x40000000
 
#define HID_QUIRK_NO_INPUT_SYNC   0x80000000
 
#define HID_GROUP_GENERIC   0x0001
 
#define HID_GROUP_MULTITOUCH   0x0002
 
#define HID_MAX_USAGES   12288
 
#define HID_DEFAULT_NUM_COLLECTIONS   16
 
#define HID_MAX_FIELDS   256
 
#define HID_REPORT_TYPES   3
 
#define HID_MIN_BUFFER_SIZE   64 /* make sure there is at least a packet size of space */
 
#define HID_MAX_BUFFER_SIZE   4096 /* 4kb */
 
#define HID_CONTROL_FIFO_SIZE   256 /* to init devices with >100 reports */
 
#define HID_OUTPUT_FIFO_SIZE   64
 
#define HID_CLAIMED_INPUT   1
 
#define HID_CLAIMED_HIDDEV   2
 
#define HID_CLAIMED_HIDRAW   4
 
#define HID_STAT_ADDED   1
 
#define HID_STAT_PARSED   2
 
#define HID_GLOBAL_STACK_SIZE   4
 
#define HID_COLLECTION_STACK_SIZE   4
 
#define HID_DEVICE(b, g, ven, prod)   .bus = (b), .group = (g), .vendor = (ven), .product = (prod)
 
#define HID_USB_DEVICE(ven, prod)   .bus = BUS_USB, .vendor = (ven), .product = (prod)
 
#define HID_BLUETOOTH_DEVICE(ven, prod)   .bus = BUS_BLUETOOTH, .vendor = (ven), .product = (prod)
 
#define HID_REPORT_ID(rep)   .report_type = (rep)
 
#define HID_USAGE_ID(uhid, utype, ucode)   .usage_hid = (uhid), .usage_type = (utype), .usage_code = (ucode)
 
#define HID_TERMINATOR   (HID_ANY_ID - 1)
 

Enumerations

enum  hid_type { HID_TYPE_OTHER = 0, HID_TYPE_USBMOUSE, HID_TYPE_USBNONE }
 

Functions

struct hid_class_descriptor __attribute__ ((packed))
 

Variables

__u8 bDescriptorType
 
__le16 wDescriptorLength
 
__u8 bLength
 
__le16 bcdHID
 
__u8 bCountryCode
 
__u8 bNumDescriptors
 
struct hid_class_descriptor desc [1]
 
struct hid_report_id __attribute__
 

: driver name (e.g. "Footech_bar-wheel")

struct hid_driver

: which devices is this driver for (must be non-NULL for probe to be called) : list of dynamically added device ids : lock protecting : new device inserted : device removed (NULL if not a hot-plug capable driver) : on which reports to call raw_event (NULL means all) : if report in report_table, this hook is called (NULL means nop) : on which events to call event (NULL means all) : if usage in usage_table, this hook is called (NULL means nop) : called before report descriptor parsing (NULL means nop) : invoked on input registering before mapping an usage : invoked on input registering after mapping an usage : invoked just before the device is registered : invoked on feature registering : invoked on suspend (NULL means nop) : invoked on resume if device was not reset (NULL means nop) : invoked on resume if device was reset (NULL means nop)

raw_event and event should return 0 on no action performed, 1 when no further processing should be done and negative on error

input_mapping shall return a negative value to completely ignore this usage (e.g. doubled or invalid usage), zero to continue with parsing of this usage by generic code (no special handling needed) or positive to skip generic parsing (needed special handling which was done in the hook already) input_mapped shall return negative to inform the layer that this usage should not be considered for further processing or zero to notify that no processing was performed and should be done in a generic manner Both these functions may be NULL which means the same behavior as returning zero from them.

#define PM_HINT_FULLON   1<<5
 
#define PM_HINT_NORMAL   1<<1
 
#define IS_INPUT_APPLICATION(a)   (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001) || ((a >= 0x000d0002) && (a <= 0x000d0006)))
 
#define hid_register_driver(driver)   __hid_register_driver(driver, THIS_MODULE, KBUILD_MODNAME)
 
#define hid_pidff_init   NULL
 
#define dbg_hid(format, arg...)
 
#define hid_printk(level, hid, fmt, arg...)   dev_printk(level, &(hid)->dev, fmt, ##arg)
 
#define hid_emerg(hid, fmt, arg...)   dev_emerg(&(hid)->dev, fmt, ##arg)
 
#define hid_crit(hid, fmt, arg...)   dev_crit(&(hid)->dev, fmt, ##arg)
 
#define hid_alert(hid, fmt, arg...)   dev_alert(&(hid)->dev, fmt, ##arg)
 
#define hid_err(hid, fmt, arg...)   dev_err(&(hid)->dev, fmt, ##arg)
 
#define hid_notice(hid, fmt, arg...)   dev_notice(&(hid)->dev, fmt, ##arg)
 
#define hid_warn(hid, fmt, arg...)   dev_warn(&(hid)->dev, fmt, ##arg)
 
#define hid_info(hid, fmt, arg...)   dev_info(&(hid)->dev, fmt, ##arg)
 
#define hid_dbg(hid, fmt, arg...)   dev_dbg(&(hid)->dev, fmt, ##arg)
 
int hid_debug
 
int hid_add_device (struct hid_device *)
 
void hid_destroy_device (struct hid_device *)
 
int __must_check __hid_register_driver (struct hid_driver *, struct module *, const char *mod_name)
 
void hid_unregister_driver (struct hid_driver *)
 
void hidinput_hid_event (struct hid_device *, struct hid_field *, struct hid_usage *, __s32)
 
void hidinput_report_event (struct hid_device *hid, struct hid_report *report)
 
int hidinput_connect (struct hid_device *hid, unsigned int force)
 
void hidinput_disconnect (struct hid_device *)
 
int hid_set_field (struct hid_field *, unsigned, __s32)
 
int hid_input_report (struct hid_device *, int type, u8 *, int, int)
 
int hidinput_find_field (struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field)
 
struct hid_fieldhidinput_get_led_field (struct hid_device *hid)
 
unsigned int hidinput_count_leds (struct hid_device *hid)
 
void hid_output_report (struct hid_report *report, __u8 *data)
 
struct hid_devicehid_allocate_device (void)
 
struct hid_reporthid_register_report (struct hid_device *device, unsigned type, unsigned id)
 
int hid_parse_report (struct hid_device *hid, __u8 *start, unsigned size)
 
int hid_open_report (struct hid_device *device)
 
int hid_check_keys_pressed (struct hid_device *hid)
 
int hid_connect (struct hid_device *hid, unsigned int connect_mask)
 
void hid_disconnect (struct hid_device *hid)
 
struct hid_device_idhid_match_id (struct hid_device *hdev, const struct hid_device_id *id)
 
int hid_report_raw_event (struct hid_device *hid, int type, u8 *data, int size, int interrupt)
 
int hid_generic_init (void)
 
void hid_generic_exit (void)
 
u32 usbhid_lookup_quirk (const u16 idVendor, const u16 idProduct)
 
int usbhid_quirks_init (char **quirks_param)
 
void usbhid_quirks_exit (void)
 
void usbhid_set_leds (struct hid_device *hid)
 

Macro Definition Documentation

#define dbg_hid (   format,
  arg... 
)
Value:
do { \
if (hid_debug) \
printk(KERN_DEBUG "%s: " format, __FILE__, ##arg); \
} while (0)

Definition at line 884 of file hid.h.

#define hid_alert (   hid,
  fmt,
  arg... 
)    dev_alert(&(hid)->dev, fmt, ##arg)

Definition at line 896 of file hid.h.

#define HID_BLUETOOTH_DEVICE (   ven,
  prod 
)    .bus = BUS_BLUETOOTH, .vendor = (ven), .product = (prod)

Definition at line 557 of file hid.h.

#define HID_CLAIMED_HIDDEV   2

Definition at line 417 of file hid.h.

#define HID_CLAIMED_HIDRAW   4

Definition at line 418 of file hid.h.

#define HID_CLAIMED_INPUT   1

Definition at line 416 of file hid.h.

#define HID_COLLECTION_APPLICATION   1

Definition at line 113 of file hid.h.

#define HID_COLLECTION_LOGICAL   2

Definition at line 114 of file hid.h.

#define HID_COLLECTION_PHYSICAL   0

Definition at line 112 of file hid.h.

#define HID_COLLECTION_STACK_SIZE   4

Definition at line 526 of file hid.h.

#define HID_CONNECT_DEFAULT
Value:

Definition at line 264 of file hid.h.

#define HID_CONNECT_FF   0x20

Definition at line 263 of file hid.h.

#define HID_CONNECT_HIDDEV   0x08

Definition at line 261 of file hid.h.

#define HID_CONNECT_HIDDEV_FORCE   0x10

Definition at line 262 of file hid.h.

#define HID_CONNECT_HIDINPUT   0x01

Definition at line 258 of file hid.h.

#define HID_CONNECT_HIDINPUT_FORCE   0x02

Definition at line 259 of file hid.h.

#define HID_CONNECT_HIDRAW   0x04

Definition at line 260 of file hid.h.

#define HID_CONTROL_FIFO_SIZE   256 /* to init devices with >100 reports */

Definition at line 402 of file hid.h.

#define hid_crit (   hid,
  fmt,
  arg... 
)    dev_crit(&(hid)->dev, fmt, ##arg)

Definition at line 894 of file hid.h.

#define hid_dbg (   hid,
  fmt,
  arg... 
)    dev_dbg(&(hid)->dev, fmt, ##arg)

Definition at line 906 of file hid.h.

#define HID_DC_BATTERYSTRENGTH   0x00060020

Definition at line 208 of file hid.h.

#define HID_DEFAULT_NUM_COLLECTIONS   16

Definition at line 320 of file hid.h.

#define HID_DEVICE (   b,
  g,
  ven,
  prod 
)    .bus = (b), .group = (g), .vendor = (ven), .product = (prod)

Definition at line 553 of file hid.h.

#define HID_DG_BARRELPRESSURE   0x000d0031

Definition at line 219 of file hid.h.

#define HID_DG_BARRELSWITCH   0x000d0044

Definition at line 229 of file hid.h.

#define HID_DG_CONFIDENCE   0x000d0047

Definition at line 237 of file hid.h.

#define HID_DG_CONTACTCOUNT   0x000d0054

Definition at line 243 of file hid.h.

#define HID_DG_CONTACTID   0x000d0051

Definition at line 240 of file hid.h.

#define HID_DG_CONTACTMAX   0x000d0055

Definition at line 244 of file hid.h.

#define HID_DG_DEVICEINDEX   0x000d0053

Definition at line 242 of file hid.h.

#define HID_DG_DIGITIZER   0x000d0001

Definition at line 210 of file hid.h.

#define HID_DG_ERASER   0x000d0045

Definition at line 230 of file hid.h.

#define HID_DG_FINGER   0x000d0022

Definition at line 217 of file hid.h.

#define HID_DG_HEIGHT   0x000d0049

Definition at line 239 of file hid.h.

#define HID_DG_INPUTMODE   0x000d0052

Definition at line 241 of file hid.h.

#define HID_DG_INRANGE   0x000d0032

Definition at line 220 of file hid.h.

#define HID_DG_INVERT   0x000d003c

Definition at line 226 of file hid.h.

#define HID_DG_LIGHTPEN   0x000d0003

Definition at line 212 of file hid.h.

#define HID_DG_PEN   0x000d0002

Definition at line 211 of file hid.h.

#define HID_DG_PROGRAMCHANGEKEY   0x000d003a

Definition at line 225 of file hid.h.

#define HID_DG_PUCK   0x000d0021

Definition at line 216 of file hid.h.

#define HID_DG_STYLUS   0x000d0020

Definition at line 215 of file hid.h.

#define HID_DG_TABLETFUNCTIONKEY   0x000d0039

Definition at line 224 of file hid.h.

#define HID_DG_TABLETPICK   0x000d0046

Definition at line 231 of file hid.h.

#define HID_DG_TAP   0x000d0035

Definition at line 223 of file hid.h.

#define HID_DG_TIPPRESSURE   0x000d0030

Definition at line 218 of file hid.h.

#define HID_DG_TIPSWITCH   0x000d0042

Definition at line 227 of file hid.h.

#define HID_DG_TIPSWITCH2   0x000d0043

Definition at line 228 of file hid.h.

#define HID_DG_TOUCH   0x000d0033

Definition at line 221 of file hid.h.

#define HID_DG_TOUCHPAD   0x000d0005

Definition at line 214 of file hid.h.

#define HID_DG_TOUCHSCREEN   0x000d0004

Definition at line 213 of file hid.h.

#define HID_DG_UNTOUCH   0x000d0034

Definition at line 222 of file hid.h.

#define HID_DG_WIDTH   0x000d0048

Definition at line 238 of file hid.h.

#define hid_emerg (   hid,
  fmt,
  arg... 
)    dev_emerg(&(hid)->dev, fmt, ##arg)

Definition at line 892 of file hid.h.

#define hid_err (   hid,
  fmt,
  arg... 
)    dev_err(&(hid)->dev, fmt, ##arg)

Definition at line 898 of file hid.h.

#define HID_FEATURE_REPORT   2

Definition at line 252 of file hid.h.

#define HID_GD_BUFFER   0x0001003a

Definition at line 190 of file hid.h.

#define HID_GD_BYTECOUNT   0x0001003b

Definition at line 191 of file hid.h.

#define HID_GD_DIAL   0x00010037

Definition at line 187 of file hid.h.

#define HID_GD_DOWN   0x00010091

Definition at line 204 of file hid.h.

#define HID_GD_FEATURE   0x00010047

Definition at line 202 of file hid.h.

#define HID_GD_GAMEPAD   0x00010005

Definition at line 176 of file hid.h.

#define HID_GD_HATSWITCH   0x00010039

Definition at line 189 of file hid.h.

#define HID_GD_JOYSTICK   0x00010004

Definition at line 175 of file hid.h.

#define HID_GD_KEYBOARD   0x00010006

Definition at line 177 of file hid.h.

#define HID_GD_KEYPAD   0x00010007

Definition at line 178 of file hid.h.

#define HID_GD_LEFT   0x00010093

Definition at line 206 of file hid.h.

#define HID_GD_MOTION   0x0001003c

Definition at line 192 of file hid.h.

#define HID_GD_MOUSE   0x00010002

Definition at line 174 of file hid.h.

#define HID_GD_MULTIAXIS   0x00010008

Definition at line 179 of file hid.h.

#define HID_GD_POINTER   0x00010001

Definition at line 173 of file hid.h.

#define HID_GD_RIGHT   0x00010092

Definition at line 205 of file hid.h.

#define HID_GD_RX   0x00010033

Definition at line 183 of file hid.h.

#define HID_GD_RY   0x00010034

Definition at line 184 of file hid.h.

#define HID_GD_RZ   0x00010035

Definition at line 185 of file hid.h.

#define HID_GD_SELECT   0x0001003e

Definition at line 194 of file hid.h.

#define HID_GD_SLIDER   0x00010036

Definition at line 186 of file hid.h.

#define HID_GD_START   0x0001003d

Definition at line 193 of file hid.h.

#define HID_GD_UP   0x00010090

Definition at line 203 of file hid.h.

#define HID_GD_VBRX   0x00010043

Definition at line 198 of file hid.h.

#define HID_GD_VBRY   0x00010044

Definition at line 199 of file hid.h.

#define HID_GD_VBRZ   0x00010045

Definition at line 200 of file hid.h.

#define HID_GD_VNO   0x00010046

Definition at line 201 of file hid.h.

#define HID_GD_VX   0x00010040

Definition at line 195 of file hid.h.

#define HID_GD_VY   0x00010041

Definition at line 196 of file hid.h.

#define HID_GD_VZ   0x00010042

Definition at line 197 of file hid.h.

#define HID_GD_WHEEL   0x00010038

Definition at line 188 of file hid.h.

#define HID_GD_X   0x00010030

Definition at line 180 of file hid.h.

#define HID_GD_Y   0x00010031

Definition at line 181 of file hid.h.

#define HID_GD_Z   0x00010032

Definition at line 182 of file hid.h.

#define HID_GLOBAL_ITEM_TAG_LOGICAL_MAXIMUM   2

Definition at line 122 of file hid.h.

#define HID_GLOBAL_ITEM_TAG_LOGICAL_MINIMUM   1

Definition at line 121 of file hid.h.

#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MAXIMUM   4

Definition at line 124 of file hid.h.

#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MINIMUM   3

Definition at line 123 of file hid.h.

#define HID_GLOBAL_ITEM_TAG_POP   11

Definition at line 131 of file hid.h.

#define HID_GLOBAL_ITEM_TAG_PUSH   10

Definition at line 130 of file hid.h.

#define HID_GLOBAL_ITEM_TAG_REPORT_COUNT   9

Definition at line 129 of file hid.h.

#define HID_GLOBAL_ITEM_TAG_REPORT_ID   8

Definition at line 128 of file hid.h.

#define HID_GLOBAL_ITEM_TAG_REPORT_SIZE   7

Definition at line 127 of file hid.h.

#define HID_GLOBAL_ITEM_TAG_UNIT   6

Definition at line 126 of file hid.h.

#define HID_GLOBAL_ITEM_TAG_UNIT_EXPONENT   5

Definition at line 125 of file hid.h.

#define HID_GLOBAL_ITEM_TAG_USAGE_PAGE   0

Definition at line 120 of file hid.h.

#define HID_GLOBAL_STACK_SIZE   4

Definition at line 525 of file hid.h.

#define HID_GROUP_GENERIC   0x0001

Definition at line 293 of file hid.h.

#define HID_GROUP_MULTITOUCH   0x0002

Definition at line 294 of file hid.h.

#define hid_info (   hid,
  fmt,
  arg... 
)    dev_info(&(hid)->dev, fmt, ##arg)

Definition at line 904 of file hid.h.

#define HID_INPUT_REPORT   0

Definition at line 250 of file hid.h.

#define HID_ITEM_FORMAT_LONG   1

Definition at line 67 of file hid.h.

#define HID_ITEM_FORMAT_SHORT   0

Definition at line 66 of file hid.h.

#define HID_ITEM_TAG_LONG   15

Definition at line 73 of file hid.h.

#define HID_ITEM_TYPE_GLOBAL   1

Definition at line 80 of file hid.h.

#define HID_ITEM_TYPE_LOCAL   2

Definition at line 81 of file hid.h.

#define HID_ITEM_TYPE_MAIN   0

Definition at line 79 of file hid.h.

#define HID_ITEM_TYPE_RESERVED   3

Definition at line 82 of file hid.h.

#define HID_LOCAL_ITEM_TAG_DELIMITER   10

Definition at line 146 of file hid.h.

#define HID_LOCAL_ITEM_TAG_DESIGNATOR_INDEX   3

Definition at line 140 of file hid.h.

#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MAXIMUM   5

Definition at line 142 of file hid.h.

#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MINIMUM   4

Definition at line 141 of file hid.h.

#define HID_LOCAL_ITEM_TAG_STRING_INDEX   7

Definition at line 143 of file hid.h.

#define HID_LOCAL_ITEM_TAG_STRING_MAXIMUM   9

Definition at line 145 of file hid.h.

#define HID_LOCAL_ITEM_TAG_STRING_MINIMUM   8

Definition at line 144 of file hid.h.

#define HID_LOCAL_ITEM_TAG_USAGE   0

Definition at line 137 of file hid.h.

#define HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM   2

Definition at line 139 of file hid.h.

#define HID_LOCAL_ITEM_TAG_USAGE_MINIMUM   1

Definition at line 138 of file hid.h.

#define HID_MAIN_ITEM_BUFFERED_BYTE   0x100

Definition at line 106 of file hid.h.

#define HID_MAIN_ITEM_CONSTANT   0x001

Definition at line 98 of file hid.h.

#define HID_MAIN_ITEM_NO_PREFERRED   0x020

Definition at line 103 of file hid.h.

#define HID_MAIN_ITEM_NONLINEAR   0x010

Definition at line 102 of file hid.h.

#define HID_MAIN_ITEM_NULL_STATE   0x040

Definition at line 104 of file hid.h.

#define HID_MAIN_ITEM_RELATIVE   0x004

Definition at line 100 of file hid.h.

#define HID_MAIN_ITEM_TAG_BEGIN_COLLECTION   10

Definition at line 91 of file hid.h.

#define HID_MAIN_ITEM_TAG_END_COLLECTION   12

Definition at line 92 of file hid.h.

#define HID_MAIN_ITEM_TAG_FEATURE   11

Definition at line 90 of file hid.h.

#define HID_MAIN_ITEM_TAG_INPUT   8

Definition at line 88 of file hid.h.

#define HID_MAIN_ITEM_TAG_OUTPUT   9

Definition at line 89 of file hid.h.

#define HID_MAIN_ITEM_VARIABLE   0x002

Definition at line 99 of file hid.h.

#define HID_MAIN_ITEM_VOLATILE   0x080

Definition at line 105 of file hid.h.

#define HID_MAIN_ITEM_WRAP   0x008

Definition at line 101 of file hid.h.

#define HID_MAX_BUFFER_SIZE   4096 /* 4kb */

Definition at line 401 of file hid.h.

#define HID_MAX_FIELDS   256

Definition at line 380 of file hid.h.

#define HID_MAX_USAGES   12288

Definition at line 319 of file hid.h.

#define HID_MIN_BUFFER_SIZE   64 /* make sure there is at least a packet size of space */

Definition at line 400 of file hid.h.

#define hid_notice (   hid,
  fmt,
  arg... 
)    dev_notice(&(hid)->dev, fmt, ##arg)

Definition at line 900 of file hid.h.

#define HID_OUTPUT_FIFO_SIZE   64

Definition at line 403 of file hid.h.

#define HID_OUTPUT_REPORT   1

Definition at line 251 of file hid.h.

#define hid_pidff_init   NULL

Definition at line 881 of file hid.h.

#define hid_printk (   level,
  hid,
  fmt,
  arg... 
)    dev_printk(level, &(hid)->dev, fmt, ##arg)

Definition at line 890 of file hid.h.

#define HID_QUIRK_BADPAD   0x00000020

Definition at line 281 of file hid.h.

#define HID_QUIRK_FULLSPEED_INTERVAL   0x10000000

Definition at line 285 of file hid.h.

#define HID_QUIRK_HIDDEV_FORCE   0x00000010

Definition at line 280 of file hid.h.

#define HID_QUIRK_HIDINPUT_FORCE   0x00000080

Definition at line 283 of file hid.h.

#define HID_QUIRK_IGNORE   0x00000004

Definition at line 278 of file hid.h.

#define HID_QUIRK_INVERT   0x00000001

Definition at line 276 of file hid.h.

#define HID_QUIRK_MULTI_INPUT   0x00000040

Definition at line 282 of file hid.h.

#define HID_QUIRK_NO_IGNORE   0x40000000

Definition at line 287 of file hid.h.

#define HID_QUIRK_NO_INIT_REPORTS   0x20000000

Definition at line 286 of file hid.h.

#define HID_QUIRK_NO_INPUT_SYNC   0x80000000

Definition at line 288 of file hid.h.

#define HID_QUIRK_NOGET   0x00000008

Definition at line 279 of file hid.h.

#define HID_QUIRK_NOTOUCH   0x00000002

Definition at line 277 of file hid.h.

#define HID_QUIRK_SKIP_OUTPUT_REPORTS   0x00010000

Definition at line 284 of file hid.h.

#define hid_register_driver (   driver)    __hid_register_driver(driver, THIS_MODULE, KBUILD_MODNAME)

Definition at line 694 of file hid.h.

#define HID_REPORT_ID (   rep)    .report_type = (rep)

Definition at line 560 of file hid.h.

#define HID_REPORT_TYPES   3

Definition at line 398 of file hid.h.

#define HID_STAT_ADDED   1

Definition at line 420 of file hid.h.

#define HID_STAT_PARSED   2

Definition at line 421 of file hid.h.

#define HID_TERMINATOR   (HID_ANY_ID - 1)

Definition at line 565 of file hid.h.

#define HID_UP_BUTTON   0x00090000

Definition at line 160 of file hid.h.

#define HID_UP_CONSUMER   0x000c0000

Definition at line 162 of file hid.h.

#define HID_UP_CUSTOM   0x00ff0000

Definition at line 168 of file hid.h.

#define HID_UP_DIGITIZER   0x000d0000

Definition at line 163 of file hid.h.

#define HID_UP_GENDESK   0x00010000

Definition at line 155 of file hid.h.

#define HID_UP_GENDEVCTRLS   0x00060000

Definition at line 157 of file hid.h.

#define HID_UP_HPVENDOR   0xff7f0000

Definition at line 165 of file hid.h.

#define HID_UP_HPVENDOR2   0xff010000

Definition at line 166 of file hid.h.

#define HID_UP_KEYBOARD   0x00070000

Definition at line 158 of file hid.h.

#define HID_UP_LED   0x00080000

Definition at line 159 of file hid.h.

#define HID_UP_LOGIVENDOR   0xffbc0000

Definition at line 169 of file hid.h.

#define HID_UP_MSVENDOR   0xff000000

Definition at line 167 of file hid.h.

#define HID_UP_ORDINAL   0x000a0000

Definition at line 161 of file hid.h.

#define HID_UP_PID   0x000f0000

Definition at line 164 of file hid.h.

#define HID_UP_SIMULATION   0x00020000

Definition at line 156 of file hid.h.

#define HID_UP_UNDEFINED   0x00000000

Definition at line 154 of file hid.h.

#define HID_USAGE   0x0000ffff

Definition at line 171 of file hid.h.

#define HID_USAGE_ID (   uhid,
  utype,
  ucode 
)    .usage_hid = (uhid), .usage_type = (utype), .usage_code = (ucode)

Definition at line 562 of file hid.h.

#define HID_USAGE_PAGE   0xffff0000

Definition at line 152 of file hid.h.

#define HID_USB_DEVICE (   ven,
  prod 
)    .bus = BUS_USB, .vendor = (ven), .product = (prod)

Definition at line 555 of file hid.h.

#define hid_warn (   hid,
  fmt,
  arg... 
)    dev_warn(&(hid)->dev, fmt, ##arg)

Definition at line 902 of file hid.h.

#define IS_INPUT_APPLICATION (   a)    (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001) || ((a >= 0x000d0002) && (a <= 0x000d0006)))

Definition at line 681 of file hid.h.

#define MAX_USBHID_BOOT_QUIRKS   4

Definition at line 274 of file hid.h.

#define PM_HINT_FULLON   1<<5

Definition at line 676 of file hid.h.

#define PM_HINT_NORMAL   1<<1

Definition at line 677 of file hid.h.

Enumeration Type Documentation

enum hid_type
Enumerator:
HID_TYPE_OTHER 
HID_TYPE_USBMOUSE 
HID_TYPE_USBNONE 

Definition at line 429 of file hid.h.

Function Documentation

mcontroller : adapter info structure for old mimd_t apps

: base address : irq number : number of logical drives : pci bus : pci device : pci function : pci id : vendor id : slot number : unique id

Definition at line 171 of file esd_usb2.c.

int __must_check __hid_register_driver ( struct hid_driver ,
struct module ,
const char mod_name 
)

Definition at line 2310 of file hid-core.c.

int hid_add_device ( struct hid_device )

Definition at line 2201 of file hid-core.c.

struct hid_device* hid_allocate_device ( void  )
read

hid_allocate_device - allocate new hid device descriptor

Allocate and initialize hid device, so that hid_destroy_device might be used to free it.

New hid_device pointer is returned on success, otherwise ERR_PTR encoded error value.

Definition at line 2260 of file hid-core.c.

int hid_check_keys_pressed ( struct hid_device hid)

Definition at line 2343 of file hid-core.c.

int hid_connect ( struct hid_device hid,
unsigned int  connect_mask 
)

Definition at line 1361 of file hid-core.c.

void hid_destroy_device ( struct hid_device hdev)

hid_destroy_device - free previously allocated device

: hid device

If you allocate hid_device through hid_allocate_device, you should ever free by this function.

Definition at line 2303 of file hid-core.c.

void hid_disconnect ( struct hid_device hid)

Definition at line 1449 of file hid-core.c.

void hid_generic_exit ( void  )
int hid_generic_init ( void  )
int hid_input_report ( struct hid_device hid,
int  type,
u8 data,
int  size,
int  interrupt 
)

hid_input_report - report data from lower layer (usb, bt...)

: hid device : HID report type (HID_*_REPORT) : report contents : size of data parameter : distinguish between interrupt and control transfers

This is data entry for lower layers.

Definition at line 1231 of file hid-core.c.

struct hid_device_id* hid_match_id ( struct hid_device hdev,
const struct hid_device_id id 
)
read

Definition at line 1314 of file hid-core.c.

int hid_open_report ( struct hid_device device)

hid_open_report - open a driver-specific device report

: hid device

Parse a report description into a hid_device structure. Reports are enumerated, fields are attached to these reports. 0 returned on success, otherwise nonzero error value.

This function (or the equivalent hid_parse() macro) should only be called from probe() in drivers, before starting the device.

Definition at line 754 of file hid-core.c.

void hid_output_report ( struct hid_report report,
__u8 data 
)

Definition at line 1112 of file hid-core.c.

int hid_parse_report ( struct hid_device hid,
__u8 start,
unsigned  size 
)

hid_parse_report - parse device report

: hid device : report start : report size

Allocate the device report as read by the bus driver. This function should only be called from parse() in ll drivers.

Definition at line 732 of file hid-core.c.

struct hid_report* hid_register_report ( struct hid_device device,
unsigned  type,
unsigned  id 
)
read

Definition at line 61 of file hid-core.c.

int hid_report_raw_event ( struct hid_device hid,
int  type,
u8 data,
int  size,
int  interrupt 
)

Definition at line 1170 of file hid-core.c.

int hid_set_field ( struct hid_field ,
unsigned  ,
__s32   
)

Definition at line 1131 of file hid-core.c.

void hid_unregister_driver ( struct hid_driver )

Definition at line 2335 of file hid-core.c.

int hidinput_connect ( struct hid_device hid,
unsigned int  force 
)
unsigned int hidinput_count_leds ( struct hid_device hid)
void hidinput_disconnect ( struct hid_device )
int hidinput_find_field ( struct hid_device hid,
unsigned int  type,
unsigned int  code,
struct hid_field **  field 
)
struct hid_field* hidinput_get_led_field ( struct hid_device hid)
read
void hidinput_hid_event ( struct hid_device ,
struct hid_field ,
struct hid_usage ,
__s32   
)
void hidinput_report_event ( struct hid_device hid,
struct hid_report report 
)
u32 usbhid_lookup_quirk ( const u16  idVendor,
const u16  idProduct 
)

usbhid_lookup_quirk: return any quirks associated with a USB HID device : the 16-bit USB vendor ID, in native byteorder : the 16-bit USB product ID, in native byteorder

Description: Given a USB vendor ID and product ID, return any quirks associated with that device.

Returns: a u32 quirks value.

Definition at line 313 of file hid-quirks.c.

void usbhid_quirks_exit ( void  )

usbhid_quirks_exit: release memory associated with dynamic_quirks

Description: Release all memory associated with dynamic quirks. Called upon module unload.

Returns: nothing

Definition at line 268 of file hid-quirks.c.

int usbhid_quirks_init ( char **  quirks_param)

usbhid_quirks_init: apply USB HID quirks specified at module load time

Definition at line 237 of file hid-quirks.c.

void usbhid_set_leds ( struct hid_device hid)

Definition at line 862 of file hid-core.c.

Variable Documentation

__le16 bcdHID

Definition at line 554 of file hid.h.

__u8 bCountryCode

Definition at line 555 of file hid.h.

__u8 bDescriptorType

Definition at line 542 of file hid.h.

__u8 bLength

Definition at line 552 of file hid.h.

__u8 bNumDescriptors

Definition at line 556 of file hid.h.

Definition at line 558 of file hid.h.

int hid_debug

Definition at line 48 of file hid-core.c.

__le16 wDescriptorLength

Definition at line 543 of file hid.h.