]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/hid.h
Fix misspellings of "agressive".
[linux-2.6-omap-h63xx.git] / include / linux / hid.h
index 0473b45b73b842685cc0c34e7e23d7afd757d37d..d26b08f461f2eeb2986f0ad1a7c30f62c61fdb5e 100644 (file)
@@ -264,6 +264,9 @@ struct hid_item {
 #define HID_QUIRK_INVERT_HWHEEL                        0x00004000
 #define HID_QUIRK_POWERBOOK_ISO_KEYBOARD        0x00008000
 #define HID_QUIRK_BAD_RELATIVE_KEYS            0x00010000
+#define HID_QUIRK_SKIP_OUTPUT_REPORTS          0x00020000
+#define HID_QUIRK_IGNORE_MOUSE                 0x00040000
+#define HID_QUIRK_SONY_PS3_CONTROLLER          0x00080000
 
 /*
  * This is the global environment of the parser. This information is
@@ -410,41 +413,7 @@ struct hid_device {                                                        /* device report descriptor */
        unsigned country;                                               /* HID country */
        struct hid_report_enum report_enum[HID_REPORT_TYPES];
 
-       struct usb_device *dev;                                         /* device */
-
-       /* USB specific fields */
-
-       struct usb_interface *intf;                                     /* USB interface */
-       int ifnum;                                                      /* USB interface number */
-
-       unsigned long iofl;                                             /* I/O flags (CTRL_RUNNING, OUT_RUNNING) */
-       struct timer_list io_retry;                                     /* Retry timer */
-       unsigned long stop_retry;                                       /* Time to give up, in jiffies */
-       unsigned int retry_delay;                                       /* Delay length in ms */
-       struct work_struct reset_work;                                  /* Task context for resets */
-
-       unsigned int bufsize;                                           /* URB buffer size */
-
-       struct urb *urbin;                                              /* Input URB */
-       char *inbuf;                                                    /* Input buffer */
-       dma_addr_t inbuf_dma;                                           /* Input buffer dma */
-       spinlock_t inlock;                                              /* Input fifo spinlock */
-
-       struct urb *urbctrl;                                            /* Control URB */
-       struct usb_ctrlrequest *cr;                                     /* Control request struct */
-       dma_addr_t cr_dma;                                              /* Control request struct dma */
-       struct hid_control_fifo ctrl[HID_CONTROL_FIFO_SIZE];            /* Control fifo */
-       unsigned char ctrlhead, ctrltail;                               /* Control fifo head & tail */
-       char *ctrlbuf;                                                  /* Control buffer */
-       dma_addr_t ctrlbuf_dma;                                         /* Control buffer dma */
-       spinlock_t ctrllock;                                            /* Control fifo spinlock */
-
-       struct urb *urbout;                                             /* Output URB */
-       struct hid_report *out[HID_CONTROL_FIFO_SIZE];                  /* Output pipe fifo */
-       unsigned char outhead, outtail;                                 /* Output pipe fifo head & tail */
-       char *outbuf;                                                   /* Output buffer */
-       dma_addr_t outbuf_dma;                                          /* Output buffer dma */
-       spinlock_t outlock;                                             /* Output fifo spinlock */
+       struct device *dev;                                             /* device */
 
        unsigned claimed;                                               /* Claimed by hidinput, hiddev? */
        unsigned quirks;                                                /* Various quirks the device can pull on us */
@@ -464,9 +433,13 @@ struct hid_device {                                                        /* device report descriptor */
 
        /* device-specific function pointers */
        int (*hidinput_input_event) (struct input_dev *, unsigned int, unsigned int, int);
-       int (*hidinput_open) (struct input_dev *);
-       void (*hidinput_close) (struct input_dev *);
+       int (*hid_open) (struct hid_device *);
+       void (*hid_close) (struct hid_device *);
 
+       /* hiddev event handler */
+       void (*hiddev_hid_event) (struct hid_device *, struct hid_field *field,
+                                 struct hid_usage *, __s32);
+       void (*hiddev_report_event) (struct hid_device *, struct hid_report *);
 #ifdef CONFIG_USB_HIDINPUT_POWERBOOK
        unsigned long pb_pressed_fn[NBITS(KEY_MAX)];
        unsigned long pb_pressed_numlock[NBITS(KEY_MAX)];
@@ -501,23 +474,9 @@ struct hid_descriptor {
        struct hid_class_descriptor desc[1];
 } __attribute__ ((packed));
 
-#ifdef DEBUG
-#include "hid-debug.h"
-#else
-#define hid_dump_input(a,b)    do { } while (0)
-#define hid_dump_device(c)     do { } while (0)
-#define hid_dump_field(a,b)    do { } while (0)
-#define resolv_usage(a)                do { } while (0)
-#define resolv_event(a,b)      do { } while (0)
-#endif
-
-#ifdef CONFIG_HID
 /* Applications from HID Usage Tables 4/8/99 Version 1.1 */
 /* We ignore a few input applications that are not widely used */
 #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001))
-#else
-#define IS_INPUT_APPLICATION(a) (0)
-#endif
 
 /* HID core API */
 extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32);
@@ -526,6 +485,7 @@ extern int hidinput_connect(struct hid_device *);
 extern 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);
 void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data, int interrupt);
 void hid_output_report(struct hid_report *report, __u8 *data);
@@ -536,6 +496,7 @@ struct hid_device *hid_parse_report(__u8 *start, unsigned size);
 int hid_ff_init(struct hid_device *hid);
 
 int hid_lgff_init(struct hid_device *hid);
+int hid_plff_init(struct hid_device *hid);
 int hid_tmff_init(struct hid_device *hid);
 int hid_zpff_init(struct hid_device *hid);
 #ifdef CONFIG_HID_PID