[PATCH] DVB: misc. updates to frontend drivers
[linux-2.6/history.git] / drivers / media / dvb / frontends / ves1x93.c
blob83d7f6a9006a1578fea2e6c4148bf3edea5030cd
1 /*
2 Driver for VES1893 and VES1993 QPSK Frontends
4 Copyright (C) 1999 Convergence Integrated Media GmbH <ralph@convergence.de>
5 Copyright (C) 2001 Ronny Strutz <3des@elitedvb.de>
6 Copyright (C) 2002 Dennis Noermann <dennis.noermann@noernet.de>
7 Copyright (C) 2002-2003 Andreas Oberritter <obi@linuxtv.org>
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
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., 675 Mass Ave, Cambridge, MA 02139, USA.
24 */
26 #include <linux/kernel.h>
27 #include <linux/module.h>
28 #include <linux/init.h>
29 #include <linux/string.h>
30 #include <linux/slab.h>
31 #include <linux/delay.h>
33 #include "dvb_frontend.h"
35 static int debug = 0;
36 #define dprintk if (debug) printk
38 static int board_type = 0;
39 #define BOARD_SIEMENS_PCI 0
40 #define BOARD_NOKIA_DBOX2 1
41 #define BOARD_SAGEM_DBOX2 2
43 static int demod_type = 0;
44 #define DEMOD_VES1893 0
45 #define DEMOD_VES1993 1
47 static struct dvb_frontend_info ves1x93_info = {
48 .name = "VES1x93",
49 .type = FE_QPSK,
50 .frequency_min = 950000,
51 .frequency_max = 2150000,
52 .frequency_stepsize = 125, /* kHz for QPSK frontends */
53 .frequency_tolerance = 29500,
54 .symbol_rate_min = 1000000,
55 .symbol_rate_max = 45000000,
56 /* .symbol_rate_tolerance = ???,*/
57 .notifier_delay = 50, /* 1/20 s */
58 .caps = FE_CAN_INVERSION_AUTO |
59 FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
60 FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
61 FE_CAN_QPSK
65 /**
66 * nokia dbox2 (ves1893) and sagem dbox2 (ves1993)
67 * need bit AGCR[PWMS] set to 1
70 static u8 init_1893_tab [] = {
71 0x01, 0xa4, 0x35, 0x80, 0x2a, 0x0b, 0x55, 0xc4,
72 0x09, 0x69, 0x00, 0x86, 0x4c, 0x28, 0x7f, 0x00,
73 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
74 0x80, 0x00, 0x21, 0xb0, 0x14, 0x00, 0xdc, 0x00,
75 0x81, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
76 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
77 0x00, 0x55, 0x00, 0x00, 0x7f, 0x00
81 static u8 init_1993_tab [] = {
82 0x00, 0x9c, 0x35, 0x80, 0x6a, 0x09, 0x72, 0x8c,
83 0x09, 0x6b, 0x00, 0x00, 0x4c, 0x08, 0x00, 0x00,
84 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
85 0x80, 0x40, 0x21, 0xb0, 0x00, 0x00, 0x00, 0x10,
86 0x81, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
87 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00,
88 0x00, 0x55, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03,
89 0x00, 0x00, 0x0e, 0x80, 0x00
93 static u8 * init_1x93_tab;
96 static u8 init_1893_wtab[] =
98 1,1,1,1,1,1,1,1, 1,1,0,0,1,1,0,0,
99 0,1,0,0,0,0,0,0, 1,0,1,1,0,0,0,1,
100 1,1,1,0,0,0,0,0, 0,0,1,1,0,0,0,0,
101 1,1,1,0,1,1
105 static u8 init_1993_wtab[] =
107 1,1,1,1,1,1,1,1, 1,1,0,0,1,1,0,0,
108 0,1,0,0,0,0,0,0, 1,1,1,1,0,0,0,1,
109 1,1,1,0,0,0,0,0, 0,0,1,1,0,0,0,0,
110 1,1,1,0,1,1,1,1, 1,1,1,1,1
113 struct ves1x93_state {
114 fe_spectral_inversion_t inversion;
115 struct i2c_adapter *i2c;
116 struct dvb_adapter *dvb;
121 static int ves1x93_writereg (struct i2c_adapter *i2c, u8 reg, u8 data)
123 u8 buf [] = { 0x00, reg, data };
124 struct i2c_msg msg = { .addr = 0x08, .flags = 0, .buf = buf, .len = 3 };
125 int err;
127 if ((err = i2c_transfer (i2c, &msg, 1)) != 1) {
128 dprintk ("%s: writereg error (err == %i, reg == 0x%02x, data == 0x%02x)\n", __FUNCTION__, err, reg, data);
129 return -EREMOTEIO;
132 return 0;
136 static u8 ves1x93_readreg (struct i2c_adapter *i2c, u8 reg)
138 int ret;
139 u8 b0 [] = { 0x00, reg };
140 u8 b1 [] = { 0 };
141 struct i2c_msg msg [] = { { .addr = 0x08, .flags = 0, .buf = b0, .len = 2 },
142 { .addr = 0x08, .flags = I2C_M_RD, .buf = b1, .len = 1 } };
144 ret = i2c_transfer (i2c, msg, 2);
146 if (ret != 2)
147 dprintk("%s: readreg error (ret == %i)\n", __FUNCTION__, ret);
149 return b1[0];
153 static int tuner_write (struct i2c_adapter *i2c, u8 *data, u8 len)
155 int ret;
156 struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = len };
158 ves1x93_writereg(i2c, 0x00, 0x11);
159 ret = i2c_transfer (i2c, &msg, 1);
160 ves1x93_writereg(i2c, 0x00, 0x01);
162 if (ret != 1)
163 printk("%s: i/o error (ret == %i)\n", __FUNCTION__, ret);
165 return (ret != 1) ? -1 : 0;
171 * set up the downconverter frequency divisor for a
172 * reference clock comparision frequency of 125 kHz.
174 static int sp5659_set_tv_freq (struct i2c_adapter *i2c, u32 freq)
176 u8 pwr = 0;
177 u8 buf[4];
178 u32 div = (freq + 479500) / 125;
180 if (freq > 2000000) pwr = 3;
181 else if (freq > 1800000) pwr = 2;
182 else if (freq > 1600000) pwr = 1;
183 else if (freq > 1200000) pwr = 0;
184 else if (freq >= 1100000) pwr = 1;
185 else pwr = 2;
187 buf[0] = (div >> 8) & 0x7f;
188 buf[1] = div & 0xff;
189 buf[2] = ((div & 0x18000) >> 10) | 0x95;
190 buf[3] = (pwr << 6) | 0x30;
192 // NOTE: since we're using a prescaler of 2, we set the
193 // divisor frequency to 62.5kHz and divide by 125 above
195 return tuner_write (i2c, buf, sizeof(buf));
199 static int tsa5059_set_tv_freq (struct i2c_adapter *i2c, u32 freq)
201 int ret;
202 u8 buf [2];
204 freq /= 1000;
206 buf[0] = (freq >> 8) & 0x7F;
207 buf[1] = freq & 0xFF;
209 ret = tuner_write(i2c, buf, sizeof(buf));
211 return ret;
215 static int tuner_set_tv_freq (struct i2c_adapter *i2c, u32 freq)
217 if ((demod_type == DEMOD_VES1893) && (board_type == BOARD_SIEMENS_PCI))
218 return sp5659_set_tv_freq (i2c, freq);
219 else if (demod_type == DEMOD_VES1993)
220 return tsa5059_set_tv_freq (i2c, freq);
222 return -EINVAL;
226 static int ves1x93_init (struct i2c_adapter *i2c)
228 int i;
229 int size;
230 u8 *init_1x93_wtab;
232 dprintk("%s: init chip\n", __FUNCTION__);
234 switch (demod_type) {
235 case DEMOD_VES1893:
236 init_1x93_tab = init_1893_tab;
237 init_1x93_wtab = init_1893_wtab;
238 size = sizeof(init_1893_tab);
239 if (board_type == BOARD_NOKIA_DBOX2)
240 init_1x93_tab[0x05] |= 0x20; /* invert PWM */
241 break;
243 case DEMOD_VES1993:
244 init_1x93_tab = init_1993_tab;
245 init_1x93_wtab = init_1993_wtab;
246 size = sizeof(init_1993_tab);
247 if (board_type == BOARD_SAGEM_DBOX2)
248 init_1x93_tab[0x05] |= 0x20; /* invert PWM */
249 break;
251 default:
252 return -EINVAL;
255 for (i = 0; i < size; i++)
256 if (init_1x93_wtab[i])
257 ves1x93_writereg (i2c, i, init_1x93_tab[i]);
259 if (demod_type == DEMOD_VES1993) {
260 if (board_type == BOARD_NOKIA_DBOX2)
261 tuner_write(i2c, "\x06\x5c\x83\x60", 4);
262 else if (board_type == BOARD_SAGEM_DBOX2)
263 tuner_write(i2c, "\x25\x70\x92\x40", 4);
266 return 0;
270 static int ves1x93_clr_bit (struct i2c_adapter *i2c)
272 msleep(10);
273 ves1x93_writereg (i2c, 0, init_1x93_tab[0] & 0xfe);
274 ves1x93_writereg (i2c, 0, init_1x93_tab[0]);
275 msleep(50);
276 return 0;
280 static int ves1x93_set_inversion (struct i2c_adapter *i2c, fe_spectral_inversion_t inversion)
282 u8 val;
285 * inversion on/off are interchanged because i and q seem to
286 * be swapped on the hardware
289 switch (inversion) {
290 case INVERSION_OFF:
291 val = 0xc0;
292 break;
293 case INVERSION_ON:
294 val = 0x80;
295 break;
296 case INVERSION_AUTO:
297 val = 0x00;
298 break;
299 default:
300 return -EINVAL;
303 return ves1x93_writereg (i2c, 0x0c, (init_1x93_tab[0x0c] & 0x3f) | val);
307 static int ves1x93_set_fec (struct i2c_adapter *i2c, fe_code_rate_t fec)
309 if (fec == FEC_AUTO)
310 return ves1x93_writereg (i2c, 0x0d, 0x08);
311 else if (fec < FEC_1_2 || fec > FEC_8_9)
312 return -EINVAL;
313 else
314 return ves1x93_writereg (i2c, 0x0d, fec - FEC_1_2);
318 static fe_code_rate_t ves1x93_get_fec (struct i2c_adapter *i2c)
320 return FEC_1_2 + ((ves1x93_readreg (i2c, 0x0d) >> 4) & 0x7);
324 static int ves1x93_set_symbolrate (struct i2c_adapter *i2c, u32 srate)
326 u32 BDR;
327 u32 ratio;
328 u8 ADCONF, FCONF, FNR;
329 u32 BDRI;
330 u32 tmp;
331 u32 XIN, FIN;
333 dprintk("%s: srate == %d\n", __FUNCTION__, (unsigned int) srate);
335 switch (board_type) {
336 case BOARD_SIEMENS_PCI:
337 XIN = 90100000UL;
338 break;
339 case BOARD_NOKIA_DBOX2:
340 if (demod_type == DEMOD_VES1893)
341 XIN = 91000000UL;
342 else if (demod_type == DEMOD_VES1993)
343 XIN = 96000000UL;
344 else
345 return -EINVAL;
346 break;
347 case BOARD_SAGEM_DBOX2:
348 XIN = 92160000UL;
349 break;
350 default:
351 return -EINVAL;
354 if (srate > XIN/2)
355 srate = XIN/2;
357 if (srate < 500000)
358 srate = 500000;
360 #define MUL (1UL<<26)
362 FIN = (XIN + 6000) >> 4;
364 tmp = srate << 6;
365 ratio = tmp / FIN;
367 tmp = (tmp % FIN) << 8;
368 ratio = (ratio << 8) + tmp / FIN;
370 tmp = (tmp % FIN) << 8;
371 ratio = (ratio << 8) + tmp / FIN;
373 FNR = 0xff;
375 if (ratio < MUL/3) FNR = 0;
376 if (ratio < (MUL*11)/50) FNR = 1;
377 if (ratio < MUL/6) FNR = 2;
378 if (ratio < MUL/9) FNR = 3;
379 if (ratio < MUL/12) FNR = 4;
380 if (ratio < (MUL*11)/200) FNR = 5;
381 if (ratio < MUL/24) FNR = 6;
382 if (ratio < (MUL*27)/1000) FNR = 7;
383 if (ratio < MUL/48) FNR = 8;
384 if (ratio < (MUL*137)/10000) FNR = 9;
386 if (FNR == 0xff) {
387 ADCONF = 0x89;
388 FCONF = 0x80;
389 FNR = 0;
390 } else {
391 ADCONF = 0x81;
392 FCONF = 0x88 | (FNR >> 1) | ((FNR & 0x01) << 5);
393 /*FCONF = 0x80 | ((FNR & 0x01) << 5) | (((FNR > 1) & 0x03) << 3) | ((FNR >> 1) & 0x07);*/
396 BDR = (( (ratio << (FNR >> 1)) >> 4) + 1) >> 1;
397 BDRI = ( ((FIN << 8) / ((srate << (FNR >> 1)) >> 2)) + 1) >> 1;
399 dprintk("FNR= %d\n", FNR);
400 dprintk("ratio= %08x\n", (unsigned int) ratio);
401 dprintk("BDR= %08x\n", (unsigned int) BDR);
402 dprintk("BDRI= %02x\n", (unsigned int) BDRI);
404 if (BDRI > 0xff)
405 BDRI = 0xff;
407 ves1x93_writereg (i2c, 0x06, 0xff & BDR);
408 ves1x93_writereg (i2c, 0x07, 0xff & (BDR >> 8));
409 ves1x93_writereg (i2c, 0x08, 0x0f & (BDR >> 16));
411 ves1x93_writereg (i2c, 0x09, BDRI);
412 ves1x93_writereg (i2c, 0x20, ADCONF);
413 ves1x93_writereg (i2c, 0x21, FCONF);
415 if (srate < 6000000)
416 ves1x93_writereg (i2c, 0x05, init_1x93_tab[0x05] | 0x80);
417 else
418 ves1x93_writereg (i2c, 0x05, init_1x93_tab[0x05] & 0x7f);
420 /* ves1993 hates this, will lose lock */
421 if (demod_type != DEMOD_VES1993)
422 ves1x93_clr_bit (i2c);
424 return 0;
427 static int ves1x93_set_voltage (struct i2c_adapter *i2c, fe_sec_voltage_t voltage)
429 switch (voltage) {
430 case SEC_VOLTAGE_13:
431 return ves1x93_writereg (i2c, 0x1f, 0x20);
432 case SEC_VOLTAGE_18:
433 return ves1x93_writereg (i2c, 0x1f, 0x30);
434 case SEC_VOLTAGE_OFF:
435 return ves1x93_writereg (i2c, 0x1f, 0x00);
436 default:
437 return -EINVAL;
442 static int ves1x93_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
444 struct ves1x93_state *state = (struct ves1x93_state*) fe->data;
445 struct i2c_adapter *i2c = state->i2c;
447 switch (cmd) {
448 case FE_GET_INFO:
449 memcpy (arg, &ves1x93_info, sizeof(struct dvb_frontend_info));
450 break;
452 case FE_READ_STATUS:
454 fe_status_t *status = arg;
455 u8 sync = ves1x93_readreg (i2c, 0x0e);
458 * The ves1893 sometimes returns sync values that make no sense,
459 * because, e.g., the SIGNAL bit is 0, while some of the higher
460 * bits are 1 (and how can there be a CARRIER w/o a SIGNAL?).
461 * Tests showed that the the VITERBI and SYNC bits are returned
462 * reliably, while the SIGNAL and CARRIER bits ar sometimes wrong.
463 * If such a case occurs, we read the value again, until we get a
464 * valid value.
466 int maxtry = 10; /* just for safety - let's not get stuck here */
467 while ((sync & 0x03) != 0x03 && (sync & 0x0c) && maxtry--) {
468 msleep(10);
469 sync = ves1x93_readreg (i2c, 0x0e);
472 *status = 0;
474 if (sync & 1)
475 *status |= FE_HAS_SIGNAL;
477 if (sync & 2)
478 *status |= FE_HAS_CARRIER;
480 if (sync & 4)
481 *status |= FE_HAS_VITERBI;
483 if (sync & 8)
484 *status |= FE_HAS_SYNC;
486 if ((sync & 0x1f) == 0x1f)
487 *status |= FE_HAS_LOCK;
489 break;
492 case FE_READ_BER:
494 u32 *ber = (u32 *) arg;
496 *ber = ves1x93_readreg (i2c, 0x15);
497 *ber |= (ves1x93_readreg (i2c, 0x16) << 8);
498 *ber |= ((ves1x93_readreg (i2c, 0x17) & 0x0F) << 16);
499 *ber *= 10;
500 break;
503 case FE_READ_SIGNAL_STRENGTH:
505 u8 signal = ~ves1x93_readreg (i2c, 0x0b);
506 *((u16*) arg) = (signal << 8) | signal;
507 break;
510 case FE_READ_SNR:
512 u8 snr = ~ves1x93_readreg (i2c, 0x1c);
513 *(u16*) arg = (snr << 8) | snr;
514 break;
517 case FE_READ_UNCORRECTED_BLOCKS:
519 *(u32*) arg = ves1x93_readreg (i2c, 0x18) & 0x7f;
521 if (*(u32*) arg == 0x7f)
522 *(u32*) arg = 0xffffffff; /* counter overflow... */
524 ves1x93_writereg (i2c, 0x18, 0x00); /* reset the counter */
525 ves1x93_writereg (i2c, 0x18, 0x80); /* dto. */
526 break;
529 case FE_SET_FRONTEND:
531 struct dvb_frontend_parameters *p = arg;
533 tuner_set_tv_freq (i2c, p->frequency);
534 ves1x93_set_inversion (i2c, p->inversion);
535 ves1x93_set_fec (i2c, p->u.qpsk.fec_inner);
536 ves1x93_set_symbolrate (i2c, p->u.qpsk.symbol_rate);
537 state->inversion = p->inversion;
538 break;
541 case FE_GET_FRONTEND:
543 struct dvb_frontend_parameters *p = arg;
544 int afc;
546 afc = ((int)((char)(ves1x93_readreg (i2c, 0x0a) << 1)))/2;
547 afc = (afc * (int)(p->u.qpsk.symbol_rate/1000/8))/16;
549 p->frequency -= afc;
552 * inversion indicator is only valid
553 * if auto inversion was used
555 if (state->inversion == INVERSION_AUTO)
556 p->inversion = (ves1x93_readreg (i2c, 0x0f) & 2) ?
557 INVERSION_OFF : INVERSION_ON;
558 p->u.qpsk.fec_inner = ves1x93_get_fec (i2c);
559 /* XXX FIXME: timing offset !! */
560 break;
563 case FE_SLEEP:
564 if (board_type == BOARD_SIEMENS_PCI)
565 ves1x93_writereg (i2c, 0x1f, 0x00); /* LNB power off */
566 return ves1x93_writereg (i2c, 0x00, 0x08);
568 case FE_INIT:
569 return ves1x93_init (i2c);
571 case FE_SET_TONE:
572 return -EOPNOTSUPP; /* the ves1893 can generate the 22k */
573 /* let's implement this when we have */
574 /* a box that uses the 22K_0 pin... */
576 case FE_SET_VOLTAGE:
577 return ves1x93_set_voltage (i2c, (fe_sec_voltage_t) arg);
579 default:
580 return -EOPNOTSUPP;
583 return 0;
586 static struct i2c_client client_template;
588 static int attach_adapter(struct i2c_adapter *adapter)
590 struct i2c_client *client;
591 struct ves1x93_state* state;
592 u8 identity = ves1x93_readreg(adapter, 0x1e);
593 int ret;
595 switch (identity) {
596 case 0xdc: /* VES1893A rev1 */
597 printk("ves1x93: Detected ves1893a rev1\n");
598 demod_type = DEMOD_VES1893;
599 ves1x93_info.name[4] = '8';
600 break;
601 case 0xdd: /* VES1893A rev2 */
602 printk("ves1x93: Detected ves1893a rev2\n");
603 demod_type = DEMOD_VES1893;
604 ves1x93_info.name[4] = '8';
605 break;
606 case 0xde: /* VES1993 */
607 printk("ves1x93: Detected ves1993\n");
608 demod_type = DEMOD_VES1993;
609 ves1x93_info.name[4] = '9';
610 break;
611 default:
612 dprintk("VES1x93 not found (identity %02x)\n", identity);
613 return -ENODEV;
616 if ((state = kmalloc(sizeof(struct ves1x93_state), GFP_KERNEL)) == NULL) {
617 return -ENOMEM;
620 if (NULL == (client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL))) {
621 kfree(state);
622 return -ENOMEM;
625 state->inversion = INVERSION_OFF;
626 state->i2c = adapter;
628 memcpy(client, &client_template, sizeof(struct i2c_client));
629 client->adapter = adapter;
630 client->addr = (0x08>>1);
631 i2c_set_clientdata(client, (void*)state);
633 ret = i2c_attach_client(client);
634 if (ret) {
635 kfree(client);
636 kfree(state);
637 return -EFAULT;
640 BUG_ON(!state->dvb);
642 ret = dvb_register_frontend(ves1x93_ioctl, state->dvb, state,
643 &ves1x93_info, THIS_MODULE);
644 if (ret) {
645 i2c_detach_client(client);
646 kfree(client);
647 kfree(state);
648 return -EFAULT;
651 return 0;
654 static int detach_client(struct i2c_client *client)
656 struct ves1x93_state *state = (struct ves1x93_state*)i2c_get_clientdata(client);
657 dvb_unregister_frontend(ves1x93_ioctl, state->dvb);
658 i2c_detach_client(client);
659 BUG_ON(state->dvb);
660 kfree(client);
661 kfree(state);
662 return 0;
665 static int command (struct i2c_client *client, unsigned int cmd, void *arg)
667 struct ves1x93_state *state = (struct ves1x93_state*)i2c_get_clientdata(client);
669 dprintk ("%s\n", __FUNCTION__);
671 switch (cmd) {
672 case FE_REGISTER: {
673 state->dvb = (struct dvb_adapter*)arg;
674 break;
676 case FE_UNREGISTER: {
677 state->dvb = NULL;
678 break;
680 default:
681 return -EOPNOTSUPP;
683 return 0;
686 static struct i2c_driver driver = {
687 .owner = THIS_MODULE,
688 .name = "ves1x93",
689 .id = I2C_DRIVERID_DVBFE_VES1X93,
690 .flags = I2C_DF_NOTIFY,
691 .attach_adapter = attach_adapter,
692 .detach_client = detach_client,
693 .command = command,
696 static struct i2c_client client_template = {
697 I2C_DEVNAME("ves1x93"),
698 .flags = I2C_CLIENT_ALLOW_USE,
699 .driver = &driver,
702 static int __init init_ves1x93 (void)
704 switch (board_type) {
705 case BOARD_NOKIA_DBOX2:
706 dprintk("%s: NOKIA_DBOX2\n", __FILE__);
707 break;
708 case BOARD_SAGEM_DBOX2:
709 dprintk("%s: SAGEM_DBOX2\n", __FILE__);
710 break;
711 case BOARD_SIEMENS_PCI:
712 dprintk("%s: SIEMENS_PCI\n", __FILE__);
713 break;
714 default:
715 return -EIO;
718 return i2c_add_driver(&driver);
722 static void __exit exit_ves1x93 (void)
724 if (i2c_del_driver(&driver))
725 printk("vex1x93: driver deregistration failed\n");
728 module_init(init_ves1x93);
729 module_exit(exit_ves1x93);
732 MODULE_DESCRIPTION("VES1x93 DVB-S Frontend");
733 MODULE_AUTHOR("Ralph Metzler");
734 MODULE_LICENSE("GPL");
735 MODULE_PARM(debug,"i");
736 MODULE_PARM(board_type,"i");