aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class/cdc-acm.h
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2008-06-20 05:25:57 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-21 18:16:36 -0400
commit11ea859d64b69a747d6b060b9ed1520eab1161fe (patch)
tree3b2de5ad788d145101762876e12c78c5b6383f93 /drivers/usb/class/cdc-acm.h
parent188d63602756bfd4aa1fb61d531dbd59bddac962 (diff)
USB: additional power savings for cdc-acm devices that support remote wakeup
this patch saves power for cdc-acm devices that support remote wakeup while the device is connected. - request needs_remote_wakeup when needed - delayed write while a device is autoresumed - the device is marked busy when appropriate Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/class/cdc-acm.h')
-rw-r--r--drivers/usb/class/cdc-acm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
index 046e064b033a..85c3aaaab7c5 100644
--- a/drivers/usb/class/cdc-acm.h
+++ b/drivers/usb/class/cdc-acm.h
@@ -107,10 +107,14 @@ struct acm {
107 struct list_head filled_read_bufs; 107 struct list_head filled_read_bufs;
108 int write_used; /* number of non-empty write buffers */ 108 int write_used; /* number of non-empty write buffers */
109 int write_ready; /* write urb is not running */ 109 int write_ready; /* write urb is not running */
110 int old_ready;
111 int processing;
112 int transmitting;
110 spinlock_t write_lock; 113 spinlock_t write_lock;
111 struct mutex mutex; 114 struct mutex mutex;
112 struct usb_cdc_line_coding line; /* bits, stop, parity */ 115 struct usb_cdc_line_coding line; /* bits, stop, parity */
113 struct work_struct work; /* work queue entry for line discipline waking up */ 116 struct work_struct work; /* work queue entry for line discipline waking up */
117 struct work_struct waker;
114 struct tasklet_struct urb_task; /* rx processing */ 118 struct tasklet_struct urb_task; /* rx processing */
115 spinlock_t throttle_lock; /* synchronize throtteling and read callback */ 119 spinlock_t throttle_lock; /* synchronize throtteling and read callback */
116 unsigned int ctrlin; /* input control lines (DCD, DSR, RI, break, overruns) */ 120 unsigned int ctrlin; /* input control lines (DCD, DSR, RI, break, overruns) */
@@ -123,6 +127,7 @@ struct acm {
123 unsigned char clocal; /* termios CLOCAL */ 127 unsigned char clocal; /* termios CLOCAL */
124 unsigned int ctrl_caps; /* control capabilities from the class specific header */ 128 unsigned int ctrl_caps; /* control capabilities from the class specific header */
125 unsigned int susp_count; /* number of suspended interfaces */ 129 unsigned int susp_count; /* number of suspended interfaces */
130 struct acm_wb *delayed_wb; /* write queued for a device about to be woken */
126}; 131};
127 132
128#define CDC_DATA_INTERFACE_TYPE 0x0a 133#define CDC_DATA_INTERFACE_TYPE 0x0a