]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/hid.h
Merge branches 'for-3.12/devm', 'for-3.12/i2c-hid', 'for-3.12/i2c-hid-dt', 'for-3...
[karo-tx-linux.git] / include / linux / hid.h
index bc132d2a20aad8333f7140e55575ce827df59a57..ee1ffc5e19c9fd3d8b2c9ab4c481953455417d4c 100644 (file)
@@ -252,6 +252,8 @@ struct hid_item {
 #define HID_OUTPUT_REPORT      1
 #define HID_FEATURE_REPORT     2
 
+#define HID_REPORT_TYPES       3
+
 /*
  * HID connect requests
  */
@@ -395,14 +397,14 @@ struct hid_report {
        struct hid_device *device;                      /* associated device */
 };
 
+#define HID_MAX_IDS 256
+
 struct hid_report_enum {
        unsigned numbered;
        struct list_head report_list;
-       struct hid_report *report_id_hash[256];
+       struct hid_report *report_id_hash[HID_MAX_IDS];
 };
 
-#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 */
@@ -458,6 +460,7 @@ struct hid_device {                                                 /* device report descriptor */
        enum hid_type type;                                             /* device type (mouse, kbd, ...) */
        unsigned country;                                               /* HID country */
        struct hid_report_enum report_enum[HID_REPORT_TYPES];
+       struct work_struct led_work;                                    /* delayed LED worker */
 
        struct semaphore driver_lock;                                   /* protects the current driver, except during input */
        struct semaphore driver_input_lock;                             /* protects the current driver */
@@ -749,6 +752,7 @@ struct hid_field *hidinput_get_led_field(struct hid_device *hid);
 unsigned int hidinput_count_leds(struct hid_device *hid);
 __s32 hidinput_calc_abs_res(const struct hid_field *field, __u16 code);
 void hid_output_report(struct hid_report *report, __u8 *data);
+u8 *hid_alloc_report_buf(struct hid_report *report, gfp_t flags);
 struct hid_device *hid_allocate_device(void);
 struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id);
 int hid_parse_report(struct hid_device *hid, __u8 *start, unsigned size);
@@ -994,7 +998,6 @@ int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size,
 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);
 
 #ifdef CONFIG_HID_PID
 int hid_pidff_init(struct hid_device *hid);