blob: 74bb7962e110ac205ef0678618b72b3ec0e2a55e [file] [log] [blame]
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -03001/*
2 * ov534/ov772x gspca driver
3 * Copyright (C) 2008 Antonio Ospite <ospite@studenti.unina.it>
Jim Paris0f7a50b2008-12-10 05:45:14 -03004 * Copyright (C) 2008 Jim Paris <jim@jtan.com>
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -03005 *
6 * Based on a prototype written by Mark Ferrell <majortrips@gmail.com>
7 * USB protocol reverse engineered by Jim Paris <jim@jtan.com>
8 * https://jim.sh/svn/jim/devl/playstation/ps3/eye/test/
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24
25#define MODULE_NAME "ov534"
26
27#include "gspca.h"
28
29#define OV534_REG_ADDRESS 0xf1 /* ? */
30#define OV534_REG_SUBADDR 0xf2
31#define OV534_REG_WRITE 0xf3
32#define OV534_REG_READ 0xf4
33#define OV534_REG_OPERATION 0xf5
34#define OV534_REG_STATUS 0xf6
35
36#define OV534_OP_WRITE_3 0x37
37#define OV534_OP_WRITE_2 0x33
38#define OV534_OP_READ_2 0xf9
39
40#define CTRL_TIMEOUT 500
41
42MODULE_AUTHOR("Antonio Ospite <ospite@studenti.unina.it>");
43MODULE_DESCRIPTION("GSPCA/OV534 USB Camera Driver");
44MODULE_LICENSE("GPL");
45
46/* global parameters */
47static int frame_rate;
48
49/* specific webcam descriptor */
50struct sd {
51 struct gspca_dev gspca_dev; /* !! must be the first item */
Jean-Francois Moine8c252052008-12-04 05:06:08 -030052 __u32 last_fid;
53 __u32 last_pts;
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -030054};
55
56/* V4L2 controls supported by the driver */
57static struct ctrl sd_ctrls[] = {
58};
59
60static struct v4l2_pix_format vga_mode[] = {
61 {640, 480, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE,
62 .bytesperline = 640 * 2,
63 .sizeimage = 640 * 480 * 2,
64 .colorspace = V4L2_COLORSPACE_JPEG,
65 .priv = 0},
66};
67
Antonio Ospite9e1e7b02008-12-03 14:10:01 -030068static void ov534_reg_write(struct usb_device *udev, u16 reg, u8 val)
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -030069{
Antonio Ospite9e1e7b02008-12-03 14:10:01 -030070 u8 data = val;
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -030071 int ret;
72
Antonio Ospite9e1e7b02008-12-03 14:10:01 -030073 PDEBUG(D_USBO, "reg=0x%04x, val=0%02x", reg, val);
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -030074 ret = usb_control_msg(udev,
75 usb_sndctrlpipe(udev, 0),
76 0x1,
77 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
78 0x0, reg, &data, 1, CTRL_TIMEOUT);
79 if (ret < 0)
80 PDEBUG(D_ERR, "write failed");
81}
82
Antonio Ospite9e1e7b02008-12-03 14:10:01 -030083static u8 ov534_reg_read(struct usb_device *udev, u16 reg)
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -030084{
Antonio Ospite9e1e7b02008-12-03 14:10:01 -030085 u8 data;
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -030086 int ret;
87
88 ret = usb_control_msg(udev,
89 usb_rcvctrlpipe(udev, 0),
90 0x1,
91 USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
92 0x0, reg, &data, 1, CTRL_TIMEOUT);
Antonio Ospite9e1e7b02008-12-03 14:10:01 -030093 PDEBUG(D_USBI, "reg=0x%04x, data=0x%02x", reg, data);
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -030094 if (ret < 0)
95 PDEBUG(D_ERR, "read failed");
96 return data;
97}
98
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -030099/* Two bits control LED: 0x21 bit 7 and 0x23 bit 7.
100 * (direction and output)? */
101static void ov534_set_led(struct usb_device *udev, int status)
102{
Antonio Ospite9e1e7b02008-12-03 14:10:01 -0300103 u8 data;
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300104
105 PDEBUG(D_CONF, "led status: %d", status);
106
107 data = ov534_reg_read(udev, 0x21);
108 data |= 0x80;
109 ov534_reg_write(udev, 0x21, data);
110
111 data = ov534_reg_read(udev, 0x23);
112 if (status)
113 data |= 0x80;
114 else
115 data &= ~(0x80);
116
117 ov534_reg_write(udev, 0x23, data);
118}
119
120static int sccb_check_status(struct usb_device *udev)
121{
Antonio Ospite9e1e7b02008-12-03 14:10:01 -0300122 u8 data;
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300123 int i;
124
125 for (i = 0; i < 5; i++) {
126 data = ov534_reg_read(udev, OV534_REG_STATUS);
127
Antonio Ospite9e1e7b02008-12-03 14:10:01 -0300128 switch (data) {
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300129 case 0x00:
130 return 1;
131 case 0x04:
132 return 0;
133 case 0x03:
134 break;
135 default:
136 PDEBUG(D_ERR, "sccb status 0x%02x, attempt %d/5\n",
137 data, i + 1);
138 }
139 }
140 return 0;
141}
142
Antonio Ospite9e1e7b02008-12-03 14:10:01 -0300143static void sccb_reg_write(struct usb_device *udev, u16 reg, u8 val)
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300144{
Antonio Ospite9e1e7b02008-12-03 14:10:01 -0300145 PDEBUG(D_USBO, "reg: 0x%04x, val: 0x%02x", reg, val);
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300146 ov534_reg_write(udev, OV534_REG_SUBADDR, reg);
147 ov534_reg_write(udev, OV534_REG_WRITE, val);
148 ov534_reg_write(udev, OV534_REG_OPERATION, OV534_OP_WRITE_3);
149
150 if (!sccb_check_status(udev))
151 PDEBUG(D_ERR, "sccb_reg_write failed");
152}
153
Jim Paris47dfd212008-12-04 04:28:27 -0300154static const __u8 ov534_reg_initdata[][2] = {
155 { 0xe7, 0x3a },
156
157 { OV534_REG_ADDRESS, 0x42 }, /* select OV772x sensor */
158
159 { 0xc2, 0x0c },
160 { 0x88, 0xf8 },
161 { 0xc3, 0x69 },
162 { 0x89, 0xff },
163 { 0x76, 0x03 },
164 { 0x92, 0x01 },
165 { 0x93, 0x18 },
166 { 0x94, 0x10 },
167 { 0x95, 0x10 },
168 { 0xe2, 0x00 },
169 { 0xe7, 0x3e },
170
Jim Paris47dfd212008-12-04 04:28:27 -0300171 { 0x96, 0x00 },
172
173 { 0x97, 0x20 },
174 { 0x97, 0x20 },
175 { 0x97, 0x20 },
176 { 0x97, 0x0a },
177 { 0x97, 0x3f },
178 { 0x97, 0x4a },
179 { 0x97, 0x20 },
180 { 0x97, 0x15 },
181 { 0x97, 0x0b },
182
183 { 0x8e, 0x40 },
184 { 0x1f, 0x81 },
185 { 0x34, 0x05 },
186 { 0xe3, 0x04 },
187 { 0x88, 0x00 },
188 { 0x89, 0x00 },
189 { 0x76, 0x00 },
190 { 0xe7, 0x2e },
191 { 0x31, 0xf9 },
192 { 0x25, 0x42 },
193 { 0x21, 0xf0 },
194
195 { 0x1c, 0x00 },
196 { 0x1d, 0x40 },
Jim Paris0f7a50b2008-12-10 05:45:14 -0300197 { 0x1d, 0x02 }, /* payload size 0x0200 * 4 = 2048 bytes */
198 { 0x1d, 0x00 }, /* payload size */
Jim Paris5ea9c4d2008-12-04 04:36:14 -0300199 { 0x1d, 0x02 }, /* frame size 0x025800 * 4 = 614400 */
200 { 0x1d, 0x58 }, /* frame size */
201 { 0x1d, 0x00 }, /* frame size */
Jim Paris47dfd212008-12-04 04:28:27 -0300202
203 { 0x8d, 0x1c },
204 { 0x8e, 0x80 },
205 { 0xe5, 0x04 },
206
207 { 0xc0, 0x50 },
208 { 0xc1, 0x3c },
209 { 0xc2, 0x0c },
210};
211
212static const __u8 ov772x_reg_initdata[][2] = {
213 { 0x12, 0x80 },
214 { 0x11, 0x01 },
215
216 { 0x3d, 0x03 },
217 { 0x17, 0x26 },
218 { 0x18, 0xa0 },
219 { 0x19, 0x07 },
220 { 0x1a, 0xf0 },
221 { 0x32, 0x00 },
222 { 0x29, 0xa0 },
223 { 0x2c, 0xf0 },
224 { 0x65, 0x20 },
225 { 0x11, 0x01 },
226 { 0x42, 0x7f },
227 { 0x63, 0xe0 },
228 { 0x64, 0xff },
229 { 0x66, 0x00 },
230 { 0x13, 0xf0 },
231 { 0x0d, 0x41 },
232 { 0x0f, 0xc5 },
233 { 0x14, 0x11 },
234
235 { 0x22, 0x7f },
236 { 0x23, 0x03 },
237 { 0x24, 0x40 },
238 { 0x25, 0x30 },
239 { 0x26, 0xa1 },
240 { 0x2a, 0x00 },
241 { 0x2b, 0x00 },
242 { 0x6b, 0xaa },
243 { 0x13, 0xff },
244
245 { 0x90, 0x05 },
246 { 0x91, 0x01 },
247 { 0x92, 0x03 },
248 { 0x93, 0x00 },
249 { 0x94, 0x60 },
250 { 0x95, 0x3c },
251 { 0x96, 0x24 },
252 { 0x97, 0x1e },
253 { 0x98, 0x62 },
254 { 0x99, 0x80 },
255 { 0x9a, 0x1e },
256 { 0x9b, 0x08 },
257 { 0x9c, 0x20 },
258 { 0x9e, 0x81 },
259
260 { 0xa6, 0x04 },
261 { 0x7e, 0x0c },
262 { 0x7f, 0x16 },
263 { 0x80, 0x2a },
264 { 0x81, 0x4e },
265 { 0x82, 0x61 },
266 { 0x83, 0x6f },
267 { 0x84, 0x7b },
268 { 0x85, 0x86 },
269 { 0x86, 0x8e },
270 { 0x87, 0x97 },
271 { 0x88, 0xa4 },
272 { 0x89, 0xaf },
273 { 0x8a, 0xc5 },
274 { 0x8b, 0xd7 },
275 { 0x8c, 0xe8 },
276 { 0x8d, 0x20 },
277
278 { 0x0c, 0x90 },
279
280 { 0x2b, 0x00 },
281 { 0x22, 0x7f },
282 { 0x23, 0x03 },
283 { 0x11, 0x01 },
284 { 0x0c, 0xd0 },
285 { 0x64, 0xff },
286 { 0x0d, 0x41 },
287
288 { 0x14, 0x41 },
289 { 0x0e, 0xcd },
290 { 0xac, 0xbf },
291 { 0x8e, 0x00 },
292 { 0x0c, 0xd0 }
293};
294
295
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300296/* setup method */
297static void ov534_setup(struct usb_device *udev)
298{
Jim Paris47dfd212008-12-04 04:28:27 -0300299 int i;
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300300
Jim Paris47dfd212008-12-04 04:28:27 -0300301 /* Initialize bridge chip */
302 for (i = 0; i < ARRAY_SIZE(ov534_reg_initdata); i++)
303 ov534_reg_write(udev, ov534_reg_initdata[i][0],
304 ov534_reg_initdata[i][1]);
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300305
306 ov534_set_led(udev, 1);
307
Jim Paris47dfd212008-12-04 04:28:27 -0300308 /* Initialize sensor */
309 for (i = 0; i < ARRAY_SIZE(ov772x_reg_initdata); i++)
310 sccb_reg_write(udev, ov772x_reg_initdata[i][0],
311 ov772x_reg_initdata[i][1]);
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300312
313 ov534_reg_write(udev, 0xe0, 0x09);
314 ov534_set_led(udev, 0);
315}
316
317/* this function is called at probe time */
318static int sd_config(struct gspca_dev *gspca_dev,
319 const struct usb_device_id *id)
320{
321 struct cam *cam;
322
323 cam = &gspca_dev->cam;
324
325 cam->epaddr = 0x01;
326 cam->cam_mode = vga_mode;
327 cam->nmodes = ARRAY_SIZE(vga_mode);
328
Jim Paris0f7a50b2008-12-10 05:45:14 -0300329 cam->bulk_size = 16384;
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300330 cam->bulk_nurbs = 2;
331
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300332 return 0;
333}
334
335/* this function is called at probe and resume time */
336static int sd_init(struct gspca_dev *gspca_dev)
337{
Antonio Ospite3adba442008-12-03 14:01:54 -0300338 int fr;
339
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300340 ov534_setup(gspca_dev->dev);
341
Antonio Ospite3adba442008-12-03 14:01:54 -0300342 fr = frame_rate;
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300343
Antonio Ospite3adba442008-12-03 14:01:54 -0300344 switch (fr) {
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300345 case 50:
346 sccb_reg_write(gspca_dev->dev, 0x11, 0x01);
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300347 sccb_reg_write(gspca_dev->dev, 0x0d, 0x41);
Jim Paris47dfd212008-12-04 04:28:27 -0300348 ov534_reg_write(gspca_dev->dev, 0xe5, 0x02);
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300349 break;
350 case 40:
351 sccb_reg_write(gspca_dev->dev, 0x11, 0x02);
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300352 sccb_reg_write(gspca_dev->dev, 0x0d, 0xc1);
Jim Paris47dfd212008-12-04 04:28:27 -0300353 ov534_reg_write(gspca_dev->dev, 0xe5, 0x04);
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300354 break;
Antonio Ospite3adba442008-12-03 14:01:54 -0300355/* case 30: */
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300356 default:
Antonio Ospite3adba442008-12-03 14:01:54 -0300357 fr = 30;
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300358 sccb_reg_write(gspca_dev->dev, 0x11, 0x04);
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300359 sccb_reg_write(gspca_dev->dev, 0x0d, 0x81);
Jim Paris47dfd212008-12-04 04:28:27 -0300360 ov534_reg_write(gspca_dev->dev, 0xe5, 0x02);
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300361 break;
362 case 15:
363 sccb_reg_write(gspca_dev->dev, 0x11, 0x03);
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300364 sccb_reg_write(gspca_dev->dev, 0x0d, 0x41);
Jim Paris47dfd212008-12-04 04:28:27 -0300365 ov534_reg_write(gspca_dev->dev, 0xe5, 0x04);
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300366 break;
Antonio Ospite3adba442008-12-03 14:01:54 -0300367 }
368
369 PDEBUG(D_PROBE, "frame_rate: %d", fr);
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300370
371 return 0;
372}
373
374static int sd_start(struct gspca_dev *gspca_dev)
375{
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300376 /* start streaming data */
377 ov534_set_led(gspca_dev->dev, 1);
378 ov534_reg_write(gspca_dev->dev, 0xe0, 0x00);
379
380 return 0;
381}
382
383static void sd_stopN(struct gspca_dev *gspca_dev)
384{
385 /* stop streaming data */
386 ov534_reg_write(gspca_dev->dev, 0xe0, 0x09);
387 ov534_set_led(gspca_dev->dev, 0);
388}
389
Jim Parisfb139222008-12-04 04:52:40 -0300390/* Values for bmHeaderInfo (Video and Still Image Payload Headers, 2.4.3.3) */
391#define UVC_STREAM_EOH (1 << 7)
392#define UVC_STREAM_ERR (1 << 6)
393#define UVC_STREAM_STI (1 << 5)
394#define UVC_STREAM_RES (1 << 4)
395#define UVC_STREAM_SCR (1 << 3)
396#define UVC_STREAM_PTS (1 << 2)
397#define UVC_STREAM_EOF (1 << 1)
398#define UVC_STREAM_FID (1 << 0)
399
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300400static void sd_pkt_scan(struct gspca_dev *gspca_dev, struct gspca_frame *frame,
401 __u8 *data, int len)
402{
Jean-Francois Moine8c252052008-12-04 05:06:08 -0300403 struct sd *sd = (struct sd *) gspca_dev;
Jim Parisfb139222008-12-04 04:52:40 -0300404 __u32 this_pts;
Jim Parisfb139222008-12-04 04:52:40 -0300405 int this_fid;
Jim Paris0f7a50b2008-12-10 05:45:14 -0300406 int remaining_len = len;
407 __u8 *next_data = data;
408
409scan_next:
410 if (remaining_len <= 0)
411 return;
412
413 data = next_data;
414 len = min(remaining_len, 2048);
415 remaining_len -= len;
416 next_data += len;
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300417
Jim Parisfb139222008-12-04 04:52:40 -0300418 /* Payloads are prefixed with a the UVC-style header. We
419 consider a frame to start when the FID toggles, or the PTS
420 changes. A frame ends when EOF is set, and we've received
421 the correct number of bytes. */
422
423 /* Verify UVC header. Header length is always 12 */
424 if (data[0] != 12 || len < 12) {
425 PDEBUG(D_PACK, "bad header");
426 goto discard;
427 }
428
429 /* Check errors */
430 if (data[1] & UVC_STREAM_ERR) {
431 PDEBUG(D_PACK, "payload error");
432 goto discard;
433 }
434
435 /* Extract PTS and FID */
436 if (!(data[1] & UVC_STREAM_PTS)) {
437 PDEBUG(D_PACK, "PTS not present");
438 goto discard;
439 }
440 this_pts = (data[5] << 24) | (data[4] << 16) | (data[3] << 8) | data[2];
441 this_fid = (data[1] & UVC_STREAM_FID) ? 1 : 0;
442
443 /* If PTS or FID has changed, start a new frame. */
Jean-Francois Moine8c252052008-12-04 05:06:08 -0300444 if (this_pts != sd->last_pts || this_fid != sd->last_fid) {
Jim Parisfb139222008-12-04 04:52:40 -0300445 gspca_frame_add(gspca_dev, FIRST_PACKET, frame, NULL, 0);
Jean-Francois Moine8c252052008-12-04 05:06:08 -0300446 sd->last_pts = this_pts;
447 sd->last_fid = this_fid;
Jim Parisfb139222008-12-04 04:52:40 -0300448 }
449
450 /* Add the data from this payload */
451 gspca_frame_add(gspca_dev, INTER_PACKET, frame,
452 data + 12, len - 12);
453
454 /* If this packet is marked as EOF, end the frame */
455 if (data[1] & UVC_STREAM_EOF) {
Jean-Francois Moine8c252052008-12-04 05:06:08 -0300456 sd->last_pts = 0;
Jim Parisfb139222008-12-04 04:52:40 -0300457
458 if ((frame->data_end - frame->data) !=
459 (gspca_dev->width * gspca_dev->height * 2)) {
460 PDEBUG(D_PACK, "short frame");
461 goto discard;
462 }
463
464 gspca_frame_add(gspca_dev, LAST_PACKET, frame, NULL, 0);
465 }
466
Jim Paris0f7a50b2008-12-10 05:45:14 -0300467 /* Done this payload */
468 goto scan_next;
Jim Parisfb139222008-12-04 04:52:40 -0300469
470discard:
471 /* Discard data until a new frame starts. */
472 gspca_frame_add(gspca_dev, DISCARD_PACKET, frame, NULL, 0);
Jim Paris0f7a50b2008-12-10 05:45:14 -0300473 goto scan_next;
Antonio Ospitefbb4c6d2008-11-22 05:23:39 -0300474}
475
476/* sub-driver description */
477static const struct sd_desc sd_desc = {
478 .name = MODULE_NAME,
479 .ctrls = sd_ctrls,
480 .nctrls = ARRAY_SIZE(sd_ctrls),
481 .config = sd_config,
482 .init = sd_init,
483 .start = sd_start,
484 .stopN = sd_stopN,
485 .pkt_scan = sd_pkt_scan,
486};
487
488/* -- module initialisation -- */
489static const __devinitdata struct usb_device_id device_table[] = {
490 {USB_DEVICE(0x06f8, 0x3002)}, /* Hercules Blog Webcam */
491 {USB_DEVICE(0x06f8, 0x3003)}, /* Hercules Dualpix HD Weblog */
492 {USB_DEVICE(0x1415, 0x2000)}, /* Sony HD Eye for PS3 (SLEH 00201) */
493 {}
494};
495
496MODULE_DEVICE_TABLE(usb, device_table);
497
498/* -- device connect -- */
499static int sd_probe(struct usb_interface *intf, const struct usb_device_id *id)
500{
501 return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
502 THIS_MODULE);
503}
504
505static struct usb_driver sd_driver = {
506 .name = MODULE_NAME,
507 .id_table = device_table,
508 .probe = sd_probe,
509 .disconnect = gspca_disconnect,
510#ifdef CONFIG_PM
511 .suspend = gspca_suspend,
512 .resume = gspca_resume,
513#endif
514};
515
516/* -- module insert / remove -- */
517static int __init sd_mod_init(void)
518{
519 if (usb_register(&sd_driver) < 0)
520 return -1;
521 PDEBUG(D_PROBE, "registered");
522 return 0;
523}
524
525static void __exit sd_mod_exit(void)
526{
527 usb_deregister(&sd_driver);
528 PDEBUG(D_PROBE, "deregistered");
529}
530
531module_init(sd_mod_init);
532module_exit(sd_mod_exit);
533
534module_param(frame_rate, int, 0644);
535MODULE_PARM_DESC(frame_rate, "Frame rate (15, 30, 40, 50)");