1 /* DVB USB framework compliant Linux driver for the
2 * DVBWorld DVB-S 2101, 2102, DVB-S2 2104 Card
4 * Copyright (C) 2008 Igor M. Liplianin (liplianin@me.by)
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, version 2.
10 * see Documentation/dvb/README.dvb-usb for more information
21 #ifndef USB_PID_DW2102
22 #define USB_PID_DW2102 0x2102
25 #ifndef USB_PID_DW2104
26 #define USB_PID_DW2104 0x2104
29 #ifndef USB_PID_CINERGY_S
30 #define USB_PID_CINERGY_S 0x0064
33 #define DW210X_READ_MSG 0
34 #define DW210X_WRITE_MSG 1
36 #define REG_1F_SYMBOLRATE_BYTE0 0x1f
37 #define REG_20_SYMBOLRATE_BYTE1 0x20
38 #define REG_21_SYMBOLRATE_BYTE2 0x21
40 #define DW2102_VOLTAGE_CTRL (0x1800)
41 #define DW2102_RC_QUERY (0x1a00)
46 struct dw210x_rc_keys {
52 static int dvb_usb_dw2102_debug;
53 module_param_named(debug, dvb_usb_dw2102_debug, int, 0644);
54 MODULE_PARM_DESC(debug, "set debugging level (1=info 2=xfer (or-able))." DVB_USB_DEBUG_STATUS);
56 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
58 static int dw210x_op_rw(struct usb_device *dev, u8 request, u16 value,
59 u16 index, u8 * data, u16 len, int flags)
64 unsigned int pipe = (flags == DW210X_READ_MSG) ?
65 usb_rcvctrlpipe(dev, 0) : usb_sndctrlpipe(dev, 0);
66 u8 request_type = (flags == DW210X_READ_MSG) ? USB_DIR_IN : USB_DIR_OUT;
68 if (flags == DW210X_WRITE_MSG)
69 memcpy(u8buf, data, len);
70 ret = usb_control_msg(dev, pipe, request, request_type | USB_TYPE_VENDOR,
71 value, index , u8buf, len, 2000);
73 if (flags == DW210X_READ_MSG)
74 memcpy(data, u8buf, len);
79 static int dw2102_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
82 struct dvb_usb_device *d = i2c_get_adapdata(adap);
84 u8 buf6[] = {0x2c, 0x05, 0xc0, 0, 0, 0, 0};
89 if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
94 /* read stv0299 register */
95 value = msg[0].buf[0];/* register */
96 for (i = 0; i < msg[1].len; i++) {
98 ret = dw210x_op_rw(d->udev, 0xb5, value, 0,
99 buf6, 2, DW210X_READ_MSG);
100 msg[1].buf[i] = buf6[0];
104 switch (msg[0].addr) {
106 /* write to stv0299 register */
108 buf6[1] = msg[0].buf[0];
109 buf6[2] = msg[0].buf[1];
110 ret = dw210x_op_rw(d->udev, 0xb2, 0, 0,
111 buf6, 3, DW210X_WRITE_MSG);
114 if (msg[0].flags == 0) {
115 /* write to tuner pll */
119 buf6[3] = msg[0].buf[0];
120 buf6[4] = msg[0].buf[1];
121 buf6[5] = msg[0].buf[2];
122 buf6[6] = msg[0].buf[3];
123 ret = dw210x_op_rw(d->udev, 0xb2, 0, 0,
124 buf6, 7, DW210X_WRITE_MSG);
126 /* read from tuner */
127 ret = dw210x_op_rw(d->udev, 0xb5, 0, 0,
128 buf6, 1, DW210X_READ_MSG);
129 msg[0].buf[0] = buf6[0];
132 case (DW2102_RC_QUERY):
133 ret = dw210x_op_rw(d->udev, 0xb8, 0, 0,
134 buf6, 2, DW210X_READ_MSG);
135 msg[0].buf[0] = buf6[0];
136 msg[0].buf[1] = buf6[1];
138 case (DW2102_VOLTAGE_CTRL):
140 buf6[1] = msg[0].buf[0];
141 ret = dw210x_op_rw(d->udev, 0xb2, 0, 0,
142 buf6, 2, DW210X_WRITE_MSG);
149 mutex_unlock(&d->i2c_mutex);
153 static int dw2102_serit_i2c_transfer(struct i2c_adapter *adap,
154 struct i2c_msg msg[], int num)
156 struct dvb_usb_device *d = i2c_get_adapdata(adap);
158 u8 buf6[] = {0, 0, 0, 0, 0, 0, 0};
162 if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
167 /* read si2109 register by number */
169 buf6[1] = msg[0].len;
170 buf6[2] = msg[0].buf[0];
171 ret = dw210x_op_rw(d->udev, 0xc2, 0, 0,
172 buf6, msg[0].len + 2, DW210X_WRITE_MSG);
173 /* read si2109 register */
174 ret = dw210x_op_rw(d->udev, 0xc3, 0xd0, 0,
175 buf6, msg[1].len + 2, DW210X_READ_MSG);
176 memcpy(msg[1].buf, buf6 + 2, msg[1].len);
180 switch (msg[0].addr) {
182 /* write to si2109 register */
184 buf6[1] = msg[0].len;
185 memcpy(buf6 + 2, msg[0].buf, msg[0].len);
186 ret = dw210x_op_rw(d->udev, 0xc2, 0, 0, buf6,
187 msg[0].len + 2, DW210X_WRITE_MSG);
189 case(DW2102_RC_QUERY):
190 ret = dw210x_op_rw(d->udev, 0xb8, 0, 0,
191 buf6, 2, DW210X_READ_MSG);
192 msg[0].buf[0] = buf6[0];
193 msg[0].buf[1] = buf6[1];
195 case(DW2102_VOLTAGE_CTRL):
197 buf6[1] = msg[0].buf[0];
198 ret = dw210x_op_rw(d->udev, 0xb2, 0, 0,
199 buf6, 2, DW210X_WRITE_MSG);
205 mutex_unlock(&d->i2c_mutex);
208 static int dw2102_earda_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], int num)
210 struct dvb_usb_device *d = i2c_get_adapdata(adap);
215 if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
221 /* first write first register number */
222 u8 ibuf [msg[1].len + 2], obuf[3];
224 obuf[1] = msg[0].len;
225 obuf[2] = msg[0].buf[0];
226 ret = dw210x_op_rw(d->udev, 0xc2, 0, 0,
227 obuf, msg[0].len + 2, DW210X_WRITE_MSG);
228 /* second read registers */
229 ret = dw210x_op_rw(d->udev, 0xc3, 0xd1 , 0,
230 ibuf, msg[1].len + 2, DW210X_READ_MSG);
231 memcpy(msg[1].buf, ibuf + 2, msg[1].len);
236 switch (msg[0].addr) {
238 /* write to register */
239 u8 obuf[msg[0].len + 2];
241 obuf[1] = msg[0].len;
242 memcpy(obuf + 2, msg[0].buf, msg[0].len);
243 ret = dw210x_op_rw(d->udev, 0xc2, 0, 0,
244 obuf, msg[0].len + 2, DW210X_WRITE_MSG);
249 u8 obuf[msg[0].len + 2];
251 obuf[1] = msg[0].len;
252 memcpy(obuf + 2, msg[0].buf, msg[0].len);
253 ret = dw210x_op_rw(d->udev, 0xc2, 0, 0,
254 obuf, msg[0].len + 2, DW210X_WRITE_MSG);
257 case(DW2102_RC_QUERY): {
259 ret = dw210x_op_rw(d->udev, 0xb8, 0, 0,
260 ibuf, 2, DW210X_READ_MSG);
261 memcpy(msg[0].buf, ibuf , 2);
264 case(DW2102_VOLTAGE_CTRL): {
267 obuf[1] = msg[0].buf[0];
268 ret = dw210x_op_rw(d->udev, 0xb2, 0, 0,
269 obuf, 2, DW210X_WRITE_MSG);
277 mutex_unlock(&d->i2c_mutex);
281 static int dw2104_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], int num)
283 struct dvb_usb_device *d = i2c_get_adapdata(adap);
289 if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
295 /* first write first register number */
296 u8 ibuf [msg[1].len + 2], obuf[3];
298 obuf[1] = msg[0].len;
299 obuf[2] = msg[0].buf[0];
300 ret = dw210x_op_rw(d->udev, 0xc2, 0, 0,
301 obuf, msg[0].len + 2, DW210X_WRITE_MSG);
302 /* second read registers */
303 ret = dw210x_op_rw(d->udev, 0xc3, 0xab , 0,
304 ibuf, msg[1].len + 2, DW210X_READ_MSG);
305 memcpy(msg[1].buf, ibuf + 2, msg[1].len);
310 switch (msg[0].addr) {
312 if (msg[0].buf[0] == 0xf7) {
314 /* Write in small blocks */
319 len = msg[0].len - 1;
322 memcpy(obuf + 3, msg[0].buf + i, (len > 16 ? 16 : len));
323 ret = dw210x_op_rw(d->udev, 0xc2, 0, 0,
324 obuf, (len > 16 ? 16 : len) + 3, DW210X_WRITE_MSG);
329 /* write to register */
330 u8 obuf[msg[0].len + 2];
332 obuf[1] = msg[0].len;
333 memcpy(obuf + 2, msg[0].buf, msg[0].len);
334 ret = dw210x_op_rw(d->udev, 0xc2, 0, 0,
335 obuf, msg[0].len + 2, DW210X_WRITE_MSG);
339 case(DW2102_RC_QUERY): {
341 ret = dw210x_op_rw(d->udev, 0xb8, 0, 0,
342 ibuf, 2, DW210X_READ_MSG);
343 memcpy(msg[0].buf, ibuf , 2);
346 case(DW2102_VOLTAGE_CTRL): {
349 obuf[1] = msg[0].buf[0];
350 ret = dw210x_op_rw(d->udev, 0xb2, 0, 0,
351 obuf, 2, DW210X_WRITE_MSG);
359 mutex_unlock(&d->i2c_mutex);
363 static u32 dw210x_i2c_func(struct i2c_adapter *adapter)
368 static struct i2c_algorithm dw2102_i2c_algo = {
369 .master_xfer = dw2102_i2c_transfer,
370 .functionality = dw210x_i2c_func,
373 static struct i2c_algorithm dw2102_serit_i2c_algo = {
374 .master_xfer = dw2102_serit_i2c_transfer,
375 .functionality = dw210x_i2c_func,
378 static struct i2c_algorithm dw2102_earda_i2c_algo = {
379 .master_xfer = dw2102_earda_i2c_transfer,
380 .functionality = dw210x_i2c_func,
383 static struct i2c_algorithm dw2104_i2c_algo = {
384 .master_xfer = dw2104_i2c_transfer,
385 .functionality = dw210x_i2c_func,
388 static int dw210x_read_mac_address(struct dvb_usb_device *d, u8 mac[6])
392 u8 eeprom[256], eepromline[16];
394 for (i = 0; i < 256; i++) {
395 if (dw210x_op_rw(d->udev, 0xb6, 0xa0 , i, ibuf, 2, DW210X_READ_MSG) < 0) {
396 err("read eeprom failed.");
399 eepromline[i%16] = ibuf[0];
402 if ((i % 16) == 15) {
403 deb_xfer("%02x: ", i - 15);
404 debug_dump(eepromline, 16, deb_xfer);
407 memcpy(mac, eeprom + 8, 6);
411 static int dw210x_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
413 static u8 command_13v[1] = {0x00};
414 static u8 command_18v[1] = {0x01};
415 struct i2c_msg msg[] = {
416 {.addr = DW2102_VOLTAGE_CTRL, .flags = 0,
417 .buf = command_13v, .len = 1},
420 struct dvb_usb_adapter *udev_adap =
421 (struct dvb_usb_adapter *)(fe->dvb->priv);
422 if (voltage == SEC_VOLTAGE_18)
423 msg[0].buf = command_18v;
424 i2c_transfer(&udev_adap->dev->i2c_adap, msg, 1);
428 static struct stv0299_config sharp_z0194a_config = {
429 .demod_address = 0x68,
430 .inittab = sharp_z0194a_inittab,
434 .lock_output = STV0299_LOCKOUTPUT_1,
435 .volt13_op0_op1 = STV0299_VOLT13_OP1,
437 .set_symbol_rate = sharp_z0194a_set_symbol_rate,
440 static struct cx24116_config dw2104_config = {
441 .demod_address = 0x55,
442 .mpg_clk_pos_pol = 0x01,
445 static struct si21xx_config serit_sp1511lhb_config = {
446 .demod_address = 0x68,
451 static int dw2104_frontend_attach(struct dvb_usb_adapter *d)
453 if ((d->fe = dvb_attach(cx24116_attach, &dw2104_config,
454 &d->dev->i2c_adap)) != NULL) {
455 d->fe->ops.set_voltage = dw210x_set_voltage;
456 info("Attached cx24116!\n");
462 static struct dvb_usb_device_properties dw2102_properties;
464 static int dw2102_frontend_attach(struct dvb_usb_adapter *d)
466 if (dw2102_properties.i2c_algo == &dw2102_serit_i2c_algo) {
467 /*dw2102_properties.adapter->tuner_attach = NULL;*/
468 d->fe = dvb_attach(si21xx_attach, &serit_sp1511lhb_config,
471 d->fe->ops.set_voltage = dw210x_set_voltage;
472 info("Attached si21xx!\n");
476 if (dw2102_properties.i2c_algo == &dw2102_earda_i2c_algo) {
477 /*dw2102_properties.adapter->tuner_attach = dw2102_tuner_attach;*/
478 d->fe = dvb_attach(stv0288_attach, &earda_config,
481 d->fe->ops.set_voltage = dw210x_set_voltage;
482 info("Attached stv0288!\n");
487 if (dw2102_properties.i2c_algo == &dw2102_i2c_algo) {
488 /*dw2102_properties.adapter->tuner_attach = dw2102_tuner_attach;*/
489 d->fe = dvb_attach(stv0299_attach, &sharp_z0194a_config,
492 d->fe->ops.set_voltage = dw210x_set_voltage;
493 info("Attached stv0299!\n");
500 static int dw2102_tuner_attach(struct dvb_usb_adapter *adap)
502 dvb_attach(dvb_pll_attach, adap->fe, 0x60,
503 &adap->dev->i2c_adap, DVB_PLL_OPERA1);
507 static int dw2102_earda_tuner_attach(struct dvb_usb_adapter *adap)
509 dvb_attach(stb6000_attach, adap->fe, 0x61,
510 &adap->dev->i2c_adap);
515 static struct dvb_usb_rc_key dw210x_rc_keys[] = {
516 { 0xf8, 0x0a, KEY_Q }, /*power*/
517 { 0xf8, 0x0c, KEY_M }, /*mute*/
518 { 0xf8, 0x11, KEY_1 },
519 { 0xf8, 0x12, KEY_2 },
520 { 0xf8, 0x13, KEY_3 },
521 { 0xf8, 0x14, KEY_4 },
522 { 0xf8, 0x15, KEY_5 },
523 { 0xf8, 0x16, KEY_6 },
524 { 0xf8, 0x17, KEY_7 },
525 { 0xf8, 0x18, KEY_8 },
526 { 0xf8, 0x19, KEY_9 },
527 { 0xf8, 0x10, KEY_0 },
528 { 0xf8, 0x1c, KEY_PAGEUP }, /*ch+*/
529 { 0xf8, 0x0f, KEY_PAGEDOWN }, /*ch-*/
530 { 0xf8, 0x1a, KEY_O }, /*vol+*/
531 { 0xf8, 0x0e, KEY_Z }, /*vol-*/
532 { 0xf8, 0x04, KEY_R }, /*rec*/
533 { 0xf8, 0x09, KEY_D }, /*fav*/
534 { 0xf8, 0x08, KEY_BACKSPACE }, /*rewind*/
535 { 0xf8, 0x07, KEY_A }, /*fast*/
536 { 0xf8, 0x0b, KEY_P }, /*pause*/
537 { 0xf8, 0x02, KEY_ESC }, /*cancel*/
538 { 0xf8, 0x03, KEY_G }, /*tab*/
539 { 0xf8, 0x00, KEY_UP }, /*up*/
540 { 0xf8, 0x1f, KEY_ENTER }, /*ok*/
541 { 0xf8, 0x01, KEY_DOWN }, /*down*/
542 { 0xf8, 0x05, KEY_C }, /*cap*/
543 { 0xf8, 0x06, KEY_S }, /*stop*/
544 { 0xf8, 0x40, KEY_F }, /*full*/
545 { 0xf8, 0x1e, KEY_W }, /*tvmode*/
546 { 0xf8, 0x1b, KEY_B }, /*recall*/
552 static int dw2102_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
554 struct dw210x_state *st = d->priv;
556 struct i2c_msg msg[] = {
557 {.addr = DW2102_RC_QUERY, .flags = I2C_M_RD, .buf = key,
562 *state = REMOTE_NO_KEY_PRESSED;
563 if (dw2102_i2c_transfer(&d->i2c_adap, msg, 1) == 1) {
564 for (i = 0; i < ARRAY_SIZE(dw210x_rc_keys); i++) {
565 if (dw210x_rc_keys[i].data == msg[0].buf[0]) {
566 *state = REMOTE_KEY_PRESSED;
567 *event = dw210x_rc_keys[i].event;
568 st->last_key_pressed =
569 dw210x_rc_keys[i].event;
572 st->last_key_pressed = 0;
575 /* info("key: %x %x\n",key[0],key[1]); */
579 static struct usb_device_id dw2102_table[] = {
580 {USB_DEVICE(USB_VID_CYPRESS, USB_PID_DW2102)},
581 {USB_DEVICE(USB_VID_CYPRESS, 0x2101)},
582 {USB_DEVICE(USB_VID_CYPRESS, 0x2104)},
583 {USB_DEVICE(0x9022, 0xd650)},
584 {USB_DEVICE(USB_VID_TERRATEC, USB_PID_CINERGY_S)},
588 MODULE_DEVICE_TABLE(usb, dw2102_table);
590 static int dw2102_load_firmware(struct usb_device *dev,
591 const struct firmware *frmwr)
596 u8 reset16[] = {0, 0, 0, 0, 0, 0, 0};
597 const struct firmware *fw;
598 const char *filename = "dvb-usb-dw2101.fw";
599 switch (dev->descriptor.idProduct) {
601 ret = request_firmware(&fw, filename, &dev->dev);
603 err("did not find the firmware file. (%s) "
604 "Please see linux/Documentation/dvb/ for more details "
605 "on firmware-problems.", filename);
613 info("start downloading DW210X firmware");
614 p = kmalloc(fw->size, GFP_KERNEL);
617 dw210x_op_rw(dev, 0xa0, 0x7f92, 0, &reset, 1, DW210X_WRITE_MSG);
618 dw210x_op_rw(dev, 0xa0, 0xe600, 0, &reset, 1, DW210X_WRITE_MSG);
621 memcpy(p, fw->data, fw->size);
622 for (i = 0; i < fw->size; i += 0x40) {
624 if (dw210x_op_rw(dev, 0xa0, i, 0, b , 0x40,
625 DW210X_WRITE_MSG) != 0x40) {
626 err("error while transferring firmware");
631 /* restart the CPU */
633 if (ret || dw210x_op_rw(dev, 0xa0, 0x7f92, 0, &reset, 1,
634 DW210X_WRITE_MSG) != 1) {
635 err("could not restart the USB controller CPU.");
638 if (ret || dw210x_op_rw(dev, 0xa0, 0xe600, 0, &reset, 1,
639 DW210X_WRITE_MSG) != 1) {
640 err("could not restart the USB controller CPU.");
644 switch (dev->descriptor.idProduct) {
648 dw210x_op_rw(dev, 0xc4, 0x0000, 0, &reset, 1,
651 dw210x_op_rw(dev, 0xbf, 0x0040, 0, &reset, 0,
654 case USB_PID_CINERGY_S:
656 dw210x_op_rw(dev, 0xbf, 0x0040, 0, &reset, 0,
658 dw210x_op_rw(dev, 0xb9, 0x0000, 0, &reset16[0], 2,
660 /* check STV0299 frontend */
661 dw210x_op_rw(dev, 0xb5, 0, 0, &reset16[0], 2,
663 if ((reset16[0] == 0xa1) || (reset16[0] == 0x80)) {
664 dw2102_properties.i2c_algo = &dw2102_i2c_algo;
665 dw2102_properties.adapter->tuner_attach = &dw2102_tuner_attach;
668 /* check STV0288 frontend */
672 dw210x_op_rw(dev, 0xc2, 0, 0, &reset16[0], 3,
674 dw210x_op_rw(dev, 0xc3, 0xd1, 0, &reset16[0], 3,
676 if (reset16[2] == 0x11) {
677 dw2102_properties.i2c_algo = &dw2102_earda_i2c_algo;
678 dw2102_properties.adapter->tuner_attach = &dw2102_earda_tuner_attach;
683 dw210x_op_rw(dev, 0xbc, 0x0030, 0, &reset16[0], 2,
685 dw210x_op_rw(dev, 0xba, 0x0000, 0, &reset16[0], 7,
687 dw210x_op_rw(dev, 0xba, 0x0000, 0, &reset16[0], 7,
689 dw210x_op_rw(dev, 0xb9, 0x0000, 0, &reset16[0], 2,
699 static struct dvb_usb_device_properties dw2102_properties = {
700 .caps = DVB_USB_IS_AN_I2C_ADAPTER,
701 .usb_ctrl = DEVICE_SPECIFIC,
702 .firmware = "dvb-usb-dw2102.fw",
703 .size_of_priv = sizeof(struct dw210x_state),
706 .i2c_algo = &dw2102_serit_i2c_algo,
707 .rc_key_map = dw210x_rc_keys,
708 .rc_key_map_size = ARRAY_SIZE(dw210x_rc_keys),
710 .rc_query = dw2102_rc_query,
712 .generic_bulk_ctrl_endpoint = 0x81,
713 /* parameter for the MPEG2-data transfer */
715 .download_firmware = dw2102_load_firmware,
716 .read_mac_address = dw210x_read_mac_address,
719 .frontend_attach = dw2102_frontend_attach,
720 .streaming_ctrl = NULL,
721 .tuner_attach = NULL,
734 .num_device_descs = 3,
736 {"DVBWorld DVB-S 2102 USB2.0",
737 {&dw2102_table[0], NULL},
740 {"DVBWorld DVB-S 2101 USB2.0",
741 {&dw2102_table[1], NULL},
744 {"TerraTec Cinergy S USB",
745 {&dw2102_table[4], NULL},
751 static struct dvb_usb_device_properties dw2104_properties = {
752 .caps = DVB_USB_IS_AN_I2C_ADAPTER,
753 .usb_ctrl = DEVICE_SPECIFIC,
754 .firmware = "dvb-usb-dw2104.fw",
755 .size_of_priv = sizeof(struct dw210x_state),
758 .i2c_algo = &dw2104_i2c_algo,
759 .rc_key_map = dw210x_rc_keys,
760 .rc_key_map_size = ARRAY_SIZE(dw210x_rc_keys),
762 .rc_query = dw2102_rc_query,
764 .generic_bulk_ctrl_endpoint = 0x81,
765 /* parameter for the MPEG2-data transfer */
767 .download_firmware = dw2102_load_firmware,
768 .read_mac_address = dw210x_read_mac_address,
771 .frontend_attach = dw2104_frontend_attach,
772 .streaming_ctrl = NULL,
773 /*.tuner_attach = dw2104_tuner_attach,*/
786 .num_device_descs = 2,
788 { "DVBWorld DW2104 USB2.0",
789 {&dw2102_table[2], NULL},
792 { "TeVii S650 USB2.0",
793 {&dw2102_table[3], NULL},
799 static int dw2102_probe(struct usb_interface *intf,
800 const struct usb_device_id *id)
802 if (0 == dvb_usb_device_init(intf, &dw2102_properties,
803 THIS_MODULE, NULL, adapter_nr) ||
804 0 == dvb_usb_device_init(intf, &dw2104_properties,
805 THIS_MODULE, NULL, adapter_nr)) {
811 static struct usb_driver dw2102_driver = {
813 .probe = dw2102_probe,
814 .disconnect = dvb_usb_device_exit,
815 .id_table = dw2102_table,
818 static int __init dw2102_module_init(void)
820 int ret = usb_register(&dw2102_driver);
822 err("usb_register failed. Error number %d", ret);
827 static void __exit dw2102_module_exit(void)
829 usb_deregister(&dw2102_driver);
832 module_init(dw2102_module_init);
833 module_exit(dw2102_module_exit);
835 MODULE_AUTHOR("Igor M. Liplianin (c) liplianin@me.by");
836 MODULE_DESCRIPTION("Driver for DVBWorld DVB-S 2101, 2102, DVB-S2 2104 USB2.0 device");
837 MODULE_VERSION("0.1");
838 MODULE_LICENSE("GPL");