1 /* DVB USB compliant linux driver for MSI Mega Sky 580 DVB-T USB2.0 receiver
3 * Copyright (C) 2006 Aapo Tahkola (aet@rasterburn.org)
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the Free
7 * Software Foundation, version 2.
9 * see Documentation/dvb/README.dvb-usb for more information
15 #include "mt352_priv.h"
21 static int dvb_usb_m920x_debug;
22 module_param_named(debug,dvb_usb_m920x_debug, int, 0644);
23 MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS);
25 static struct dvb_usb_rc_key megasky_rc_keys [] = {
26 { 0x0, 0x12, KEY_POWER },
27 { 0x0, 0x1e, KEY_CYCLEWINDOWS }, /* min/max */
28 { 0x0, 0x02, KEY_CHANNELUP },
29 { 0x0, 0x05, KEY_CHANNELDOWN },
30 { 0x0, 0x03, KEY_VOLUMEUP },
31 { 0x0, 0x06, KEY_VOLUMEDOWN },
32 { 0x0, 0x04, KEY_MUTE },
33 { 0x0, 0x07, KEY_OK }, /* TS */
34 { 0x0, 0x08, KEY_STOP },
35 { 0x0, 0x09, KEY_MENU }, /* swap */
36 { 0x0, 0x0a, KEY_REWIND },
37 { 0x0, 0x1b, KEY_PAUSE },
38 { 0x0, 0x1f, KEY_FASTFORWARD },
39 { 0x0, 0x0c, KEY_RECORD },
40 { 0x0, 0x0d, KEY_CAMERA }, /* screenshot */
41 { 0x0, 0x0e, KEY_COFFEE }, /* "MTS" */
44 static struct dvb_usb_rc_key tvwalkertwin_rc_keys [] = {
45 { 0x0, 0x01, KEY_ZOOM }, /* Full Screen */
46 { 0x0, 0x02, KEY_CAMERA }, /* snapshot */
47 { 0x0, 0x03, KEY_MUTE },
48 { 0x0, 0x04, KEY_REWIND },
49 { 0x0, 0x05, KEY_PLAYPAUSE }, /* Play/Pause */
50 { 0x0, 0x06, KEY_FASTFORWARD },
51 { 0x0, 0x07, KEY_RECORD },
52 { 0x0, 0x08, KEY_STOP },
53 { 0x0, 0x09, KEY_TIME }, /* Timeshift */
54 { 0x0, 0x0c, KEY_COFFEE }, /* Recall */
55 { 0x0, 0x0e, KEY_CHANNELUP },
56 { 0x0, 0x12, KEY_POWER },
57 { 0x0, 0x15, KEY_MENU }, /* source */
58 { 0x0, 0x18, KEY_CYCLEWINDOWS }, /* TWIN PIP */
59 { 0x0, 0x1a, KEY_CHANNELDOWN },
60 { 0x0, 0x1b, KEY_VOLUMEDOWN },
61 { 0x0, 0x1e, KEY_VOLUMEUP },
64 static inline int m9206_read(struct usb_device *udev, u8 request, u16 value,\
65 u16 index, void *data, int size)
69 ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
70 request, USB_TYPE_VENDOR | USB_DIR_IN,
71 value, index, data, size, 2000);
73 printk(KERN_INFO "m920x_read = error: %d\n", ret);
78 deb_rc("m920x_read = no data\n");
85 static inline int m9206_write(struct usb_device *udev, u8 request,
90 ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
91 request, USB_TYPE_VENDOR | USB_DIR_OUT,
92 value, index, NULL, 0, 2000);
97 static int m9206_init(struct dvb_usb_device *d, struct m9206_inits *rc_seq)
101 /* Remote controller init. */
102 if (d->props.rc_query) {
103 deb_rc("Initialising remote control\n");
104 while (rc_seq->address) {
105 if ((ret = m9206_write(d->udev, M9206_CORE, rc_seq->data, rc_seq->address)) != 0) {
106 deb_rc("Initialising remote control failed\n");
113 deb_rc("Initialising remote control success\n");
119 static int m9206_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
121 struct m9206_state *m = d->priv;
125 if ((ret = m9206_read(d->udev, M9206_CORE, 0x0, M9206_RC_STATE, rc_state, 1)) != 0)
128 if ((ret = m9206_read(d->udev, M9206_CORE, 0x0, M9206_RC_KEY, rc_state + 1, 1)) != 0)
131 for (i = 0; i < d->props.rc_key_map_size; i++)
132 if (d->props.rc_key_map[i].data == rc_state[1]) {
133 *event = d->props.rc_key_map[i].event;
135 switch(rc_state[0]) {
137 *state = REMOTE_NO_KEY_PRESSED;
140 case 0x88: /* framing error or "invalid code" */
144 *state = REMOTE_NO_KEY_PRESSED;
151 *state = REMOTE_KEY_PRESSED;
155 /* prevent immediate auto-repeat */
156 if (++m->rep_count > 2)
157 *state = REMOTE_KEY_REPEAT;
159 *state = REMOTE_NO_KEY_PRESSED;
163 deb_rc("Unexpected rc state %02x\n", rc_state[0]);
164 *state = REMOTE_NO_KEY_PRESSED;
169 if (rc_state[1] != 0)
170 deb_rc("Unknown rc key %02x\n", rc_state[1]);
172 *state = REMOTE_NO_KEY_PRESSED;
180 static int m9206_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
183 struct dvb_usb_device *d = i2c_get_adapdata(adap);
190 if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
193 for (i = 0; i < num; i++) {
194 if (msg[i].flags & (I2C_M_NO_RD_ACK|I2C_M_IGNORE_NAK|I2C_M_TEN) ||
196 /* For a 0 byte message, I think sending the address to index 0x80|0x40
197 * would be the correct thing to do. However, zero byte messages are
198 * only used for probing, and since we don't know how to get the slave's
199 * ack, we can't probe. */
203 /* Send START & address/RW bit */
204 if (!(msg[i].flags & I2C_M_NOSTART)) {
205 if ((ret = m9206_write(d->udev, M9206_I2C, (msg[i].addr<<1)|(msg[i].flags&I2C_M_RD?0x01:0), 0x80)) != 0)
207 /* Should check for ack here, if we knew how. */
209 if (msg[i].flags & I2C_M_RD) {
210 for (j = 0; j < msg[i].len; j++) {
211 /* Last byte of transaction? Send STOP, otherwise send ACK. */
212 int stop = (i+1 == num && j+1 == msg[i].len)?0x40:0x01;
213 if ((ret = m9206_read(d->udev, M9206_I2C, 0x0, 0x20|stop, &msg[i].buf[j], 1)) != 0)
217 for (j = 0; j < msg[i].len; j++) {
218 /* Last byte of transaction? Then send STOP. */
219 int stop = (i+1 == num && j+1 == msg[i].len)?0x40:0x00;
220 if ((ret = m9206_write(d->udev, M9206_I2C, msg[i].buf[j], stop)) != 0)
222 /* Should check for ack here too. */
229 mutex_unlock(&d->i2c_mutex);
234 static u32 m9206_i2c_func(struct i2c_adapter *adapter)
239 static struct i2c_algorithm m9206_i2c_algo = {
240 .master_xfer = m9206_i2c_xfer,
241 .functionality = m9206_i2c_func,
245 static int m9206_set_filter(struct dvb_usb_adapter *adap, int type, int idx,
255 if ((ret = m9206_write(adap->dev->udev, M9206_FILTER, pid, (type << 8) | (idx * 4) )) != 0)
258 if ((ret = m9206_write(adap->dev->udev, M9206_FILTER, 0, (type << 8) | (idx * 4) )) != 0)
264 static int m9206_update_filters(struct dvb_usb_adapter *adap)
266 struct m9206_state *m = adap->dev->priv;
267 int enabled = m->filtering_enabled;
268 int i, ret = 0, filter = 0;
270 for (i = 0; i < M9206_MAX_FILTERS; i++)
271 if (m->filters[i] == 8192)
274 /* Disable all filters */
275 if ((ret = m9206_set_filter(adap, 0x81, 1, enabled)) != 0)
278 for (i = 0; i < M9206_MAX_FILTERS; i++)
279 if ((ret = m9206_set_filter(adap, 0x81, i + 2, 0)) != 0)
282 if ((ret = m9206_set_filter(adap, 0x82, 0, 0x0)) != 0)
287 for (i = 0; i < M9206_MAX_FILTERS; i++) {
288 if (m->filters[i] == 0)
291 if ((ret = m9206_set_filter(adap, 0x81, filter + 2, m->filters[i])) != 0)
298 if ((ret = m9206_set_filter(adap, 0x82, 0, 0x02f5)) != 0)
304 static int m9206_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff)
306 struct m9206_state *m = adap->dev->priv;
308 m->filtering_enabled = onoff ? 1 : 0;
310 return m9206_update_filters(adap);
313 static int m9206_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid,
316 struct m9206_state *m = adap->dev->priv;
318 m->filters[index] = onoff ? pid : 0;
320 return m9206_update_filters(adap);
323 static int m9206_firmware_download(struct usb_device *udev,
324 const struct firmware *fw)
326 u16 value, index, size;
328 int i, pass, ret = 0;
330 buff = kmalloc(65536, GFP_KERNEL);
332 if ((ret = m9206_read(udev, M9206_FILTER, 0x0, 0x8000, read, 4)) != 0)
334 deb_rc("%x %x %x %x\n", read[0], read[1], read[2], read[3]);
336 if ((ret = m9206_read(udev, M9206_FW, 0x0, 0x0, read, 1)) != 0)
338 deb_rc("%x\n", read[0]);
340 for (pass = 0; pass < 2; pass++) {
341 for (i = 0; i + (sizeof(u16) * 3) < fw->size;) {
342 value = le16_to_cpu(*(u16 *)(fw->data + i));
345 index = le16_to_cpu(*(u16 *)(fw->data + i));
348 size = le16_to_cpu(*(u16 *)(fw->data + i));
352 /* Will stall if using fw->data ... */
353 memcpy(buff, fw->data + i, size);
355 ret = usb_control_msg(udev, usb_sndctrlpipe(udev,0),
357 USB_TYPE_VENDOR | USB_DIR_OUT,
358 value, index, buff, size, 20);
360 deb_rc("error while uploading fw!\n");
369 deb_rc("bad firmware file!\n");
377 /* m9206 will disconnect itself from the bus after this. */
378 (void) m9206_write(udev, M9206_CORE, 0x01, M9206_FW_GO);
379 deb_rc("firmware uploaded!\n");
387 /* Callbacks for DVB USB */
388 static int m920x_identify_state(struct usb_device *udev,
389 struct dvb_usb_device_properties *props,
390 struct dvb_usb_device_description **desc,
393 struct usb_host_interface *alt;
395 alt = usb_altnum_to_altsetting(usb_ifnum_to_if(udev, 0), 1);
396 *cold = (alt == NULL) ? 1 : 0;
401 static int megasky_mt352_demod_init(struct dvb_frontend *fe)
403 u8 config[] = { CONFIG, 0x3d };
404 u8 clock[] = { CLOCK_CTL, 0x30 };
405 u8 reset[] = { RESET, 0x80 };
406 u8 adc_ctl[] = { ADC_CTL_1, 0x40 };
407 u8 agc[] = { AGC_TARGET, 0x1c, 0x20 };
408 u8 sec_agc[] = { 0x69, 0x00, 0xff, 0xff, 0x40, 0xff, 0x00, 0x40, 0x40 };
409 u8 unk1[] = { 0x93, 0x1a };
410 u8 unk2[] = { 0xb5, 0x7a };
412 mt352_write(fe, config, ARRAY_SIZE(config));
413 mt352_write(fe, clock, ARRAY_SIZE(clock));
414 mt352_write(fe, reset, ARRAY_SIZE(reset));
415 mt352_write(fe, adc_ctl, ARRAY_SIZE(adc_ctl));
416 mt352_write(fe, agc, ARRAY_SIZE(agc));
417 mt352_write(fe, sec_agc, ARRAY_SIZE(sec_agc));
418 mt352_write(fe, unk1, ARRAY_SIZE(unk1));
419 mt352_write(fe, unk2, ARRAY_SIZE(unk2));
421 deb_rc("Demod init!\n");
426 static struct mt352_config megasky_mt352_config = {
427 .demod_address = 0x0f,
429 .demod_init = megasky_mt352_demod_init,
432 static int megasky_mt352_frontend_attach(struct dvb_usb_adapter *adap)
434 deb_rc("megasky_frontend_attach!\n");
436 if ((adap->fe = dvb_attach(mt352_attach, &megasky_mt352_config, &adap->dev->i2c_adap)) == NULL)
442 static struct qt1010_config megasky_qt1010_config = {
446 static int megasky_qt1010_tuner_attach(struct dvb_usb_adapter *adap)
448 if (dvb_attach(qt1010_attach, adap->fe, &adap->dev->i2c_adap,
449 &megasky_qt1010_config) == NULL)
455 static struct m9206_inits megasky_rc_init [] = {
456 { M9206_RC_INIT2, 0xa8 },
457 { M9206_RC_INIT1, 0x51 },
458 { } /* terminating entry */
461 static struct tda1004x_config digivox_tda10046_config = {
462 .demod_address = 0x08,
465 .ts_mode = TDA10046_TS_SERIAL,
466 .xtal_freq = TDA10046_XTAL_16M,
467 .if_freq = TDA10046_FREQ_045,
468 .agc_config = TDA10046_AGC_TDA827X,
469 .gpio_config = TDA10046_GPTRI,
470 .request_firmware = NULL,
473 static int digivox_tda10046_frontend_attach(struct dvb_usb_adapter *adap)
475 deb_rc("digivox_tda10046_frontend_attach!\n");
477 if ((adap->fe = dvb_attach(tda10046_attach, &digivox_tda10046_config,
478 &adap->dev->i2c_adap)) == NULL)
484 static int digivox_tda8275_tuner_attach(struct dvb_usb_adapter *adap)
486 if (dvb_attach(tda827x_attach, adap->fe, 0x60, &adap->dev->i2c_adap,
492 /* LifeView TV Walker Twin has 1 x M9206, 2 x TDA10046, 2 x TDA8275A
493 * TDA10046 #0 is located at i2c address 0x08
494 * TDA10046 #1 is located at i2c address 0x0b
495 * TDA8275A #0 is located at i2c address 0x60
496 * TDA8275A #1 is located at i2c address 0x61
499 static struct tda1004x_config tvwalkertwin_0_tda10046_config = {
500 .demod_address = 0x08,
503 .ts_mode = TDA10046_TS_SERIAL,
504 .xtal_freq = TDA10046_XTAL_16M,
505 .if_freq = TDA10046_FREQ_045,
506 .agc_config = TDA10046_AGC_TDA827X,
507 .gpio_config = TDA10046_GPTRI,
508 .request_firmware = NULL, /* uses firmware EEPROM */
511 static struct tda1004x_config tvwalkertwin_1_tda10046_config = {
512 .demod_address = 0x0b,
515 .ts_mode = TDA10046_TS_SERIAL,
516 .xtal_freq = TDA10046_XTAL_16M,
517 .if_freq = TDA10046_FREQ_045,
518 .agc_config = TDA10046_AGC_TDA827X,
519 .gpio_config = TDA10046_GPTRI,
520 .request_firmware = NULL, /* uses firmware EEPROM */
523 static int tvwalkertwin_0_tda10046_frontend_attach(struct dvb_usb_adapter *adap)
525 deb_rc("tvwalkertwin_0_tda10046_frontend_attach!\n");
527 if ((adap->fe = dvb_attach(tda10046_attach, &tvwalkertwin_0_tda10046_config, &adap->dev->i2c_adap)) == NULL)
530 deb_rc("Attached demod 0 at address %02x\n", tvwalkertwin_0_tda10046_config.demod_address);
535 static int tvwalkertwin_1_tda10046_frontend_attach(struct dvb_usb_adapter *adap)
537 deb_rc("tvwalkertwin_1_tda10046_frontend_attach!\n");
539 if ((adap->fe = dvb_attach(tda10046_attach, &tvwalkertwin_1_tda10046_config, &adap->dev->i2c_adap)) == NULL)
542 deb_rc("Attached demod 1 at address %02x\n", tvwalkertwin_1_tda10046_config.demod_address);
547 static int tvwalkertwin_0_tda8275_tuner_attach(struct dvb_usb_adapter *adap)
551 deb_rc("tvwalkertwin_0_tda8275_tuner_attach!\n");
553 if (dvb_attach(tda827x_attach, adap->fe, address, &adap->dev->i2c_adap,
557 deb_rc("Attached tuner 0 at address %02x\n", address);
562 static int tvwalkertwin_1_tda8275_tuner_attach(struct dvb_usb_adapter *adap)
566 deb_rc("tvwalkertwin_1_tda8275_tuner_attach!\n");
568 if (dvb_attach(tda827x_attach, adap->fe, address, &adap->dev->i2c_adap,
572 deb_rc("Attached tuner 1 at address %02x\n", address);
577 static struct m9206_inits tvwalkertwin_rc_init [] = {
578 { M9206_RC_INIT2, 0x00 },
579 { M9206_RC_INIT1, 0xef },
583 { } /* terminating entry */
586 /* DVB USB Driver stuff */
587 static struct dvb_usb_device_properties megasky_properties;
588 static struct dvb_usb_device_properties digivox_mini_ii_properties;
589 static struct dvb_usb_device_properties tvwalkertwin_properties;
590 static struct m9206_inits megasky_rc_init [];
591 static struct m9206_inits tvwalkertwin_rc_init [];
593 static int m920x_probe(struct usb_interface *intf,
594 const struct usb_device_id *id)
596 struct dvb_usb_device *d;
597 struct usb_host_interface *alt;
599 struct m9206_inits *rc_init_seq = NULL;
600 int bInterfaceNumber = intf->cur_altsetting->desc.bInterfaceNumber;
602 deb_rc("Probing for m920x device at interface %d\n", bInterfaceNumber);
604 if (bInterfaceNumber == 0) {
605 /* Single-tuner device, or first interface on
609 if ((ret = dvb_usb_device_init(intf, &megasky_properties,
610 THIS_MODULE, &d)) == 0) {
611 rc_init_seq = megasky_rc_init;
615 if ((ret = dvb_usb_device_init(intf,
616 &digivox_mini_ii_properties, THIS_MODULE, &d)) == 0) {
617 /* No remote control, so no rc_init_seq */
621 /* This configures both tuners on the TV Walker Twin */
622 if ((ret = dvb_usb_device_init(intf, &tvwalkertwin_properties,
623 THIS_MODULE, &d)) == 0) {
624 rc_init_seq = tvwalkertwin_rc_init;
630 /* Another interface on a multi-tuner device */
632 /* The LifeView TV Walker Twin gets here, but struct
633 * tvwalkertwin_properties already configured both
634 * tuners, so there is nothing for us to do here
641 alt = usb_altnum_to_altsetting(intf, 1);
643 deb_rc("No alt found!\n");
647 ret = usb_set_interface(d->udev, alt->desc.bInterfaceNumber,
648 alt->desc.bAlternateSetting);
652 if ((ret = m9206_init(d, rc_init_seq)) != 0)
658 static struct usb_device_id m920x_table [] = {
659 { USB_DEVICE(USB_VID_MSI, USB_PID_MSI_MEGASKY580) },
660 { USB_DEVICE(USB_VID_ANUBIS_ELECTRONIC,
661 USB_PID_MSI_DIGI_VOX_MINI_II) },
662 { USB_DEVICE(USB_VID_ANUBIS_ELECTRONIC,
663 USB_PID_LIFEVIEW_TV_WALKER_TWIN_COLD) },
664 { USB_DEVICE(USB_VID_ANUBIS_ELECTRONIC,
665 USB_PID_LIFEVIEW_TV_WALKER_TWIN_WARM) },
666 { } /* Terminating entry */
668 MODULE_DEVICE_TABLE (usb, m920x_table);
670 static struct dvb_usb_device_properties megasky_properties = {
671 .caps = DVB_USB_IS_AN_I2C_ADAPTER,
673 .usb_ctrl = DEVICE_SPECIFIC,
674 .firmware = "dvb-usb-megasky-02.fw",
675 .download_firmware = m9206_firmware_download,
678 .rc_key_map = megasky_rc_keys,
679 .rc_key_map_size = ARRAY_SIZE(megasky_rc_keys),
680 .rc_query = m9206_rc_query,
682 .size_of_priv = sizeof(struct m9206_state),
684 .identify_state = m920x_identify_state,
687 .caps = DVB_USB_ADAP_HAS_PID_FILTER |
688 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
690 .pid_filter_count = 8,
691 .pid_filter = m9206_pid_filter,
692 .pid_filter_ctrl = m9206_pid_filter_ctrl,
694 .frontend_attach = megasky_mt352_frontend_attach,
695 .tuner_attach = megasky_qt1010_tuner_attach,
708 .i2c_algo = &m9206_i2c_algo,
710 .num_device_descs = 1,
712 { "MSI Mega Sky 580 DVB-T USB2.0",
713 { &m920x_table[0], NULL },
719 static struct dvb_usb_device_properties digivox_mini_ii_properties = {
720 .caps = DVB_USB_IS_AN_I2C_ADAPTER,
722 .usb_ctrl = DEVICE_SPECIFIC,
723 .firmware = "dvb-usb-digivox-02.fw",
724 .download_firmware = m9206_firmware_download,
726 .size_of_priv = sizeof(struct m9206_state),
728 .identify_state = m920x_identify_state,
731 .caps = DVB_USB_ADAP_HAS_PID_FILTER |
732 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
734 .pid_filter_count = 8,
735 .pid_filter = m9206_pid_filter,
736 .pid_filter_ctrl = m9206_pid_filter_ctrl,
738 .frontend_attach = digivox_tda10046_frontend_attach,
739 .tuner_attach = digivox_tda8275_tuner_attach,
747 .buffersize = 0x4000,
752 .i2c_algo = &m9206_i2c_algo,
754 .num_device_descs = 1,
756 { "MSI DIGI VOX mini II DVB-T USB2.0",
757 { &m920x_table[1], NULL },
763 /* LifeView TV Walker Twin support by Nick Andrew <nick@nick-andrew.net> */
765 static struct dvb_usb_device_properties tvwalkertwin_properties = {
766 .caps = DVB_USB_IS_AN_I2C_ADAPTER,
768 .usb_ctrl = DEVICE_SPECIFIC,
769 .firmware = "dvb-usb-tvwalkert.fw",
770 .download_firmware = m9206_firmware_download,
773 .rc_key_map = tvwalkertwin_rc_keys,
774 .rc_key_map_size = ARRAY_SIZE(tvwalkertwin_rc_keys),
775 .rc_query = m9206_rc_query,
777 .size_of_priv = sizeof(struct m9206_state),
779 .identify_state = m920x_identify_state,
783 .caps = DVB_USB_ADAP_HAS_PID_FILTER |
784 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
786 .pid_filter_count = 8,
787 .pid_filter = m9206_pid_filter,
788 .pid_filter_ctrl = m9206_pid_filter_ctrl,
790 .frontend_attach = tvwalkertwin_0_tda10046_frontend_attach,
791 .tuner_attach = tvwalkertwin_0_tda8275_tuner_attach,
805 .caps = DVB_USB_ADAP_HAS_PID_FILTER |
806 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
808 .pid_filter_count = 8,
809 .pid_filter = m9206_pid_filter,
810 .pid_filter_ctrl = m9206_pid_filter_ctrl,
812 .frontend_attach = tvwalkertwin_1_tda10046_frontend_attach,
813 .tuner_attach = tvwalkertwin_1_tda8275_tuner_attach,
827 .i2c_algo = &m9206_i2c_algo,
829 .num_device_descs = 1,
831 { .name = "LifeView TV Walker Twin DVB-T USB2.0",
832 .cold_ids = { &m920x_table[2], NULL },
833 .warm_ids = { &m920x_table[3], NULL },
838 static struct usb_driver m920x_driver = {
839 .name = "dvb_usb_m920x",
840 .probe = m920x_probe,
841 .disconnect = dvb_usb_device_exit,
842 .id_table = m920x_table,
846 static int __init m920x_module_init(void)
850 if ((ret = usb_register(&m920x_driver))) {
851 err("usb_register failed. Error number %d", ret);
858 static void __exit m920x_module_exit(void)
860 /* deregister this driver from the USB subsystem */
861 usb_deregister(&m920x_driver);
864 module_init (m920x_module_init);
865 module_exit (m920x_module_exit);
867 MODULE_AUTHOR("Aapo Tahkola <aet@rasterburn.org>");
868 MODULE_DESCRIPTION("DVB Driver for ULI M920x");
869 MODULE_VERSION("0.1");
870 MODULE_LICENSE("GPL");