blob: 130d2960ddf5a3e7c10f9e15b9c745131da02233 [file] [log] [blame]
Patrick Boettcherbc2e3912006-12-02 21:16:04 -02001/* DVB USB compliant linux driver for Technotrend DVB USB boxes and clones
2 * (e.g. Pinnacle 400e DVB-S USB2.0).
3 *
4 * The Pinnacle 400e uses the same protocol as the Technotrend USB1.1 boxes.
5 *
6 * TDA8263 + TDA10086
7 *
8 * I2C addresses:
9 * 0x08 - LNBP21PD - LNB power supply
10 * 0x0e - TDA10086 - Demodulator
11 * 0x50 - FX2 eeprom
12 * 0x60 - TDA8263 - Tuner
13 * 0x78 ???
14 *
15 * Copyright (c) 2002 Holger Waechtler <holger@convergence.de>
16 * Copyright (c) 2003 Felix Domke <tmbinc@elitedvb.net>
17 * Copyright (C) 2005-6 Patrick Boettcher <pb@linuxtv.org>
18 *
19 * This program is free software; you can redistribute it and/or modify it
20 * under the terms of the GNU General Public License as published by the Free
21 * Software Foundation, version 2.
22 *
23 * see Documentation/dvb/README.dvb-usb for more information
24 */
25#define DVB_USB_LOG_PREFIX "ttusb2"
26#include "dvb-usb.h"
27
28#include "ttusb2.h"
29
30#include "tda826x.h"
31#include "tda10086.h"
Guy Martin76952c72010-05-07 04:09:25 -030032#include "tda1002x.h"
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -030033#include "tda10048.h"
Guy Martin76952c72010-05-07 04:09:25 -030034#include "tda827x.h"
Patrick Boettcherbc2e3912006-12-02 21:16:04 -020035#include "lnbp21.h"
36
37/* debug */
38static int dvb_usb_ttusb2_debug;
39#define deb_info(args...) dprintk(dvb_usb_ttusb2_debug,0x01,args)
40module_param_named(debug,dvb_usb_ttusb2_debug, int, 0644);
41MODULE_PARM_DESC(debug, "set debugging level (1=info (or-able))." DVB_USB_DEBUG_STATUS);
42
Janne Grunau78e92002008-04-09 19:13:13 -030043DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
44
Patrick Boettcherbc2e3912006-12-02 21:16:04 -020045struct ttusb2_state {
46 u8 id;
David Henningsson9d1da732010-12-26 10:23:58 -030047 u16 last_rc_key;
Patrick Boettcherbc2e3912006-12-02 21:16:04 -020048};
49
50static int ttusb2_msg(struct dvb_usb_device *d, u8 cmd,
51 u8 *wbuf, int wlen, u8 *rbuf, int rlen)
52{
53 struct ttusb2_state *st = d->priv;
54 u8 s[wlen+4],r[64] = { 0 };
55 int ret = 0;
56
57 memset(s,0,wlen+4);
58
59 s[0] = 0xaa;
60 s[1] = ++st->id;
61 s[2] = cmd;
62 s[3] = wlen;
63 memcpy(&s[4],wbuf,wlen);
64
65 ret = dvb_usb_generic_rw(d, s, wlen+4, r, 64, 0);
66
67 if (ret != 0 ||
68 r[0] != 0x55 ||
69 r[1] != s[1] ||
70 r[2] != cmd ||
71 (rlen > 0 && r[3] != rlen)) {
72 warn("there might have been an error during control message transfer. (rlen = %d, was %d)",rlen,r[3]);
73 return -EIO;
74 }
75
76 if (rlen > 0)
77 memcpy(rbuf, &r[4], rlen);
78
79 return 0;
80}
81
82static int ttusb2_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num)
83{
84 struct dvb_usb_device *d = i2c_get_adapdata(adap);
85 static u8 obuf[60], ibuf[60];
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -030086 int i, write_read, read;
Patrick Boettcherbc2e3912006-12-02 21:16:04 -020087
88 if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
89 return -EAGAIN;
90
91 if (num > 2)
92 warn("more than 2 i2c messages at a time is not handled yet. TODO.");
93
94 for (i = 0; i < num; i++) {
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -030095 write_read = i+1 < num && (msg[i+1].flags & I2C_M_RD);
96 read = msg[i].flags & I2C_M_RD;
Patrick Boettcherbc2e3912006-12-02 21:16:04 -020097
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -030098 obuf[0] = (msg[i].addr << 1) | (write_read | read);
99 if (read)
100 obuf[1] = 0;
101 else
102 obuf[1] = msg[i].len;
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200103
104 /* read request */
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -0300105 if (write_read)
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200106 obuf[2] = msg[i+1].len;
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -0300107 else if (read)
108 obuf[2] = msg[i].len;
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200109 else
110 obuf[2] = 0;
111
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -0300112 memcpy(&obuf[3], msg[i].buf, msg[i].len);
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200113
114 if (ttusb2_msg(d, CMD_I2C_XFER, obuf, msg[i].len+3, ibuf, obuf[2] + 3) < 0) {
115 err("i2c transfer failed.");
116 break;
117 }
118
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -0300119 if (write_read) {
120 memcpy(msg[i+1].buf, &ibuf[3], msg[i+1].len);
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200121 i++;
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -0300122 } else if (read)
123 memcpy(msg[i].buf, &ibuf[3], msg[i].len);
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200124 }
125
126 mutex_unlock(&d->i2c_mutex);
127 return i;
128}
129
130static u32 ttusb2_i2c_func(struct i2c_adapter *adapter)
131{
132 return I2C_FUNC_I2C;
133}
134
135static struct i2c_algorithm ttusb2_i2c_algo = {
136 .master_xfer = ttusb2_i2c_xfer,
137 .functionality = ttusb2_i2c_func,
138};
139
David Henningsson9d1da732010-12-26 10:23:58 -0300140/* command to poll IR receiver (copied from pctv452e.c) */
141#define CMD_GET_IR_CODE 0x1b
142
143/* IR */
144static int tt3650_rc_query(struct dvb_usb_device *d)
145{
146 int ret;
147 u8 rx[9]; /* A CMD_GET_IR_CODE reply is 9 bytes long */
148 struct ttusb2_state *st = d->priv;
149 ret = ttusb2_msg(d, CMD_GET_IR_CODE, NULL, 0, rx, sizeof(rx));
150 if (ret != 0)
151 return ret;
152
153 if (rx[8] & 0x01) {
154 /* got a "press" event */
155 st->last_rc_key = (rx[3] << 8) | rx[2];
156 deb_info("%s: cmd=0x%02x sys=0x%02x\n", __func__, rx[2], rx[3]);
157 rc_keydown(d->rc_dev, st->last_rc_key, 0);
158 } else if (st->last_rc_key) {
159 rc_keyup(d->rc_dev);
160 st->last_rc_key = 0;
161 }
162
163 return 0;
164}
165
166
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200167/* Callbacks for DVB USB */
168static int ttusb2_identify_state (struct usb_device *udev, struct
169 dvb_usb_device_properties *props, struct dvb_usb_device_description **desc,
170 int *cold)
171{
172 *cold = udev->descriptor.iManufacturer == 0 && udev->descriptor.iProduct == 0;
173 return 0;
174}
175
176static int ttusb2_power_ctrl(struct dvb_usb_device *d, int onoff)
177{
178 u8 b = onoff;
179 ttusb2_msg(d, CMD_POWER, &b, 0, NULL, 0);
180 return ttusb2_msg(d, CMD_POWER, &b, 1, NULL, 0);
181}
182
183
184static struct tda10086_config tda10086_config = {
185 .demod_address = 0x0e,
186 .invert = 0,
Hartmut Hackmannea75baf2008-02-09 23:54:24 -0300187 .diseqc_tone = 1,
Hartmut Hackmann9a1b04e2008-04-09 23:07:11 -0300188 .xtal_freq = TDA10086_XTAL_16M,
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200189};
190
Guy Martin76952c72010-05-07 04:09:25 -0300191static struct tda10023_config tda10023_config = {
192 .demod_address = 0x0c,
193 .invert = 0,
194 .xtal = 16000000,
195 .pll_m = 11,
196 .pll_p = 3,
197 .pll_n = 1,
198 .deltaf = 0xa511,
199};
200
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -0300201static struct tda10048_config tda10048_config = {
202 .demod_address = 0x10 >> 1,
203 .output_mode = TDA10048_PARALLEL_OUTPUT,
204 .inversion = TDA10048_INVERSION_ON,
205 .dtv6_if_freq_khz = TDA10048_IF_4000,
206 .dtv7_if_freq_khz = TDA10048_IF_4500,
207 .dtv8_if_freq_khz = TDA10048_IF_5000,
208 .clk_freq_khz = TDA10048_CLK_16000,
209 .no_firmware = 1,
210 .set_pll = true ,
211 .pll_m = 5,
212 .pll_n = 3,
213 .pll_p = 0,
214};
215
216static struct tda827x_config tda827x_config = {
217 .config = 0,
218};
219
Guy Martin76952c72010-05-07 04:09:25 -0300220static int ttusb2_frontend_tda10086_attach(struct dvb_usb_adapter *adap)
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200221{
222 if (usb_set_interface(adap->dev->udev,0,3) < 0)
223 err("set interface to alts=3 failed");
224
Michael Krufky77eed212011-09-06 09:31:57 -0300225 if ((adap->fe_adap[0].fe = dvb_attach(tda10086_attach, &tda10086_config, &adap->dev->i2c_adap)) == NULL) {
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200226 deb_info("TDA10086 attach failed\n");
227 return -ENODEV;
228 }
229
230 return 0;
231}
232
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -0300233static int ttusb2_ct3650_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
234{
235 struct dvb_usb_adapter *adap = fe->dvb->priv;
236
Michael Krufky77eed212011-09-06 09:31:57 -0300237 return adap->fe_adap[0].fe->ops.i2c_gate_ctrl(adap->fe_adap[0].fe, enable);
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -0300238}
239
Guy Martin76952c72010-05-07 04:09:25 -0300240static int ttusb2_frontend_tda10023_attach(struct dvb_usb_adapter *adap)
241{
242 if (usb_set_interface(adap->dev->udev, 0, 3) < 0)
243 err("set interface to alts=3 failed");
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -0300244
Michael Krufky77eed212011-09-06 09:31:57 -0300245 if (adap->fe_adap[0].fe == NULL) {
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -0300246 /* FE 0 DVB-C */
Michael Krufky77eed212011-09-06 09:31:57 -0300247 adap->fe_adap[0].fe = dvb_attach(tda10023_attach,
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -0300248 &tda10023_config, &adap->dev->i2c_adap, 0x48);
249
Michael Krufky77eed212011-09-06 09:31:57 -0300250 if (adap->fe_adap[0].fe == NULL) {
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -0300251 deb_info("TDA10023 attach failed\n");
252 return -ENODEV;
253 }
254 } else {
Michael Krufky77eed212011-09-06 09:31:57 -0300255 adap->fe_adap[1].fe = dvb_attach(tda10048_attach,
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -0300256 &tda10048_config, &adap->dev->i2c_adap);
257
Michael Krufky77eed212011-09-06 09:31:57 -0300258 if (adap->fe_adap[1].fe == NULL) {
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -0300259 deb_info("TDA10048 attach failed\n");
260 return -ENODEV;
261 }
262
263 /* tuner is behind TDA10023 I2C-gate */
Michael Krufky77eed212011-09-06 09:31:57 -0300264 adap->fe_adap[1].fe->ops.i2c_gate_ctrl = ttusb2_ct3650_i2c_gate_ctrl;
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -0300265
Guy Martin76952c72010-05-07 04:09:25 -0300266 }
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -0300267
Guy Martin76952c72010-05-07 04:09:25 -0300268 return 0;
269}
270
271static int ttusb2_tuner_tda827x_attach(struct dvb_usb_adapter *adap)
272{
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -0300273 struct dvb_frontend *fe;
274
275 /* MFE: select correct FE to attach tuner since that's called twice */
Michael Krufky77eed212011-09-06 09:31:57 -0300276 if (adap->fe_adap[1].fe == NULL)
277 fe = adap->fe_adap[0].fe;
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -0300278 else
Michael Krufky77eed212011-09-06 09:31:57 -0300279 fe = adap->fe_adap[1].fe;
Jose Alberto Regueroc9f88aa2011-08-08 07:35:35 -0300280
281 /* attach tuner */
282 if (dvb_attach(tda827x_attach, fe, 0x61, &adap->dev->i2c_adap, &tda827x_config) == NULL) {
Guy Martin76952c72010-05-07 04:09:25 -0300283 printk(KERN_ERR "%s: No tda827x found!\n", __func__);
284 return -ENODEV;
285 }
286 return 0;
287}
288
289static int ttusb2_tuner_tda826x_attach(struct dvb_usb_adapter *adap)
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200290{
Michael Krufky77eed212011-09-06 09:31:57 -0300291 if (dvb_attach(tda826x_attach, adap->fe_adap[0].fe, 0x60, &adap->dev->i2c_adap, 0) == NULL) {
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200292 deb_info("TDA8263 attach failed\n");
293 return -ENODEV;
294 }
295
Michael Krufky77eed212011-09-06 09:31:57 -0300296 if (dvb_attach(lnbp21_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, 0, 0) == NULL) {
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200297 deb_info("LNBP21 attach failed\n");
298 return -ENODEV;
299 }
300 return 0;
301}
302
303/* DVB USB Driver stuff */
304static struct dvb_usb_device_properties ttusb2_properties;
Andre Weidemann8c899bc2008-03-29 21:30:49 -0300305static struct dvb_usb_device_properties ttusb2_properties_s2400;
Guy Martin76952c72010-05-07 04:09:25 -0300306static struct dvb_usb_device_properties ttusb2_properties_ct3650;
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200307
308static int ttusb2_probe(struct usb_interface *intf,
309 const struct usb_device_id *id)
310{
Janne Grunau78e92002008-04-09 19:13:13 -0300311 if (0 == dvb_usb_device_init(intf, &ttusb2_properties,
312 THIS_MODULE, NULL, adapter_nr) ||
313 0 == dvb_usb_device_init(intf, &ttusb2_properties_s2400,
Guy Martin76952c72010-05-07 04:09:25 -0300314 THIS_MODULE, NULL, adapter_nr) ||
315 0 == dvb_usb_device_init(intf, &ttusb2_properties_ct3650,
Janne Grunau78e92002008-04-09 19:13:13 -0300316 THIS_MODULE, NULL, adapter_nr))
Andre Weidemann8c899bc2008-03-29 21:30:49 -0300317 return 0;
318 return -ENODEV;
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200319}
320
321static struct usb_device_id ttusb2_table [] = {
Andre Weidemann8c899bc2008-03-29 21:30:49 -0300322 { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PCTV_400E) },
323 { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PCTV_450E) },
324 { USB_DEVICE(USB_VID_TECHNOTREND,
325 USB_PID_TECHNOTREND_CONNECT_S2400) },
Guy Martin76952c72010-05-07 04:09:25 -0300326 { USB_DEVICE(USB_VID_TECHNOTREND,
327 USB_PID_TECHNOTREND_CONNECT_CT3650) },
Andre Weidemann8c899bc2008-03-29 21:30:49 -0300328 {} /* Terminating entry */
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200329};
330MODULE_DEVICE_TABLE (usb, ttusb2_table);
331
332static struct dvb_usb_device_properties ttusb2_properties = {
333 .caps = DVB_USB_IS_AN_I2C_ADAPTER,
334
335 .usb_ctrl = CYPRESS_FX2,
336 .firmware = "dvb-usb-pctv-400e-01.fw",
337
338 .size_of_priv = sizeof(struct ttusb2_state),
339
340 .num_adapters = 1,
341 .adapter = {
342 {
Michael Krufky77eed212011-09-06 09:31:57 -0300343 .num_frontends = 1,
344 .fe = {{
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200345 .streaming_ctrl = NULL, // ttusb2_streaming_ctrl,
346
Guy Martin76952c72010-05-07 04:09:25 -0300347 .frontend_attach = ttusb2_frontend_tda10086_attach,
348 .tuner_attach = ttusb2_tuner_tda826x_attach,
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200349
350 /* parameter for the MPEG2-data transfer */
351 .stream = {
352 .type = USB_ISOC,
353 .count = 5,
354 .endpoint = 0x02,
355 .u = {
356 .isoc = {
357 .framesperurb = 4,
358 .framesize = 940,
359 .interval = 1,
360 }
361 }
362 }
Michael Krufky77eed212011-09-06 09:31:57 -0300363 }},
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200364 }
365 },
366
367 .power_ctrl = ttusb2_power_ctrl,
368 .identify_state = ttusb2_identify_state,
369
370 .i2c_algo = &ttusb2_i2c_algo,
371
372 .generic_bulk_ctrl_endpoint = 0x01,
373
Christophe Cattelainddc9ece2007-04-27 12:31:32 -0300374 .num_device_descs = 2,
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200375 .devices = {
376 { "Pinnacle 400e DVB-S USB2.0",
377 { &ttusb2_table[0], NULL },
378 { NULL },
379 },
Christophe Cattelainddc9ece2007-04-27 12:31:32 -0300380 { "Pinnacle 450e DVB-S USB2.0",
381 { &ttusb2_table[1], NULL },
382 { NULL },
383 },
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200384 }
385};
386
Andre Weidemann8c899bc2008-03-29 21:30:49 -0300387static struct dvb_usb_device_properties ttusb2_properties_s2400 = {
388 .caps = DVB_USB_IS_AN_I2C_ADAPTER,
389
390 .usb_ctrl = CYPRESS_FX2,
391 .firmware = "dvb-usb-tt-s2400-01.fw",
392
393 .size_of_priv = sizeof(struct ttusb2_state),
394
395 .num_adapters = 1,
396 .adapter = {
397 {
Michael Krufky77eed212011-09-06 09:31:57 -0300398 .num_frontends = 1,
399 .fe = {{
Andre Weidemann8c899bc2008-03-29 21:30:49 -0300400 .streaming_ctrl = NULL,
401
Guy Martin76952c72010-05-07 04:09:25 -0300402 .frontend_attach = ttusb2_frontend_tda10086_attach,
403 .tuner_attach = ttusb2_tuner_tda826x_attach,
Andre Weidemann8c899bc2008-03-29 21:30:49 -0300404
405 /* parameter for the MPEG2-data transfer */
406 .stream = {
407 .type = USB_ISOC,
408 .count = 5,
409 .endpoint = 0x02,
410 .u = {
411 .isoc = {
412 .framesperurb = 4,
413 .framesize = 940,
414 .interval = 1,
415 }
416 }
417 }
Michael Krufky77eed212011-09-06 09:31:57 -0300418 }},
Andre Weidemann8c899bc2008-03-29 21:30:49 -0300419 }
420 },
421
422 .power_ctrl = ttusb2_power_ctrl,
423 .identify_state = ttusb2_identify_state,
424
425 .i2c_algo = &ttusb2_i2c_algo,
426
427 .generic_bulk_ctrl_endpoint = 0x01,
428
429 .num_device_descs = 1,
430 .devices = {
431 { "Technotrend TT-connect S-2400",
432 { &ttusb2_table[2], NULL },
433 { NULL },
434 },
435 }
436};
437
Guy Martin76952c72010-05-07 04:09:25 -0300438static struct dvb_usb_device_properties ttusb2_properties_ct3650 = {
439 .caps = DVB_USB_IS_AN_I2C_ADAPTER,
440
441 .usb_ctrl = CYPRESS_FX2,
442
443 .size_of_priv = sizeof(struct ttusb2_state),
444
David Henningsson9d1da732010-12-26 10:23:58 -0300445 .rc.core = {
446 .rc_interval = 150, /* Less than IR_KEYPRESS_TIMEOUT */
447 .rc_codes = RC_MAP_TT_1500,
448 .rc_query = tt3650_rc_query,
449 .allowed_protos = RC_TYPE_UNKNOWN,
450 },
451
Guy Martin76952c72010-05-07 04:09:25 -0300452 .num_adapters = 1,
453 .adapter = {
454 {
Michael Krufky77eed212011-09-06 09:31:57 -0300455 .num_frontends = 2,
456 .fe = {{
Guy Martin76952c72010-05-07 04:09:25 -0300457 .streaming_ctrl = NULL,
458
459 .frontend_attach = ttusb2_frontend_tda10023_attach,
460 .tuner_attach = ttusb2_tuner_tda827x_attach,
461
462 /* parameter for the MPEG2-data transfer */
463 .stream = {
464 .type = USB_ISOC,
465 .count = 5,
466 .endpoint = 0x02,
467 .u = {
468 .isoc = {
469 .framesperurb = 4,
470 .framesize = 940,
471 .interval = 1,
472 }
473 }
474 }
Michael Krufky77eed212011-09-06 09:31:57 -0300475 },{
476 .streaming_ctrl = NULL,
477
478 .frontend_attach = ttusb2_frontend_tda10023_attach,
479 .tuner_attach = ttusb2_tuner_tda827x_attach,
480
481 /* parameter for the MPEG2-data transfer */
482 .stream = {
483 .type = USB_ISOC,
484 .count = 5,
485 .endpoint = 0x02,
486 .u = {
487 .isoc = {
488 .framesperurb = 4,
489 .framesize = 940,
490 .interval = 1,
491 }
492 }
493 }
494 }},
Guy Martin76952c72010-05-07 04:09:25 -0300495 },
496 },
497
498 .power_ctrl = ttusb2_power_ctrl,
499 .identify_state = ttusb2_identify_state,
500
501 .i2c_algo = &ttusb2_i2c_algo,
502
503 .generic_bulk_ctrl_endpoint = 0x01,
504
505 .num_device_descs = 1,
506 .devices = {
507 { "Technotrend TT-connect CT-3650",
508 .warm_ids = { &ttusb2_table[3], NULL },
509 },
510 }
511};
512
Patrick Boettcherbc2e3912006-12-02 21:16:04 -0200513static struct usb_driver ttusb2_driver = {
514 .name = "dvb_usb_ttusb2",
515 .probe = ttusb2_probe,
516 .disconnect = dvb_usb_device_exit,
517 .id_table = ttusb2_table,
518};
519
520/* module stuff */
521static int __init ttusb2_module_init(void)
522{
523 int result;
524 if ((result = usb_register(&ttusb2_driver))) {
525 err("usb_register failed. Error number %d",result);
526 return result;
527 }
528
529 return 0;
530}
531
532static void __exit ttusb2_module_exit(void)
533{
534 /* deregister this driver from the USB subsystem */
535 usb_deregister(&ttusb2_driver);
536}
537
538module_init (ttusb2_module_init);
539module_exit (ttusb2_module_exit);
540
541MODULE_AUTHOR("Patrick Boettcher <patrick.boettcher@desy.de>");
542MODULE_DESCRIPTION("Driver for Pinnacle PCTV 400e DVB-S USB2.0");
543MODULE_VERSION("1.0");
544MODULE_LICENSE("GPL");