aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/usbhid/usbhid.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/usbhid/usbhid.h')
-rw-r--r--drivers/hid/usbhid/usbhid.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/hid/usbhid/usbhid.h b/drivers/hid/usbhid/usbhid.h
index 9eb30564be9c..08f505ca2e3d 100644
--- a/drivers/hid/usbhid/usbhid.h
+++ b/drivers/hid/usbhid/usbhid.h
@@ -38,7 +38,10 @@ int usbhid_wait_io(struct hid_device* hid);
38void usbhid_close(struct hid_device *hid); 38void usbhid_close(struct hid_device *hid);
39int usbhid_open(struct hid_device *hid); 39int usbhid_open(struct hid_device *hid);
40void usbhid_init_reports(struct hid_device *hid); 40void usbhid_init_reports(struct hid_device *hid);
41void usbhid_submit_report(struct hid_device *hid, struct hid_report *report, unsigned char dir); 41void usbhid_submit_report
42(struct hid_device *hid, struct hid_report *report, unsigned char dir);
43int usbhid_get_power(struct hid_device *hid);
44void usbhid_put_power(struct hid_device *hid);
42 45
43/* iofl flags */ 46/* iofl flags */
44#define HID_CTRL_RUNNING 1 47#define HID_CTRL_RUNNING 1
@@ -49,6 +52,9 @@ void usbhid_submit_report(struct hid_device *hid, struct hid_report *report, uns
49#define HID_CLEAR_HALT 6 52#define HID_CLEAR_HALT 6
50#define HID_DISCONNECTED 7 53#define HID_DISCONNECTED 7
51#define HID_STARTED 8 54#define HID_STARTED 8
55#define HID_REPORTED_IDLE 9
56#define HID_KEYS_PRESSED 10
57#define HID_LED_ON 11
52 58
53/* 59/*
54 * USB-specific HID struct, to be pointed to 60 * USB-specific HID struct, to be pointed to
@@ -66,7 +72,6 @@ struct usbhid_device {
66 struct urb *urbin; /* Input URB */ 72 struct urb *urbin; /* Input URB */
67 char *inbuf; /* Input buffer */ 73 char *inbuf; /* Input buffer */
68 dma_addr_t inbuf_dma; /* Input buffer dma */ 74 dma_addr_t inbuf_dma; /* Input buffer dma */
69 spinlock_t inlock; /* Input fifo spinlock */
70 75
71 struct urb *urbctrl; /* Control URB */ 76 struct urb *urbctrl; /* Control URB */
72 struct usb_ctrlrequest *cr; /* Control request struct */ 77 struct usb_ctrlrequest *cr; /* Control request struct */
@@ -75,21 +80,22 @@ struct usbhid_device {
75 unsigned char ctrlhead, ctrltail; /* Control fifo head & tail */ 80 unsigned char ctrlhead, ctrltail; /* Control fifo head & tail */
76 char *ctrlbuf; /* Control buffer */ 81 char *ctrlbuf; /* Control buffer */
77 dma_addr_t ctrlbuf_dma; /* Control buffer dma */ 82 dma_addr_t ctrlbuf_dma; /* Control buffer dma */
78 spinlock_t ctrllock; /* Control fifo spinlock */
79 83
80 struct urb *urbout; /* Output URB */ 84 struct urb *urbout; /* Output URB */
81 struct hid_output_fifo out[HID_CONTROL_FIFO_SIZE]; /* Output pipe fifo */ 85 struct hid_output_fifo out[HID_CONTROL_FIFO_SIZE]; /* Output pipe fifo */
82 unsigned char outhead, outtail; /* Output pipe fifo head & tail */ 86 unsigned char outhead, outtail; /* Output pipe fifo head & tail */
83 char *outbuf; /* Output buffer */ 87 char *outbuf; /* Output buffer */
84 dma_addr_t outbuf_dma; /* Output buffer dma */ 88 dma_addr_t outbuf_dma; /* Output buffer dma */
85 spinlock_t outlock; /* Output fifo spinlock */
86 89
90 spinlock_t lock; /* fifo spinlock */
87 unsigned long iofl; /* I/O flags (CTRL_RUNNING, OUT_RUNNING) */ 91 unsigned long iofl; /* I/O flags (CTRL_RUNNING, OUT_RUNNING) */
88 struct timer_list io_retry; /* Retry timer */ 92 struct timer_list io_retry; /* Retry timer */
89 unsigned long stop_retry; /* Time to give up, in jiffies */ 93 unsigned long stop_retry; /* Time to give up, in jiffies */
90 unsigned int retry_delay; /* Delay length in ms */ 94 unsigned int retry_delay; /* Delay length in ms */
91 struct work_struct reset_work; /* Task context for resets */ 95 struct work_struct reset_work; /* Task context for resets */
96 struct work_struct restart_work; /* waking up for output to be done in a task */
92 wait_queue_head_t wait; /* For sleeping */ 97 wait_queue_head_t wait; /* For sleeping */
98 int ledcount; /* counting the number of active leds */
93}; 99};
94 100
95#define hid_to_usb_dev(hid_dev) \ 101#define hid_to_usb_dev(hid_dev) \