aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/gspca.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/gspca/gspca.h')
-rw-r--r--drivers/media/video/gspca/gspca.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/media/video/gspca/gspca.h b/drivers/media/video/gspca/gspca.h
index 67e448940eaa..c17625cff9ba 100644
--- a/drivers/media/video/gspca/gspca.h
+++ b/drivers/media/video/gspca/gspca.h
@@ -56,7 +56,6 @@ extern int gspca_debug;
56 56
57/* device information - set at probe time */ 57/* device information - set at probe time */
58struct cam { 58struct cam {
59 char *dev_name;
60 struct v4l2_pix_format *cam_mode; /* size nmodes */ 59 struct v4l2_pix_format *cam_mode; /* size nmodes */
61 char nmodes; 60 char nmodes;
62 __u8 epaddr; 61 __u8 epaddr;
@@ -91,15 +90,14 @@ struct sd_desc {
91/* controls */ 90/* controls */
92 const struct ctrl *ctrls; 91 const struct ctrl *ctrls;
93 int nctrls; 92 int nctrls;
94/* operations */ 93/* mandatory operations */
95 cam_cf_op config; /* called on probe */ 94 cam_cf_op config; /* called on probe */
96 cam_op open; /* called on open */ 95 cam_op init; /* called on probe and resume */
97 cam_v_op start; /* called on stream on */ 96 cam_v_op start; /* called on stream on */
98 cam_v_op stopN; /* called on stream off - main alt */
99 cam_v_op stop0; /* called on stream off - alt 0 */
100 cam_v_op close; /* called on close */
101 cam_pkt_op pkt_scan; 97 cam_pkt_op pkt_scan;
102/* optional operations */ 98/* optional operations */
99 cam_v_op stopN; /* called on stream off - main alt */
100 cam_v_op stop0; /* called on stream off - alt 0 */
103 cam_v_op dq_callback; /* called when a frame has been dequeued */ 101 cam_v_op dq_callback; /* called when a frame has been dequeued */
104 cam_jpg_op get_jcomp; 102 cam_jpg_op get_jcomp;
105 cam_jpg_op set_jcomp; 103 cam_jpg_op set_jcomp;
@@ -127,8 +125,10 @@ struct gspca_dev {
127 125
128 struct cam cam; /* device information */ 126 struct cam cam; /* device information */
129 const struct sd_desc *sd_desc; /* subdriver description */ 127 const struct sd_desc *sd_desc; /* subdriver description */
128 unsigned ctrl_dis; /* disabled controls (bit map) */
130 129
131 __u8 usb_buf[8]; /* buffer for USB exchanges */ 130#define USB_BUF_SZ 64
131 __u8 *usb_buf; /* buffer for USB exchanges */
132 struct urb *urb[MAX_NURBS]; 132 struct urb *urb[MAX_NURBS];
133 133
134 __u8 *frbuf; /* buffer for nframes */ 134 __u8 *frbuf; /* buffer for nframes */
@@ -155,6 +155,9 @@ struct gspca_dev {
155 struct mutex queue_lock; /* ISOC queue protection */ 155 struct mutex queue_lock; /* ISOC queue protection */
156 __u32 sequence; /* frame sequence number */ 156 __u32 sequence; /* frame sequence number */
157 char streaming; 157 char streaming;
158#ifdef CONFIG_PM
159 char frozen; /* suspend - resume */
160#endif
158 char users; /* number of opens */ 161 char users; /* number of opens */
159 char present; /* device connected */ 162 char present; /* device connected */
160 char nbufread; /* number of buffers for read() */ 163 char nbufread; /* number of buffers for read() */
@@ -174,6 +177,10 @@ struct gspca_frame *gspca_frame_add(struct gspca_dev *gspca_dev,
174 struct gspca_frame *frame, 177 struct gspca_frame *frame,
175 const __u8 *data, 178 const __u8 *data,
176 int len); 179 int len);
180#ifdef CONFIG_PM
181int gspca_suspend(struct usb_interface *intf, pm_message_t message);
182int gspca_resume(struct usb_interface *intf);
183#endif
177int gspca_auto_gain_n_exposure(struct gspca_dev *gspca_dev, int avg_lum, 184int gspca_auto_gain_n_exposure(struct gspca_dev *gspca_dev, int avg_lum,
178 int desired_avg_lum, int deadzone, int gain_knee, int exposure_knee); 185 int desired_avg_lum, int deadzone, int gain_knee, int exposure_knee);
179#endif /* GSPCAV2_H */ 186#endif /* GSPCAV2_H */