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
7 * Free 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 inline int m9206_read(struct usb_device *udev, u8 request, u16 value,
26 u16 index, void *data, int size)
30 ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
31 request, USB_TYPE_VENDOR | USB_DIR_IN,
32 value, index, data, size, 2000);
34 printk(KERN_INFO "m920x_read = error: %d\n", ret);
39 deb_rc("m920x_read = no data\n");
46 static inline int m9206_write(struct usb_device *udev, u8 request,
51 ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
52 request, USB_TYPE_VENDOR | USB_DIR_OUT,
53 value, index, NULL, 0, 2000);
58 static int m9206_init(struct dvb_usb_device *d, struct m9206_inits *rc_seq)
62 /* Remote controller init. */
63 if (d->props.rc_query) {
64 deb_rc("Initialising remote control\n");
65 while (rc_seq->address) {
66 if ((ret = m9206_write(d->udev, M9206_CORE,
68 rc_seq->address)) != 0) {
69 deb_rc("Initialising remote control failed\n");
76 deb_rc("Initialising remote control success\n");
82 static int m9206_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
84 struct m9206_state *m = d->priv;
88 if ((ret = m9206_read(d->udev, M9206_CORE, 0x0, M9206_RC_STATE,
92 if ((ret = m9206_read(d->udev, M9206_CORE, 0x0, M9206_RC_KEY,
93 rc_state + 1, 1)) != 0)
96 for (i = 0; i < d->props.rc_key_map_size; i++)
97 if (d->props.rc_key_map[i].data == rc_state[1]) {
98 *event = d->props.rc_key_map[i].event;
100 switch(rc_state[0]) {
102 *state = REMOTE_NO_KEY_PRESSED;
105 case 0x88: /* framing error or "invalid code" */
109 *state = REMOTE_NO_KEY_PRESSED;
116 *state = REMOTE_KEY_PRESSED;
120 /* prevent immediate auto-repeat */
121 if (++m->rep_count > 2)
122 *state = REMOTE_KEY_REPEAT;
124 *state = REMOTE_NO_KEY_PRESSED;
128 deb_rc("Unexpected rc state %02x\n",
130 *state = REMOTE_NO_KEY_PRESSED;
135 if (rc_state[1] != 0)
136 deb_rc("Unknown rc key %02x\n", rc_state[1]);
138 *state = REMOTE_NO_KEY_PRESSED;
146 static int m9206_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
149 struct dvb_usb_device *d = i2c_get_adapdata(adap);
156 if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
159 for (i = 0; i < num; i++) {
160 if (msg[i].flags & (I2C_M_NO_RD_ACK | I2C_M_IGNORE_NAK |
161 I2C_M_TEN) || msg[i].len == 0) {
162 /* For a 0 byte message, I think sending the address
163 * to index 0x80|0x40 would be the correct thing to
164 * do. However, zero byte messages are only used for
165 * probing, and since we don't know how to get the
166 * slave's ack, we can't probe. */
170 /* Send START & address/RW bit */
171 if (!(msg[i].flags & I2C_M_NOSTART)) {
172 if ((ret = m9206_write(d->udev, M9206_I2C,
174 (msg[i].flags & I2C_M_RD ? 0x01 : 0),
177 /* Should check for ack here, if we knew how. */
179 if (msg[i].flags & I2C_M_RD) {
180 for (j = 0; j < msg[i].len; j++) {
181 /* Last byte of transaction?
182 * Send STOP, otherwise send ACK. */
183 int stop = (i+1 == num && j+1 == msg[i].len)
186 if ((ret = m9206_read(d->udev, M9206_I2C, 0x0,
188 &msg[i].buf[j], 1)) != 0)
192 for (j = 0; j < msg[i].len; j++) {
193 /* Last byte of transaction? Then send STOP. */
194 int stop = (i+1 == num && j+1 == msg[i].len)
197 if ((ret = m9206_write(d->udev, M9206_I2C,
201 /* Should check for ack here too. */
208 mutex_unlock(&d->i2c_mutex);
213 static u32 m9206_i2c_func(struct i2c_adapter *adapter)
218 static struct i2c_algorithm m9206_i2c_algo = {
219 .master_xfer = m9206_i2c_xfer,
220 .functionality = m9206_i2c_func,
224 static int m9206_set_filter(struct dvb_usb_adapter *adap,
225 int type, int idx, int pid)
234 if ((ret = m9206_write(adap->dev->udev, M9206_FILTER, pid,
235 (type << 8) | (idx * 4) )) != 0)
238 if ((ret = m9206_write(adap->dev->udev, M9206_FILTER, 0,
239 (type << 8) | (idx * 4) )) != 0)
245 static int m9206_update_filters(struct dvb_usb_adapter *adap)
247 struct m9206_state *m = adap->dev->priv;
248 int enabled = m->filtering_enabled;
249 int i, ret = 0, filter = 0;
251 for (i = 0; i < M9206_MAX_FILTERS; i++)
252 if (m->filters[i] == 8192)
255 /* Disable all filters */
256 if ((ret = m9206_set_filter(adap, 0x81, 1, enabled)) != 0)
259 for (i = 0; i < M9206_MAX_FILTERS; i++)
260 if ((ret = m9206_set_filter(adap, 0x81, i + 2, 0)) != 0)
263 if ((ret = m9206_set_filter(adap, 0x82, 0, 0x0)) != 0)
268 for (i = 0; i < M9206_MAX_FILTERS; i++) {
269 if (m->filters[i] == 0)
272 if ((ret = m9206_set_filter(adap, 0x81, filter + 2,
273 m->filters[i])) != 0)
280 if ((ret = m9206_set_filter(adap, 0x82, 0, 0x02f5)) != 0)
286 static int m9206_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff)
288 struct m9206_state *m = adap->dev->priv;
290 m->filtering_enabled = onoff ? 1 : 0;
292 return m9206_update_filters(adap);
295 static int m9206_pid_filter(struct dvb_usb_adapter *adap,
296 int index, u16 pid, int onoff)
298 struct m9206_state *m = adap->dev->priv;
300 m->filters[index] = onoff ? pid : 0;
302 return m9206_update_filters(adap);
305 static int m9206_firmware_download(struct usb_device *udev,
306 const struct firmware *fw)
308 u16 value, index, size;
310 int i, pass, ret = 0;
312 buff = kmalloc(65536, GFP_KERNEL);
314 if ((ret = m9206_read(udev, M9206_FILTER, 0x0, 0x8000, read, 4)) != 0)
316 deb_rc("%x %x %x %x\n", read[0], read[1], read[2], read[3]);
318 if ((ret = m9206_read(udev, M9206_FW, 0x0, 0x0, read, 1)) != 0)
320 deb_rc("%x\n", read[0]);
322 for (pass = 0; pass < 2; pass++) {
323 for (i = 0; i + (sizeof(u16) * 3) < fw->size;) {
324 value = le16_to_cpu(*(u16 *)(fw->data + i));
327 index = le16_to_cpu(*(u16 *)(fw->data + i));
330 size = le16_to_cpu(*(u16 *)(fw->data + i));
334 /* Will stall if using fw->data ... */
335 memcpy(buff, fw->data + i, size);
337 ret = usb_control_msg(udev, usb_sndctrlpipe(udev,0),
339 USB_TYPE_VENDOR | USB_DIR_OUT,
340 value, index, buff, size, 20);
342 deb_rc("error while uploading fw!\n");
351 deb_rc("bad firmware file!\n");
359 /* m9206 will disconnect itself from the bus after this. */
360 (void) m9206_write(udev, M9206_CORE, 0x01, M9206_FW_GO);
361 deb_rc("firmware uploaded!\n");
369 /* Callbacks for DVB USB */
370 static int m920x_identify_state(struct usb_device *udev,
371 struct dvb_usb_device_properties *props,
372 struct dvb_usb_device_description **desc,
375 struct usb_host_interface *alt;
377 alt = usb_altnum_to_altsetting(usb_ifnum_to_if(udev, 0), 1);
378 *cold = (alt == NULL) ? 1 : 0;
383 /* demod configurations */
384 static int m920x_mt352_demod_init(struct dvb_frontend *fe)
386 u8 config[] = { CONFIG, 0x3d };
387 u8 clock[] = { CLOCK_CTL, 0x30 };
388 u8 reset[] = { RESET, 0x80 };
389 u8 adc_ctl[] = { ADC_CTL_1, 0x40 };
390 u8 agc[] = { AGC_TARGET, 0x1c, 0x20 };
391 u8 sec_agc[] = { 0x69, 0x00, 0xff, 0xff, 0x40, 0xff, 0x00, 0x40, 0x40 };
392 u8 unk1[] = { 0x93, 0x1a };
393 u8 unk2[] = { 0xb5, 0x7a };
395 mt352_write(fe, config, ARRAY_SIZE(config));
396 mt352_write(fe, clock, ARRAY_SIZE(clock));
397 mt352_write(fe, reset, ARRAY_SIZE(reset));
398 mt352_write(fe, adc_ctl, ARRAY_SIZE(adc_ctl));
399 mt352_write(fe, agc, ARRAY_SIZE(agc));
400 mt352_write(fe, sec_agc, ARRAY_SIZE(sec_agc));
401 mt352_write(fe, unk1, ARRAY_SIZE(unk1));
402 mt352_write(fe, unk2, ARRAY_SIZE(unk2));
404 deb_rc("Demod init!\n");
409 static struct mt352_config m920x_mt352_config = {
410 .demod_address = 0x0f,
412 .demod_init = m920x_mt352_demod_init,
415 static struct tda1004x_config m920x_tda10046_08_config = {
416 .demod_address = 0x08,
419 .ts_mode = TDA10046_TS_SERIAL,
420 .xtal_freq = TDA10046_XTAL_16M,
421 .if_freq = TDA10046_FREQ_045,
422 .agc_config = TDA10046_AGC_TDA827X,
423 .gpio_config = TDA10046_GPTRI,
424 .request_firmware = NULL,
427 static struct tda1004x_config m920x_tda10046_0b_config = {
428 .demod_address = 0x0b,
431 .ts_mode = TDA10046_TS_SERIAL,
432 .xtal_freq = TDA10046_XTAL_16M,
433 .if_freq = TDA10046_FREQ_045,
434 .agc_config = TDA10046_AGC_TDA827X,
435 .gpio_config = TDA10046_GPTRI,
436 .request_firmware = NULL, /* uses firmware EEPROM */
439 /* tuner configurations */
440 static struct qt1010_config m920x_qt1010_config = {
444 /* Callbacks for DVB USB */
445 static int m920x_mt352_frontend_attach(struct dvb_usb_adapter *adap)
447 deb_rc("%s\n",__FUNCTION__);
449 if ((adap->fe = dvb_attach(mt352_attach, &m920x_mt352_config,
450 &adap->dev->i2c_adap)) == NULL)
456 static int m920x_tda10046_08_frontend_attach(struct dvb_usb_adapter *adap)
458 deb_rc("%s\n",__FUNCTION__);
460 if ((adap->fe = dvb_attach(tda10046_attach,
461 &m920x_tda10046_08_config,
462 &adap->dev->i2c_adap)) == NULL)
468 static int m920x_tda10046_0b_frontend_attach(struct dvb_usb_adapter *adap)
470 deb_rc("%s\n",__FUNCTION__);
472 if ((adap->fe = dvb_attach(tda10046_attach,
473 &m920x_tda10046_0b_config,
474 &adap->dev->i2c_adap)) == NULL)
480 static int m920x_qt1010_tuner_attach(struct dvb_usb_adapter *adap)
482 deb_rc("%s\n",__FUNCTION__);
484 if (dvb_attach(qt1010_attach, adap->fe, &adap->dev->i2c_adap,
485 &m920x_qt1010_config) == NULL)
491 static int m920x_tda8275_60_tuner_attach(struct dvb_usb_adapter *adap)
493 deb_rc("%s\n",__FUNCTION__);
495 if (dvb_attach(tda827x_attach, adap->fe, 0x60, &adap->dev->i2c_adap,
502 static int m920x_tda8275_61_tuner_attach(struct dvb_usb_adapter *adap)
504 deb_rc("%s\n",__FUNCTION__);
506 if (dvb_attach(tda827x_attach, adap->fe, 0x61, &adap->dev->i2c_adap,
513 /* device-specific initialization */
514 static struct m9206_inits megasky_rc_init [] = {
515 { M9206_RC_INIT2, 0xa8 },
516 { M9206_RC_INIT1, 0x51 },
517 { } /* terminating entry */
520 static struct m9206_inits tvwalkertwin_rc_init [] = {
521 { M9206_RC_INIT2, 0x00 },
522 { M9206_RC_INIT1, 0xef },
526 { } /* terminating entry */
530 static struct dvb_usb_rc_key megasky_rc_keys [] = {
531 { 0x0, 0x12, KEY_POWER },
532 { 0x0, 0x1e, KEY_CYCLEWINDOWS }, /* min/max */
533 { 0x0, 0x02, KEY_CHANNELUP },
534 { 0x0, 0x05, KEY_CHANNELDOWN },
535 { 0x0, 0x03, KEY_VOLUMEUP },
536 { 0x0, 0x06, KEY_VOLUMEDOWN },
537 { 0x0, 0x04, KEY_MUTE },
538 { 0x0, 0x07, KEY_OK }, /* TS */
539 { 0x0, 0x08, KEY_STOP },
540 { 0x0, 0x09, KEY_MENU }, /* swap */
541 { 0x0, 0x0a, KEY_REWIND },
542 { 0x0, 0x1b, KEY_PAUSE },
543 { 0x0, 0x1f, KEY_FASTFORWARD },
544 { 0x0, 0x0c, KEY_RECORD },
545 { 0x0, 0x0d, KEY_CAMERA }, /* screenshot */
546 { 0x0, 0x0e, KEY_COFFEE }, /* "MTS" */
549 static struct dvb_usb_rc_key tvwalkertwin_rc_keys [] = {
550 { 0x0, 0x01, KEY_ZOOM }, /* Full Screen */
551 { 0x0, 0x02, KEY_CAMERA }, /* snapshot */
552 { 0x0, 0x03, KEY_MUTE },
553 { 0x0, 0x04, KEY_REWIND },
554 { 0x0, 0x05, KEY_PLAYPAUSE }, /* Play/Pause */
555 { 0x0, 0x06, KEY_FASTFORWARD },
556 { 0x0, 0x07, KEY_RECORD },
557 { 0x0, 0x08, KEY_STOP },
558 { 0x0, 0x09, KEY_TIME }, /* Timeshift */
559 { 0x0, 0x0c, KEY_COFFEE }, /* Recall */
560 { 0x0, 0x0e, KEY_CHANNELUP },
561 { 0x0, 0x12, KEY_POWER },
562 { 0x0, 0x15, KEY_MENU }, /* source */
563 { 0x0, 0x18, KEY_CYCLEWINDOWS }, /* TWIN PIP */
564 { 0x0, 0x1a, KEY_CHANNELDOWN },
565 { 0x0, 0x1b, KEY_VOLUMEDOWN },
566 { 0x0, 0x1e, KEY_VOLUMEUP },
569 /* DVB USB Driver stuff */
570 static struct dvb_usb_device_properties megasky_properties;
571 static struct dvb_usb_device_properties digivox_mini_ii_properties;
572 static struct dvb_usb_device_properties tvwalkertwin_properties;
573 static struct dvb_usb_device_properties dposh_properties;
575 static int m920x_probe(struct usb_interface *intf,
576 const struct usb_device_id *id)
578 struct dvb_usb_device *d;
579 struct usb_host_interface *alt;
581 struct m9206_inits *rc_init_seq = NULL;
582 int bInterfaceNumber = intf->cur_altsetting->desc.bInterfaceNumber;
584 deb_rc("Probing for m920x device at interface %d\n", bInterfaceNumber);
586 if (bInterfaceNumber == 0) {
587 /* Single-tuner device, or first interface on
591 if ((ret = dvb_usb_device_init(intf, &megasky_properties,
592 THIS_MODULE, &d)) == 0) {
593 rc_init_seq = megasky_rc_init;
597 if ((ret = dvb_usb_device_init(intf,
598 &digivox_mini_ii_properties,
599 THIS_MODULE, &d)) == 0) {
600 /* No remote control, so no rc_init_seq */
604 /* This configures both tuners on the TV Walker Twin */
605 if ((ret = dvb_usb_device_init(intf, &tvwalkertwin_properties,
606 THIS_MODULE, &d)) == 0) {
607 rc_init_seq = tvwalkertwin_rc_init;
611 if ((ret = dvb_usb_device_init(intf, &dposh_properties,
612 THIS_MODULE, &d)) == 0) {
613 /* Remote controller not supported yet. */
619 /* Another interface on a multi-tuner device */
621 /* The LifeView TV Walker Twin gets here, but struct
622 * tvwalkertwin_properties already configured both
623 * tuners, so there is nothing for us to do here
630 alt = usb_altnum_to_altsetting(intf, 1);
632 deb_rc("No alt found!\n");
636 ret = usb_set_interface(d->udev, alt->desc.bInterfaceNumber,
637 alt->desc.bAlternateSetting);
641 if ((ret = m9206_init(d, rc_init_seq)) != 0)
647 static struct usb_device_id m920x_table [] = {
648 { USB_DEVICE(USB_VID_MSI, USB_PID_MSI_MEGASKY580) },
649 { USB_DEVICE(USB_VID_ANUBIS_ELECTRONIC,
650 USB_PID_MSI_DIGI_VOX_MINI_II) },
651 { USB_DEVICE(USB_VID_ANUBIS_ELECTRONIC,
652 USB_PID_LIFEVIEW_TV_WALKER_TWIN_COLD) },
653 { USB_DEVICE(USB_VID_ANUBIS_ELECTRONIC,
654 USB_PID_LIFEVIEW_TV_WALKER_TWIN_WARM) },
655 { USB_DEVICE(USB_VID_DPOSH, USB_PID_DPOSH_M9206_COLD) },
656 { USB_DEVICE(USB_VID_DPOSH, USB_PID_DPOSH_M9206_WARM) },
657 { } /* Terminating entry */
659 MODULE_DEVICE_TABLE (usb, m920x_table);
661 static struct dvb_usb_device_properties megasky_properties = {
662 .caps = DVB_USB_IS_AN_I2C_ADAPTER,
664 .usb_ctrl = DEVICE_SPECIFIC,
665 .firmware = "dvb-usb-megasky-02.fw",
666 .download_firmware = m9206_firmware_download,
669 .rc_key_map = megasky_rc_keys,
670 .rc_key_map_size = ARRAY_SIZE(megasky_rc_keys),
671 .rc_query = m9206_rc_query,
673 .size_of_priv = sizeof(struct m9206_state),
675 .identify_state = m920x_identify_state,
678 .caps = DVB_USB_ADAP_HAS_PID_FILTER |
679 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
681 .pid_filter_count = 8,
682 .pid_filter = m9206_pid_filter,
683 .pid_filter_ctrl = m9206_pid_filter_ctrl,
685 .frontend_attach = m920x_mt352_frontend_attach,
686 .tuner_attach = m920x_qt1010_tuner_attach,
699 .i2c_algo = &m9206_i2c_algo,
701 .num_device_descs = 1,
703 { "MSI Mega Sky 580 DVB-T USB2.0",
704 { &m920x_table[0], NULL },
710 static struct dvb_usb_device_properties digivox_mini_ii_properties = {
711 .caps = DVB_USB_IS_AN_I2C_ADAPTER,
713 .usb_ctrl = DEVICE_SPECIFIC,
714 .firmware = "dvb-usb-digivox-02.fw",
715 .download_firmware = m9206_firmware_download,
717 .size_of_priv = sizeof(struct m9206_state),
719 .identify_state = m920x_identify_state,
722 .caps = DVB_USB_ADAP_HAS_PID_FILTER |
723 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
725 .pid_filter_count = 8,
726 .pid_filter = m9206_pid_filter,
727 .pid_filter_ctrl = m9206_pid_filter_ctrl,
729 .frontend_attach = m920x_tda10046_08_frontend_attach,
730 .tuner_attach = m920x_tda8275_60_tuner_attach,
738 .buffersize = 0x4000,
743 .i2c_algo = &m9206_i2c_algo,
745 .num_device_descs = 1,
747 { "MSI DIGI VOX mini II DVB-T USB2.0",
748 { &m920x_table[1], NULL },
754 /* LifeView TV Walker Twin support by Nick Andrew <nick@nick-andrew.net>
756 * LifeView TV Walker Twin has 1 x M9206, 2 x TDA10046, 2 x TDA8275A
757 * TDA10046 #0 is located at i2c address 0x08
758 * TDA10046 #1 is located at i2c address 0x0b
759 * TDA8275A #0 is located at i2c address 0x60
760 * TDA8275A #1 is located at i2c address 0x61
762 static struct dvb_usb_device_properties tvwalkertwin_properties = {
763 .caps = DVB_USB_IS_AN_I2C_ADAPTER,
765 .usb_ctrl = DEVICE_SPECIFIC,
766 .firmware = "dvb-usb-tvwalkert.fw",
767 .download_firmware = m9206_firmware_download,
770 .rc_key_map = tvwalkertwin_rc_keys,
771 .rc_key_map_size = ARRAY_SIZE(tvwalkertwin_rc_keys),
772 .rc_query = m9206_rc_query,
774 .size_of_priv = sizeof(struct m9206_state),
776 .identify_state = m920x_identify_state,
779 .caps = DVB_USB_ADAP_HAS_PID_FILTER |
780 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
782 .pid_filter_count = 8,
783 .pid_filter = m9206_pid_filter,
784 .pid_filter_ctrl = m9206_pid_filter_ctrl,
786 .frontend_attach = m920x_tda10046_08_frontend_attach,
787 .tuner_attach = m920x_tda8275_60_tuner_attach,
799 .caps = DVB_USB_ADAP_HAS_PID_FILTER |
800 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
802 .pid_filter_count = 8,
803 .pid_filter = m9206_pid_filter,
804 .pid_filter_ctrl = m9206_pid_filter_ctrl,
806 .frontend_attach = m920x_tda10046_0b_frontend_attach,
807 .tuner_attach = m920x_tda8275_61_tuner_attach,
820 .i2c_algo = &m9206_i2c_algo,
822 .num_device_descs = 1,
824 { .name = "LifeView TV Walker Twin DVB-T USB2.0",
825 .cold_ids = { &m920x_table[2], NULL },
826 .warm_ids = { &m920x_table[3], NULL },
831 static struct dvb_usb_device_properties dposh_properties = {
832 .caps = DVB_USB_IS_AN_I2C_ADAPTER,
834 .usb_ctrl = DEVICE_SPECIFIC,
835 .firmware = "dvb-usb-dposh-01.fw",
836 .download_firmware = m9206_firmware_download,
838 .size_of_priv = sizeof(struct m9206_state),
840 .identify_state = m920x_identify_state,
843 /* Hardware pid filters don't work with this device/firmware */
845 .frontend_attach = m920x_mt352_frontend_attach,
846 .tuner_attach = m920x_qt1010_tuner_attach,
859 .i2c_algo = &m9206_i2c_algo,
861 .num_device_descs = 1,
863 { .name = "Dposh DVB-T USB2.0",
864 .cold_ids = { &m920x_table[4], NULL },
865 .warm_ids = { &m920x_table[5], NULL },
870 static struct usb_driver m920x_driver = {
871 .name = "dvb_usb_m920x",
872 .probe = m920x_probe,
873 .disconnect = dvb_usb_device_exit,
874 .id_table = m920x_table,
878 static int __init m920x_module_init(void)
882 if ((ret = usb_register(&m920x_driver))) {
883 err("usb_register failed. Error number %d", ret);
890 static void __exit m920x_module_exit(void)
892 /* deregister this driver from the USB subsystem */
893 usb_deregister(&m920x_driver);
896 module_init (m920x_module_init);
897 module_exit (m920x_module_exit);
899 MODULE_AUTHOR("Aapo Tahkola <aet@rasterburn.org>");
900 MODULE_DESCRIPTION("DVB Driver for ULI M920x");
901 MODULE_VERSION("0.1");
902 MODULE_LICENSE("GPL");