blob: 3310961de1ecfe3b1f13583c184b955cc0fb3048 [file] [log] [blame]
Pete Eberleinb11869d2008-10-30 12:56:41 -07001/*
2 * Copyright (C) 2008 Sensoray Company Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License (Version 2) as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software Foundation,
15 * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
16 */
17
18#include <linux/module.h>
19#include <linux/init.h>
20#include <linux/usb.h>
21#include <linux/i2c.h>
22#include <linux/videodev2.h>
23#include <media/v4l2-common.h>
Mauro Carvalho Chehabfd9a40d2009-09-15 11:07:59 -030024#include "s2250-loader.h"
Pete Eberleinb11869d2008-10-30 12:56:41 -070025#include "go7007-priv.h"
26#include "wis-i2c.h"
27
Pete Eberleinb11869d2008-10-30 12:56:41 -070028#define TLV320_ADDRESS 0x34
Pete Eberleinb11869d2008-10-30 12:56:41 -070029#define VPX322_ADDR_ANALOGCONTROL1 0x02
30#define VPX322_ADDR_BRIGHTNESS0 0x0127
31#define VPX322_ADDR_BRIGHTNESS1 0x0131
32#define VPX322_ADDR_CONTRAST0 0x0128
33#define VPX322_ADDR_CONTRAST1 0x0132
34#define VPX322_ADDR_HUE 0x00dc
Mauro Carvalho Chehab028d4c92009-09-15 11:06:04 -030035#define VPX322_ADDR_SAT 0x0030
Pete Eberleinb11869d2008-10-30 12:56:41 -070036
37struct go7007_usb_board {
38 unsigned int flags;
39 struct go7007_board_info main_info;
40};
41
42struct go7007_usb {
43 struct go7007_usb_board *board;
Mauro Carvalho Chehabfd9a40d2009-09-15 11:07:59 -030044 struct mutex i2c_lock;
Pete Eberleinb11869d2008-10-30 12:56:41 -070045 struct usb_device *usbdev;
46 struct urb *video_urbs[8];
47 struct urb *audio_urbs[8];
48 struct urb *intr_urb;
49};
50
51static unsigned char aud_regs[] = {
52 0x1e, 0x00,
53 0x00, 0x17,
54 0x02, 0x17,
55 0x04, 0xf9,
56 0x06, 0xf9,
57 0x08, 0x02,
58 0x0a, 0x00,
59 0x0c, 0x00,
60 0x0a, 0x00,
61 0x0c, 0x00,
62 0x0e, 0x02,
63 0x10, 0x00,
64 0x12, 0x01,
65 0x00, 0x00,
66};
67
68
69static unsigned char vid_regs[] = {
70 0xF2, 0x0f,
71 0xAA, 0x00,
72 0xF8, 0xff,
73 0x00, 0x00,
74};
75
76static u16 vid_regs_fp[] = {
77 0x028, 0x067,
78 0x120, 0x016,
79 0x121, 0xcF2,
80 0x122, 0x0F2,
81 0x123, 0x00c,
82 0x124, 0x2d0,
83 0x125, 0x2e0,
84 0x126, 0x004,
85 0x128, 0x1E0,
86 0x12A, 0x016,
87 0x12B, 0x0F2,
88 0x12C, 0x0F2,
89 0x12D, 0x00c,
90 0x12E, 0x2d0,
91 0x12F, 0x2e0,
92 0x130, 0x004,
93 0x132, 0x1E0,
94 0x140, 0x060,
95 0x153, 0x00C,
96 0x154, 0x200,
97 0x150, 0x801,
98 0x000, 0x000
99};
100
101/* PAL specific values */
102static u16 vid_regs_fp_pal[] =
103{
104 0x120, 0x017,
105 0x121, 0xd22,
106 0x122, 0x122,
107 0x12A, 0x017,
108 0x12B, 0x122,
109 0x12C, 0x122,
110 0x140, 0x060,
111 0x000, 0x000,
112};
113
114struct s2250 {
115 int std;
116 int input;
117 int brightness;
118 int contrast;
119 int saturation;
120 int hue;
121 int reg12b_val;
122 int audio_input;
Jean Delvare74005162009-04-21 21:47:22 +0200123 struct i2c_client *audio;
Pete Eberleinb11869d2008-10-30 12:56:41 -0700124};
125
126/* from go7007-usb.c which is Copyright (C) 2005-2006 Micronas USA Inc.*/
127static int go7007_usb_vendor_request(struct go7007 *go, u16 request,
128 u16 value, u16 index, void *transfer_buffer, int length, int in)
129{
130 struct go7007_usb *usb = go->hpi_context;
131 int timeout = 5000;
132
133 if (in) {
134 return usb_control_msg(usb->usbdev,
135 usb_rcvctrlpipe(usb->usbdev, 0), request,
136 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
137 value, index, transfer_buffer, length, timeout);
138 } else {
139 return usb_control_msg(usb->usbdev,
140 usb_sndctrlpipe(usb->usbdev, 0), request,
141 USB_TYPE_VENDOR | USB_RECIP_DEVICE,
142 value, index, transfer_buffer, length, timeout);
143 }
144}
145/* end from go7007-usb.c which is Copyright (C) 2005-2006 Micronas USA Inc.*/
146
147static int write_reg(struct i2c_client *client, u8 reg, u8 value)
148{
149 struct go7007 *go = i2c_get_adapdata(client->adapter);
Julia Lawall41e84782008-12-19 18:11:25 +0100150 struct go7007_usb *usb;
Pete Eberleinb11869d2008-10-30 12:56:41 -0700151 int rc;
152 int dev_addr = client->addr;
153 u8 *buf;
154
155 if (go == NULL)
156 return -ENODEV;
157
158 if (go->status == STATUS_SHUTDOWN)
159 return -EBUSY;
160
161 buf = kzalloc(16, GFP_KERNEL);
162 if (buf == NULL)
163 return -ENOMEM;
164
Julia Lawall41e84782008-12-19 18:11:25 +0100165 usb = go->hpi_context;
Mauro Carvalho Chehabfd9a40d2009-09-15 11:07:59 -0300166 if (mutex_lock_interruptible(&usb->i2c_lock) != 0) {
Pete Eberleinb11869d2008-10-30 12:56:41 -0700167 printk(KERN_INFO "i2c lock failed\n");
Julia Lawall253d3b12008-12-25 21:09:57 +0100168 kfree(buf);
Pete Eberleinb11869d2008-10-30 12:56:41 -0700169 return -EINTR;
170 }
171 rc = go7007_usb_vendor_request(go, 0x55, dev_addr,
172 (reg<<8 | value),
173 buf,
174 16, 1);
175
Mauro Carvalho Chehabfd9a40d2009-09-15 11:07:59 -0300176 mutex_unlock(&usb->i2c_lock);
Pete Eberleinb11869d2008-10-30 12:56:41 -0700177 kfree(buf);
178 return rc;
179}
180
181static int write_reg_fp(struct i2c_client *client, u16 addr, u16 val)
182{
183 struct go7007 *go = i2c_get_adapdata(client->adapter);
Julia Lawall41e84782008-12-19 18:11:25 +0100184 struct go7007_usb *usb;
Pete Eberleinb11869d2008-10-30 12:56:41 -0700185 u8 *buf;
186 struct s2250 *dec = i2c_get_clientdata(client);
187
188 if (go == NULL)
189 return -ENODEV;
190
191 if (go->status == STATUS_SHUTDOWN)
192 return -EBUSY;
193
194 buf = kzalloc(16, GFP_KERNEL);
195
196 if (buf == NULL)
197 return -ENOMEM;
198
199
200
201 memset(buf, 0xcd, 6);
202
Julia Lawall41e84782008-12-19 18:11:25 +0100203 usb = go->hpi_context;
Mauro Carvalho Chehabfd9a40d2009-09-15 11:07:59 -0300204 if (mutex_lock_interruptible(&usb->i2c_lock) != 0) {
Pete Eberleinb11869d2008-10-30 12:56:41 -0700205 printk(KERN_INFO "i2c lock failed\n");
Pete Eberleind66ddf22009-09-18 22:05:19 -0300206 kfree(buf);
Pete Eberleinb11869d2008-10-30 12:56:41 -0700207 return -EINTR;
208 }
Pete Eberleind66ddf22009-09-18 22:05:19 -0300209 if (go7007_usb_vendor_request(go, 0x57, addr, val, buf, 16, 1) < 0) {
210 kfree(buf);
Pete Eberleinb11869d2008-10-30 12:56:41 -0700211 return -EFAULT;
Pete Eberleind66ddf22009-09-18 22:05:19 -0300212 }
Pete Eberleinb11869d2008-10-30 12:56:41 -0700213
Mauro Carvalho Chehabfd9a40d2009-09-15 11:07:59 -0300214 mutex_unlock(&usb->i2c_lock);
Pete Eberleinb11869d2008-10-30 12:56:41 -0700215 if (buf[0] == 0) {
216 unsigned int subaddr, val_read;
217
218 subaddr = (buf[4] << 8) + buf[5];
219 val_read = (buf[2] << 8) + buf[3];
Pete Eberleind66ddf22009-09-18 22:05:19 -0300220 kfree(buf);
Pete Eberleinb11869d2008-10-30 12:56:41 -0700221 if (val_read != val) {
222 printk(KERN_INFO "invalid fp write %x %x\n",
223 val_read, val);
224 return -EFAULT;
225 }
226 if (subaddr != addr) {
227 printk(KERN_INFO "invalid fp write addr %x %x\n",
228 subaddr, addr);
229 return -EFAULT;
230 }
Pete Eberleind66ddf22009-09-18 22:05:19 -0300231 } else {
232 kfree(buf);
Pete Eberleinb11869d2008-10-30 12:56:41 -0700233 return -EFAULT;
Pete Eberleind66ddf22009-09-18 22:05:19 -0300234 }
Pete Eberleinb11869d2008-10-30 12:56:41 -0700235
236 /* save last 12b value */
237 if (addr == 0x12b)
238 dec->reg12b_val = val;
239
240 return 0;
241}
242
243static int write_regs(struct i2c_client *client, u8 *regs)
244{
245 int i;
246
247 for (i = 0; !((regs[i] == 0x00) && (regs[i+1] == 0x00)); i += 2) {
248 if (write_reg(client, regs[i], regs[i+1]) < 0) {
249 printk(KERN_INFO "s2250: failed\n");
250 return -1;
251 }
252 }
253 return 0;
254}
255
256static int write_regs_fp(struct i2c_client *client, u16 *regs)
257{
258 int i;
259
260 for (i = 0; !((regs[i] == 0x00) && (regs[i+1] == 0x00)); i += 2) {
261 if (write_reg_fp(client, regs[i], regs[i+1]) < 0) {
262 printk(KERN_INFO "s2250: failed fp\n");
263 return -1;
264 }
265 }
266 return 0;
267}
268
269
270static int s2250_command(struct i2c_client *client,
271 unsigned int cmd, void *arg)
272{
273 struct s2250 *dec = i2c_get_clientdata(client);
274
275 switch (cmd) {
276 case VIDIOC_S_INPUT:
277 {
278 int vidsys;
279 int *input = arg;
280
281 vidsys = (dec->std == V4L2_STD_NTSC) ? 0x01 : 0x00;
282 if (*input == 0) {
283 /* composite */
284 write_reg_fp(client, 0x20, 0x020 | vidsys);
285 write_reg_fp(client, 0x21, 0x662);
286 write_reg_fp(client, 0x140, 0x060);
287 } else {
288 /* S-Video */
289 write_reg_fp(client, 0x20, 0x040 | vidsys);
290 write_reg_fp(client, 0x21, 0x666);
291 write_reg_fp(client, 0x140, 0x060);
292 }
293 dec->input = *input;
294 break;
295 }
296 case VIDIOC_S_STD:
297 {
298 v4l2_std_id *std = arg;
299 u16 vidsource;
300
301 vidsource = (dec->input == 1) ? 0x040 : 0x020;
302 dec->std = *std;
303 switch (dec->std) {
304 case V4L2_STD_NTSC:
305 write_regs_fp(client, vid_regs_fp);
306 write_reg_fp(client, 0x20, vidsource | 1);
307 break;
308 case V4L2_STD_PAL:
309 write_regs_fp(client, vid_regs_fp);
310 write_regs_fp(client, vid_regs_fp_pal);
311 write_reg_fp(client, 0x20, vidsource);
312 break;
313 default:
314 return -EINVAL;
315 }
316 break;
317 }
318 case VIDIOC_QUERYCTRL:
319 {
320 struct v4l2_queryctrl *ctrl = arg;
321 static const u32 user_ctrls[] = {
322 V4L2_CID_BRIGHTNESS,
323 V4L2_CID_CONTRAST,
324 V4L2_CID_SATURATION,
325 V4L2_CID_HUE,
326 0
327 };
328 static const u32 *ctrl_classes[] = {
329 user_ctrls,
330 NULL
331 };
332
333 ctrl->id = v4l2_ctrl_next(ctrl_classes, ctrl->id);
334 switch (ctrl->id) {
335 case V4L2_CID_BRIGHTNESS:
336 v4l2_ctrl_query_fill(ctrl, 0, 100, 1, 50);
337 break;
338 case V4L2_CID_CONTRAST:
339 v4l2_ctrl_query_fill(ctrl, 0, 100, 1, 50);
340 break;
341 case V4L2_CID_SATURATION:
342 v4l2_ctrl_query_fill(ctrl, 0, 100, 1, 50);
343 break;
344 case V4L2_CID_HUE:
345 v4l2_ctrl_query_fill(ctrl, -50, 50, 1, 0);
346 break;
347 default:
348 ctrl->name[0] = '\0';
349 return -EINVAL;
350 }
351 break;
352 }
353 case VIDIOC_S_CTRL:
354 {
355 struct v4l2_control *ctrl = arg;
356 int value1;
357
358 switch (ctrl->id) {
359 case V4L2_CID_BRIGHTNESS:
360 printk(KERN_INFO "s2250: future setting\n");
361 return -EINVAL;
362 case V4L2_CID_CONTRAST:
363 printk(KERN_INFO "s2250: future setting\n");
364 return -EINVAL;
365 break;
366 case V4L2_CID_SATURATION:
367 if (ctrl->value > 127)
368 dec->saturation = 127;
369 else if (ctrl->value < 0)
370 dec->saturation = 0;
371 else
372 dec->saturation = ctrl->value;
373
374 value1 = dec->saturation * 4140 / 100;
375 if (value1 > 4094)
376 value1 = 4094;
377 write_reg_fp(client, VPX322_ADDR_SAT, value1);
378 break;
379 case V4L2_CID_HUE:
380 if (ctrl->value > 50)
381 dec->hue = 50;
382 else if (ctrl->value < -50)
383 dec->hue = -50;
384 else
385 dec->hue = ctrl->value;
386 /* clamp the hue range */
387 value1 = dec->hue * 280 / 50;
388 write_reg_fp(client, VPX322_ADDR_HUE, value1);
389 break;
390 }
391 break;
392 }
393 case VIDIOC_G_CTRL:
394 {
395 struct v4l2_control *ctrl = arg;
396
397 switch (ctrl->id) {
398 case V4L2_CID_BRIGHTNESS:
399 ctrl->value = dec->brightness;
400 break;
401 case V4L2_CID_CONTRAST:
402 ctrl->value = dec->contrast;
403 break;
404 case V4L2_CID_SATURATION:
405 ctrl->value = dec->saturation;
406 break;
407 case V4L2_CID_HUE:
408 ctrl->value = dec->hue;
409 break;
410 }
411 break;
412 }
413 case VIDIOC_S_FMT:
414 {
415 struct v4l2_format *fmt = arg;
416 if (fmt->fmt.pix.height < 640) {
417 write_reg_fp(client, 0x12b, dec->reg12b_val | 0x400);
418 write_reg_fp(client, 0x140, 0x060);
419 } else {
420 write_reg_fp(client, 0x12b, dec->reg12b_val & ~0x400);
421 write_reg_fp(client, 0x140, 0x060);
422 }
423 return 0;
424 }
425 case VIDIOC_G_AUDIO:
426 {
427 struct v4l2_audio *audio = arg;
428
429 memset(audio, 0, sizeof(*audio));
430 audio->index = dec->audio_input;
431 /* fall through */
432 }
433 case VIDIOC_ENUMAUDIO:
434 {
435 struct v4l2_audio *audio = arg;
436
437 switch (audio->index) {
438 case 0:
439 strcpy(audio->name, "Line In");
440 break;
441 case 1:
442 strcpy(audio->name, "Mic");
443 break;
444 case 2:
445 strcpy(audio->name, "Mic Boost");
446 break;
447 default:
448 audio->name[0] = '\0';
449 return 0;
450 }
451 audio->capability = V4L2_AUDCAP_STEREO;
452 audio->mode = 0;
453 return 0;
454 }
455 case VIDIOC_S_AUDIO:
456 {
457 struct v4l2_audio *audio = arg;
458
Pete Eberleinb11869d2008-10-30 12:56:41 -0700459 switch (audio->index) {
460 case 0:
Jean Delvare74005162009-04-21 21:47:22 +0200461 write_reg(dec->audio, 0x08, 0x02); /* Line In */
Pete Eberleinb11869d2008-10-30 12:56:41 -0700462 break;
463 case 1:
Jean Delvare74005162009-04-21 21:47:22 +0200464 write_reg(dec->audio, 0x08, 0x04); /* Mic */
Pete Eberleinb11869d2008-10-30 12:56:41 -0700465 break;
466 case 2:
Jean Delvare74005162009-04-21 21:47:22 +0200467 write_reg(dec->audio, 0x08, 0x05); /* Mic Boost */
Pete Eberleinb11869d2008-10-30 12:56:41 -0700468 break;
469 default:
470 return -EINVAL;
471 }
472 dec->audio_input = audio->index;
473 return 0;
474 }
475
476 default:
477 printk(KERN_INFO "s2250: unknown command 0x%x\n", cmd);
478 break;
479 }
480 return 0;
481}
482
Jean Delvare74005162009-04-21 21:47:22 +0200483static int s2250_probe(struct i2c_client *client,
484 const struct i2c_device_id *id)
Pete Eberleinb11869d2008-10-30 12:56:41 -0700485{
Jean Delvare74005162009-04-21 21:47:22 +0200486 struct i2c_client *audio;
487 struct i2c_adapter *adapter = client->adapter;
Pete Eberleinb11869d2008-10-30 12:56:41 -0700488 struct s2250 *dec;
489 u8 *data;
490 struct go7007 *go = i2c_get_adapdata(adapter);
491 struct go7007_usb *usb = go->hpi_context;
492
Jean Delvare74005162009-04-21 21:47:22 +0200493 audio = i2c_new_dummy(adapter, TLV320_ADDRESS >> 1);
494 if (audio == NULL)
Pete Eberleinb11869d2008-10-30 12:56:41 -0700495 return -ENOMEM;
Pete Eberleinb11869d2008-10-30 12:56:41 -0700496
497 dec = kmalloc(sizeof(struct s2250), GFP_KERNEL);
498 if (dec == NULL) {
Jean Delvare74005162009-04-21 21:47:22 +0200499 i2c_unregister_device(audio);
Pete Eberleinb11869d2008-10-30 12:56:41 -0700500 return -ENOMEM;
501 }
502
503 dec->std = V4L2_STD_NTSC;
504 dec->brightness = 50;
505 dec->contrast = 50;
506 dec->saturation = 50;
507 dec->hue = 0;
Jean Delvare74005162009-04-21 21:47:22 +0200508 dec->audio = audio;
Pete Eberleinb11869d2008-10-30 12:56:41 -0700509 i2c_set_clientdata(client, dec);
510
511 printk(KERN_DEBUG
512 "s2250: initializing video decoder on %s\n",
513 adapter->name);
514
515 /* initialize the audio */
Jean Delvare74005162009-04-21 21:47:22 +0200516 if (write_regs(audio, aud_regs) < 0) {
Pete Eberleinb11869d2008-10-30 12:56:41 -0700517 printk(KERN_ERR
518 "s2250: error initializing audio\n");
Jean Delvare74005162009-04-21 21:47:22 +0200519 i2c_unregister_device(audio);
Pete Eberleinb11869d2008-10-30 12:56:41 -0700520 kfree(dec);
521 return 0;
522 }
Pete Eberleinb11869d2008-10-30 12:56:41 -0700523
524 if (write_regs(client, vid_regs) < 0) {
525 printk(KERN_ERR
526 "s2250: error initializing decoder\n");
Jean Delvare74005162009-04-21 21:47:22 +0200527 i2c_unregister_device(audio);
Pete Eberleinb11869d2008-10-30 12:56:41 -0700528 kfree(dec);
529 return 0;
530 }
531 if (write_regs_fp(client, vid_regs_fp) < 0) {
532 printk(KERN_ERR
533 "s2250: error initializing decoder\n");
Jean Delvare74005162009-04-21 21:47:22 +0200534 i2c_unregister_device(audio);
Pete Eberleinb11869d2008-10-30 12:56:41 -0700535 kfree(dec);
536 return 0;
537 }
538 /* set default channel */
539 /* composite */
540 write_reg_fp(client, 0x20, 0x020 | 1);
541 write_reg_fp(client, 0x21, 0x662);
542 write_reg_fp(client, 0x140, 0x060);
543
544 /* set default audio input */
545 dec->audio_input = 0;
546 write_reg(client, 0x08, 0x02); /* Line In */
547
Mauro Carvalho Chehabfd9a40d2009-09-15 11:07:59 -0300548 if (mutex_lock_interruptible(&usb->i2c_lock) == 0) {
Pete Eberleinb11869d2008-10-30 12:56:41 -0700549 data = kzalloc(16, GFP_KERNEL);
550 if (data != NULL) {
551 int rc;
552 rc = go7007_usb_vendor_request(go, 0x41, 0, 0,
553 data, 16, 1);
554 if (rc > 0) {
555 u8 mask;
556 data[0] = 0;
557 mask = 1<<5;
558 data[0] &= ~mask;
559 data[1] |= mask;
560 go7007_usb_vendor_request(go, 0x40, 0,
561 (data[1]<<8)
562 + data[1],
563 data, 16, 0);
564 }
565 kfree(data);
566 }
Mauro Carvalho Chehabfd9a40d2009-09-15 11:07:59 -0300567 mutex_unlock(&usb->i2c_lock);
Pete Eberleinb11869d2008-10-30 12:56:41 -0700568 }
569
Pete Eberleinb11869d2008-10-30 12:56:41 -0700570 printk("s2250: initialized successfully\n");
571 return 0;
572}
573
Jean Delvare74005162009-04-21 21:47:22 +0200574static int s2250_remove(struct i2c_client *client)
Pete Eberleinb11869d2008-10-30 12:56:41 -0700575{
576 struct s2250 *dec = i2c_get_clientdata(client);
Pete Eberleinb11869d2008-10-30 12:56:41 -0700577
Jean Delvare74005162009-04-21 21:47:22 +0200578 i2c_set_clientdata(client, NULL);
579 i2c_unregister_device(dec->audio);
Pete Eberleinb11869d2008-10-30 12:56:41 -0700580 kfree(dec);
581 return 0;
582}
583
Jean Delvare74005162009-04-21 21:47:22 +0200584static struct i2c_device_id s2250_id[] = {
585 { "s2250_board", 0 },
586 { }
587};
588
Pete Eberleinb11869d2008-10-30 12:56:41 -0700589static struct i2c_driver s2250_driver = {
590 .driver = {
591 .name = "Sensoray 2250 board driver",
592 },
Jean Delvare74005162009-04-21 21:47:22 +0200593 .probe = s2250_probe,
594 .remove = s2250_remove,
Pete Eberleinb11869d2008-10-30 12:56:41 -0700595 .command = s2250_command,
Jean Delvare74005162009-04-21 21:47:22 +0200596 .id_table = s2250_id,
Pete Eberleinb11869d2008-10-30 12:56:41 -0700597};
598
599static int __init s2250_init(void)
600{
601 int r;
602
603 r = s2250loader_init();
604 if (r < 0)
605 return r;
606
607 r = i2c_add_driver(&s2250_driver);
608 if (r < 0)
Jean Delvare74005162009-04-21 21:47:22 +0200609 s2250loader_cleanup();
610
611 return r;
Pete Eberleinb11869d2008-10-30 12:56:41 -0700612}
613
614static void __exit s2250_cleanup(void)
615{
Pete Eberleinb11869d2008-10-30 12:56:41 -0700616 i2c_del_driver(&s2250_driver);
617
618 s2250loader_cleanup();
619}
620
621module_init(s2250_init);
622module_exit(s2250_cleanup);
623
624MODULE_AUTHOR("");
625MODULE_DESCRIPTION("Board driver for Sensoryray 2250");
626MODULE_LICENSE("GPL v2");