blob: 477441e22bab78a42ea15e3bf30f0586667621ec [file] [log] [blame]
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -03001/*
2 * Mars-Semi MR97311A library
3 * Copyright (C) 2005 <bradlch@hotmail.com>
4 *
5 * V4L2 by Jean-Francois Moine <http://moinejf.free.fr>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#define MODULE_NAME "mars"
23
24#include "gspca.h"
25#include "jpeg.h"
26
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -030027MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>");
28MODULE_DESCRIPTION("GSPCA/Mars USB Camera Driver");
29MODULE_LICENSE("GPL");
30
31/* specific webcam descriptor */
32struct sd {
33 struct gspca_dev gspca_dev; /* !! must be the first item */
34
35 char qindex;
36};
37
38/* V4L2 controls supported by the driver */
39static struct ctrl sd_ctrls[] = {
40};
41
Jean-Francois Moinecc611b82008-12-29 07:49:41 -030042static const struct v4l2_pix_format vga_mode[] = {
Jean-Francois Moinec2446b32008-07-05 11:49:20 -030043 {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
44 .bytesperline = 320,
45 .sizeimage = 320 * 240 * 3 / 8 + 589,
46 .colorspace = V4L2_COLORSPACE_JPEG,
47 .priv = 2},
48 {640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
49 .bytesperline = 640,
50 .sizeimage = 640 * 480 * 3 / 8 + 590,
51 .colorspace = V4L2_COLORSPACE_JPEG,
52 .priv = 1},
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -030053};
54
55/* MI Register table //elvis */
56enum {
57 REG_HW_MI_0,
58 REG_HW_MI_1,
59 REG_HW_MI_2,
60 REG_HW_MI_3,
61 REG_HW_MI_4,
62 REG_HW_MI_5,
63 REG_HW_MI_6,
64 REG_HW_MI_7,
65 REG_HW_MI_9 = 0x09,
66 REG_HW_MI_B = 0x0B,
67 REG_HW_MI_C,
68 REG_HW_MI_D,
69 REG_HW_MI_1E = 0x1E,
70 REG_HW_MI_20 = 0x20,
71 REG_HW_MI_2B = 0x2B,
72 REG_HW_MI_2C,
73 REG_HW_MI_2D,
74 REG_HW_MI_2E,
75 REG_HW_MI_35 = 0x35,
76 REG_HW_MI_5F = 0x5f,
77 REG_HW_MI_60,
78 REG_HW_MI_61,
79 REG_HW_MI_62,
80 REG_HW_MI_63,
81 REG_HW_MI_64,
82 REG_HW_MI_F1 = 0xf1,
Jean-Francois Moine739570b2008-07-14 09:38:29 -030083 ATTR_TOTAL_MI_REG = 0xf2
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -030084};
85
Jean-Francois Moine739570b2008-07-14 09:38:29 -030086/* the bytes to write are in gspca_dev->usb_buf */
87static int reg_w(struct gspca_dev *gspca_dev,
88 __u16 index, int len)
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -030089{
90 int rc;
91
Jean-Francois Moine739570b2008-07-14 09:38:29 -030092 rc = usb_control_msg(gspca_dev->dev,
93 usb_sndbulkpipe(gspca_dev->dev, 4),
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -030094 0x12,
Jean-Francois Moine739570b2008-07-14 09:38:29 -030095 0xc8, /* ?? */
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -030096 0, /* value */
Jean-Francois Moine739570b2008-07-14 09:38:29 -030097 index, gspca_dev->usb_buf, len, 500);
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -030098 if (rc < 0)
Jean-Francois Moinebf7f0b92008-07-03 11:09:12 -030099 PDEBUG(D_ERR, "reg write [%02x] error %d", index, rc);
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300100 return rc;
101}
102
Jean-Francois Moine739570b2008-07-14 09:38:29 -0300103static void bulk_w(struct gspca_dev *gspca_dev,
104 __u16 *pch,
105 __u16 Address)
106{
107 gspca_dev->usb_buf[0] = 0x1f;
108 gspca_dev->usb_buf[1] = 0; /* control byte */
109 gspca_dev->usb_buf[2] = Address;
110 gspca_dev->usb_buf[3] = *pch >> 8; /* high byte */
111 gspca_dev->usb_buf[4] = *pch; /* low byte */
112
113 reg_w(gspca_dev, Address, 5);
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300114}
115
116/* this function is called at probe time */
117static int sd_config(struct gspca_dev *gspca_dev,
118 const struct usb_device_id *id)
119{
120 struct sd *sd = (struct sd *) gspca_dev;
121 struct cam *cam;
122
123 cam = &gspca_dev->cam;
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300124 cam->cam_mode = vga_mode;
Julia Lawall80297122008-11-12 23:18:21 -0300125 cam->nmodes = ARRAY_SIZE(vga_mode);
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300126 sd->qindex = 1; /* set the quantization table */
127 return 0;
128}
129
Jean-Francois Moine012d6b02008-09-03 17:12:16 -0300130/* this function is called at probe and resume time */
131static int sd_init(struct gspca_dev *gspca_dev)
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300132{
133 return 0;
134}
135
Jean-Francois Moine72ab97c2008-09-20 06:39:08 -0300136static int sd_start(struct gspca_dev *gspca_dev)
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300137{
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300138 int err_code;
Jean-Francois Moine739570b2008-07-14 09:38:29 -0300139 __u8 *data;
140 __u16 *MI_buf;
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300141 int h_size, v_size;
142 int intpipe;
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300143
144 PDEBUG(D_STREAM, "camera start, iface %d, alt 8", gspca_dev->iface);
Jean-Francois Moine72ab97c2008-09-20 06:39:08 -0300145 err_code = usb_set_interface(gspca_dev->dev, gspca_dev->iface, 8);
146 if (err_code < 0) {
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300147 PDEBUG(D_ERR|D_STREAM, "Set packet size: set interface error");
Jean-Francois Moine72ab97c2008-09-20 06:39:08 -0300148 return err_code;
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300149 }
150
Jean-Francois Moine739570b2008-07-14 09:38:29 -0300151 data = gspca_dev->usb_buf;
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300152 data[0] = 0x01; /* address */
153 data[1] = 0x01;
154
Jean-Francois Moine739570b2008-07-14 09:38:29 -0300155 err_code = reg_w(gspca_dev, data[0], 2);
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300156 if (err_code < 0)
Jean-Francois Moine72ab97c2008-09-20 06:39:08 -0300157 return err_code;
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300158
159 /*
160 Initialize the MR97113 chip register
161 */
162 data[0] = 0x00; /* address */
163 data[1] = 0x0c | 0x01; /* reg 0 */
164 data[2] = 0x01; /* reg 1 */
165 h_size = gspca_dev->width;
166 v_size = gspca_dev->height;
167 data[3] = h_size / 8; /* h_size , reg 2 */
168 data[4] = v_size / 8; /* v_size , reg 3 */
169 data[5] = 0x30; /* reg 4, MI, PAS5101 :
170 * 0x30 for 24mhz , 0x28 for 12mhz */
171 data[6] = 4; /* reg 5, H start */
172 data[7] = 0xc0; /* reg 6, gamma 1.5 */
173 data[8] = 3; /* reg 7, V start */
Jean-Francois Moine739570b2008-07-14 09:38:29 -0300174/* if (h_size == 320 ) */
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300175/* data[9]= 0x56; * reg 8, 24MHz, 2:1 scale down */
176/* else */
177 data[9] = 0x52; /* reg 8, 24MHz, no scale down */
178 data[10] = 0x5d; /* reg 9, I2C device address
179 * [for PAS5101 (0x40)] [for MI (0x5d)] */
180
Jean-Francois Moine8295d992008-09-03 17:12:19 -0300181 err_code = reg_w(gspca_dev, data[0], 11);
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300182 if (err_code < 0)
Jean-Francois Moine72ab97c2008-09-20 06:39:08 -0300183 return err_code;
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300184
185 data[0] = 0x23; /* address */
186 data[1] = 0x09; /* reg 35, append frame header */
187
Jean-Francois Moine739570b2008-07-14 09:38:29 -0300188 err_code = reg_w(gspca_dev, data[0], 2);
189 if (err_code < 0)
Jean-Francois Moine72ab97c2008-09-20 06:39:08 -0300190 return err_code;
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300191
Jean-Francois Moine739570b2008-07-14 09:38:29 -0300192 data[0] = 0x3c; /* address */
193/* if (gspca_dev->width == 1280) */
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300194/* data[1] = 200; * reg 60, pc-cam frame size
195 * (unit: 4KB) 800KB */
196/* else */
197 data[1] = 50; /* 50 reg 60, pc-cam frame size
198 * (unit: 4KB) 200KB */
Jean-Francois Moine739570b2008-07-14 09:38:29 -0300199 err_code = reg_w(gspca_dev, data[0], 2);
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300200 if (err_code < 0)
Jean-Francois Moine72ab97c2008-09-20 06:39:08 -0300201 return err_code;
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300202
203 if (0) { /* fixed dark-gain */
204 data[1] = 0; /* reg 94, Y Gain (1.75) */
205 data[2] = 0; /* reg 95, UV Gain (1.75) */
Jean-Francois Moine956e42d2008-07-01 10:03:42 -0300206 data[3] = 0x3f; /* reg 96, Y Gain/UV Gain/disable
207 * auto dark-gain */
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300208 data[4] = 0; /* reg 97, set fixed dark level */
209 data[5] = 0; /* reg 98, don't care */
210 } else { /* auto dark-gain */
211 data[1] = 0; /* reg 94, Y Gain (auto) */
212 data[2] = 0; /* reg 95, UV Gain (1.75) */
Jean-Francois Moine956e42d2008-07-01 10:03:42 -0300213 data[3] = 0x78; /* reg 96, Y Gain/UV Gain/disable
214 * auto dark-gain */
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300215 switch (gspca_dev->width) {
216/* case 1280: */
217/* data[4] = 154;
218 * reg 97, %3 shadow point (unit: 256 pixel) */
219/* data[5] = 51;
220 * reg 98, %1 highlight point
221 * (uint: 256 pixel) */
222/* break; */
223 default:
224/* case 640: */
225 data[4] = 36; /* reg 97, %3 shadow point
226 * (unit: 256 pixel) */
227 data[5] = 12; /* reg 98, %1 highlight point
228 * (uint: 256 pixel) */
229 break;
230 case 320:
231 data[4] = 9; /* reg 97, %3 shadow point
232 * (unit: 256 pixel) */
233 data[5] = 3; /* reg 98, %1 highlight point
234 * (uint: 256 pixel) */
235 break;
236 }
237 }
238 /* auto dark-gain */
239 data[0] = 0x5e; /* address */
240
Jean-Francois Moine739570b2008-07-14 09:38:29 -0300241 err_code = reg_w(gspca_dev, data[0], 6);
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300242 if (err_code < 0)
Jean-Francois Moine72ab97c2008-09-20 06:39:08 -0300243 return err_code;
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300244
245 data[0] = 0x67;
246 data[1] = 0x13; /* reg 103, first pixel B, disable sharpness */
Jean-Francois Moine739570b2008-07-14 09:38:29 -0300247 err_code = reg_w(gspca_dev, data[0], 2);
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300248 if (err_code < 0)
Jean-Francois Moine72ab97c2008-09-20 06:39:08 -0300249 return err_code;
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300250
251 /*
252 * initialize the value of MI sensor...
253 */
Jean-Francois Moine739570b2008-07-14 09:38:29 -0300254 MI_buf = kzalloc(ATTR_TOTAL_MI_REG * sizeof *MI_buf, GFP_KERNEL);
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300255 MI_buf[REG_HW_MI_1] = 0x000a;
256 MI_buf[REG_HW_MI_2] = 0x000c;
257 MI_buf[REG_HW_MI_3] = 0x0405;
258 MI_buf[REG_HW_MI_4] = 0x0507;
259 /* mi_Attr_Reg_[REG_HW_MI_5] = 0x01ff;//13 */
260 MI_buf[REG_HW_MI_5] = 0x0013; /* 13 */
261 MI_buf[REG_HW_MI_6] = 0x001f; /* vertical blanking */
262 /* mi_Attr_Reg_[REG_HW_MI_6] = 0x0400; // vertical blanking */
263 MI_buf[REG_HW_MI_7] = 0x0002;
264 /* mi_Attr_Reg_[REG_HW_MI_9] = 0x015f; */
265 /* mi_Attr_Reg_[REG_HW_MI_9] = 0x030f; */
266 MI_buf[REG_HW_MI_9] = 0x0374;
267 MI_buf[REG_HW_MI_B] = 0x0000;
268 MI_buf[REG_HW_MI_C] = 0x0000;
269 MI_buf[REG_HW_MI_D] = 0x0000;
270 MI_buf[REG_HW_MI_1E] = 0x8000;
271/* mi_Attr_Reg_[REG_HW_MI_20] = 0x1104; */
272 MI_buf[REG_HW_MI_20] = 0x1104; /* 0x111c; */
273 MI_buf[REG_HW_MI_2B] = 0x0008;
274/* mi_Attr_Reg_[REG_HW_MI_2C] = 0x000f; */
275 MI_buf[REG_HW_MI_2C] = 0x001f; /* lita suggest */
276 MI_buf[REG_HW_MI_2D] = 0x0008;
277 MI_buf[REG_HW_MI_2E] = 0x0008;
278 MI_buf[REG_HW_MI_35] = 0x0051;
279 MI_buf[REG_HW_MI_5F] = 0x0904; /* fail to write */
280 MI_buf[REG_HW_MI_60] = 0x0000;
281 MI_buf[REG_HW_MI_61] = 0x0000;
282 MI_buf[REG_HW_MI_62] = 0x0498;
283 MI_buf[REG_HW_MI_63] = 0x0000;
284 MI_buf[REG_HW_MI_64] = 0x0000;
285 MI_buf[REG_HW_MI_F1] = 0x0001;
286 /* changing while setting up the different value of dx/dy */
287
288 if (gspca_dev->width != 1280) {
289 MI_buf[0x01] = 0x010a;
290 MI_buf[0x02] = 0x014c;
291 MI_buf[0x03] = 0x01e5;
292 MI_buf[0x04] = 0x0287;
293 }
294 MI_buf[0x20] = 0x1104;
295
Jean-Francois Moine739570b2008-07-14 09:38:29 -0300296 bulk_w(gspca_dev, MI_buf + 1, 1);
297 bulk_w(gspca_dev, MI_buf + 2, 2);
298 bulk_w(gspca_dev, MI_buf + 3, 3);
299 bulk_w(gspca_dev, MI_buf + 4, 4);
300 bulk_w(gspca_dev, MI_buf + 5, 5);
301 bulk_w(gspca_dev, MI_buf + 6, 6);
302 bulk_w(gspca_dev, MI_buf + 7, 7);
303 bulk_w(gspca_dev, MI_buf + 9, 9);
304 bulk_w(gspca_dev, MI_buf + 0x0b, 0x0b);
305 bulk_w(gspca_dev, MI_buf + 0x0c, 0x0c);
306 bulk_w(gspca_dev, MI_buf + 0x0d, 0x0d);
307 bulk_w(gspca_dev, MI_buf + 0x1e, 0x1e);
308 bulk_w(gspca_dev, MI_buf + 0x20, 0x20);
309 bulk_w(gspca_dev, MI_buf + 0x2b, 0x2b);
310 bulk_w(gspca_dev, MI_buf + 0x2c, 0x2c);
311 bulk_w(gspca_dev, MI_buf + 0x2d, 0x2d);
312 bulk_w(gspca_dev, MI_buf + 0x2e, 0x2e);
313 bulk_w(gspca_dev, MI_buf + 0x35, 0x35);
314 bulk_w(gspca_dev, MI_buf + 0x5f, 0x5f);
315 bulk_w(gspca_dev, MI_buf + 0x60, 0x60);
316 bulk_w(gspca_dev, MI_buf + 0x61, 0x61);
317 bulk_w(gspca_dev, MI_buf + 0x62, 0x62);
318 bulk_w(gspca_dev, MI_buf + 0x63, 0x63);
319 bulk_w(gspca_dev, MI_buf + 0x64, 0x64);
320 bulk_w(gspca_dev, MI_buf + 0xf1, 0xf1);
321 kfree(MI_buf);
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300322
Jean-Francois Moine739570b2008-07-14 09:38:29 -0300323 intpipe = usb_sndintpipe(gspca_dev->dev, 0);
324 err_code = usb_clear_halt(gspca_dev->dev, intpipe);
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300325
326 data[0] = 0x00;
327 data[1] = 0x4d; /* ISOC transfering enable... */
Jean-Francois Moine739570b2008-07-14 09:38:29 -0300328 reg_w(gspca_dev, data[0], 2);
Jean-Francois Moine72ab97c2008-09-20 06:39:08 -0300329 return err_code;
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300330}
331
332static void sd_stopN(struct gspca_dev *gspca_dev)
333{
334 int result;
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300335
Jean-Francois Moine739570b2008-07-14 09:38:29 -0300336 gspca_dev->usb_buf[0] = 1;
337 gspca_dev->usb_buf[1] = 0;
338 result = reg_w(gspca_dev, gspca_dev->usb_buf[0], 2);
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300339 if (result < 0)
340 PDEBUG(D_ERR, "Camera Stop failed");
341}
342
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300343static void sd_pkt_scan(struct gspca_dev *gspca_dev,
344 struct gspca_frame *frame, /* target */
Jean-Francois Moinea5ae2062008-07-04 11:16:16 -0300345 __u8 *data, /* isoc packet */
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300346 int len) /* iso packet length */
347{
348 struct sd *sd = (struct sd *) gspca_dev;
349 int p;
350
351 if (len < 6) {
352/* gspca_dev->last_packet_type = DISCARD_PACKET; */
353 return;
354 }
355 for (p = 0; p < len - 6; p++) {
356 if (data[0 + p] == 0xff
357 && data[1 + p] == 0xff
358 && data[2 + p] == 0x00
359 && data[3 + p] == 0xff
360 && data[4 + p] == 0x96) {
361 if (data[5 + p] == 0x64
362 || data[5 + p] == 0x65
363 || data[5 + p] == 0x66
364 || data[5 + p] == 0x67) {
365 PDEBUG(D_PACK, "sof offset: %d leng: %d",
366 p, len);
367 frame = gspca_frame_add(gspca_dev, LAST_PACKET,
368 frame, data, 0);
369
370 /* put the JPEG header */
371 jpeg_put_header(gspca_dev, frame,
372 sd->qindex, 0x21);
373 data += 16;
374 len -= 16;
375 break;
376 }
377 }
378 }
379 gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len);
380}
381
382/* sub-driver description */
Jean-Francois Moinea5ae2062008-07-04 11:16:16 -0300383static const struct sd_desc sd_desc = {
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300384 .name = MODULE_NAME,
385 .ctrls = sd_ctrls,
386 .nctrls = ARRAY_SIZE(sd_ctrls),
387 .config = sd_config,
Jean-Francois Moine012d6b02008-09-03 17:12:16 -0300388 .init = sd_init,
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300389 .start = sd_start,
390 .stopN = sd_stopN,
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300391 .pkt_scan = sd_pkt_scan,
392};
393
394/* -- module initialisation -- */
Jean-Francois Moinea5ae2062008-07-04 11:16:16 -0300395static const __devinitdata struct usb_device_id device_table[] = {
Jean-Francois Moine9d64fdb2008-07-25 08:53:03 -0300396 {USB_DEVICE(0x093a, 0x050f)},
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300397 {}
398};
399MODULE_DEVICE_TABLE(usb, device_table);
400
401/* -- device connect -- */
402static int sd_probe(struct usb_interface *intf,
403 const struct usb_device_id *id)
404{
405 return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
406 THIS_MODULE);
407}
408
409static struct usb_driver sd_driver = {
410 .name = MODULE_NAME,
411 .id_table = device_table,
412 .probe = sd_probe,
413 .disconnect = gspca_disconnect,
Jean-Francois Moine6a709742008-09-03 16:48:10 -0300414#ifdef CONFIG_PM
415 .suspend = gspca_suspend,
416 .resume = gspca_resume,
417#endif
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300418};
419
420/* -- module insert / remove -- */
421static int __init sd_mod_init(void)
422{
Alexey Klimovf69e9522009-01-01 13:02:07 -0300423 int ret;
424 ret = usb_register(&sd_driver);
425 if (ret < 0)
Alexey Klimove6b14842009-01-01 13:04:58 -0300426 return ret;
Jean-Francois Moine10b0e962008-07-22 05:35:10 -0300427 PDEBUG(D_PROBE, "registered");
Jean-Francois Moine6a7eba22008-06-30 15:50:11 -0300428 return 0;
429}
430static void __exit sd_mod_exit(void)
431{
432 usb_deregister(&sd_driver);
433 PDEBUG(D_PROBE, "deregistered");
434}
435
436module_init(sd_mod_init);
437module_exit(sd_mod_exit);