blob: 7706938b5167a10556529d6eb208e84ee28a8064 [file] [log] [blame]
Patrick Boettcherfb41f5a2005-07-07 17:58:23 -07001/* DVB USB library compliant Linux driver for the WideView/ Yakumo/ Hama/
Rasmus Rohded3c35ac2007-07-21 15:37:35 -03002 * Typhoon/ Yuan/ Miglia DVB-T USB2.0 receiver.
Johannes Stezenbach776338e2005-06-23 22:02:35 -07003 *
Patrick Boettcher99e44da2016-01-24 12:56:58 -02004 * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@posteo.de)
Johannes Stezenbach776338e2005-06-23 22:02:35 -07005 *
Patrick Boettcherd590f9c2005-07-07 17:58:33 -07006 * Thanks to Steve Chang from WideView for providing support for the WT-220U.
7 *
Johannes Stezenbach776338e2005-06-23 22:02:35 -07008 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the Free
10 * Software Foundation, version 2.
11 *
12 * see Documentation/dvb/README.dvb-usb for more information
13 */
14#include "dtt200u.h"
15
16/* debug */
17int dvb_usb_dtt200u_debug;
18module_param_named(debug,dvb_usb_dtt200u_debug, int, 0644);
19MODULE_PARM_DESC(debug, "set debugging level (1=info,xfer=2 (or-able))." DVB_USB_DEBUG_STATUS);
20
Janne Grunau78e92002008-04-09 19:13:13 -030021DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
22
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -030023struct dtt200u_state {
24 unsigned char data[80];
25 struct mutex data_mutex;
26};
27
Patrick Boettcherd590f9c2005-07-07 17:58:33 -070028static int dtt200u_power_ctrl(struct dvb_usb_device *d, int onoff)
29{
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -030030 struct dtt200u_state *st = d->priv;
31
32 mutex_lock(&st->data_mutex);
33
34 st->data[0] = SET_INIT;
Patrick Boettcherd590f9c2005-07-07 17:58:33 -070035
36 if (onoff)
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -030037 dvb_usb_generic_write(d, st->data, 2);
Patrick Boettcherd590f9c2005-07-07 17:58:33 -070038
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -030039 mutex_unlock(&st->data_mutex);
Patrick Boettcherd590f9c2005-07-07 17:58:33 -070040 return 0;
41}
42
Patrick Boettcher4d43e132006-09-30 06:53:48 -030043static int dtt200u_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
Johannes Stezenbach776338e2005-06-23 22:02:35 -070044{
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -030045 struct dtt200u_state *st = adap->dev->priv;
Johannes Stezenbach776338e2005-06-23 22:02:35 -070046
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -030047 mutex_lock(&st->data_mutex);
48 st->data[0] = SET_STREAMING;
49 st->data[1] = onoff;
Johannes Stezenbach776338e2005-06-23 22:02:35 -070050
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -030051 dvb_usb_generic_write(adap->dev, st->data, 2);
52
53 if (onoff)
54 return 0;
55
56 st->data[0] = RESET_PID_FILTER;
57 dvb_usb_generic_write(adap->dev, st->data, 1);
58
59 mutex_unlock(&st->data_mutex);
60
Johannes Stezenbach776338e2005-06-23 22:02:35 -070061 return 0;
62}
63
Patrick Boettcher4d43e132006-09-30 06:53:48 -030064static int dtt200u_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid, int onoff)
Johannes Stezenbach776338e2005-06-23 22:02:35 -070065{
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -030066 struct dtt200u_state *st = adap->dev->priv;
67 int ret;
68
Johannes Stezenbach776338e2005-06-23 22:02:35 -070069 pid = onoff ? pid : 0;
70
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -030071 mutex_lock(&st->data_mutex);
72 st->data[0] = SET_PID_FILTER;
73 st->data[1] = index;
74 st->data[2] = pid & 0xff;
75 st->data[3] = (pid >> 8) & 0x1f;
Johannes Stezenbach776338e2005-06-23 22:02:35 -070076
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -030077 ret = dvb_usb_generic_write(adap->dev, st->data, 4);
78 mutex_unlock(&st->data_mutex);
79
80 return ret;
Johannes Stezenbach776338e2005-06-23 22:02:35 -070081}
82
Jonathan McDowella4d020e2016-05-20 12:08:35 -030083static int dtt200u_rc_query(struct dvb_usb_device *d)
Johannes Stezenbach776338e2005-06-23 22:02:35 -070084{
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -030085 struct dtt200u_state *st = d->priv;
Jonathan McDowella4d020e2016-05-20 12:08:35 -030086 u32 scancode;
87
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -030088 mutex_lock(&st->data_mutex);
89 st->data[0] = GET_RC_CODE;
90
91 dvb_usb_generic_rw(d, st->data, 1, st->data, 5, 0);
92 if (st->data[0] == 1) {
Sean Young2ceeca02016-09-21 06:54:19 -030093 enum rc_type proto = RC_TYPE_NEC;
94
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -030095 scancode = st->data[1];
96 if ((u8) ~st->data[1] != st->data[2]) {
Jonathan McDowella4d020e2016-05-20 12:08:35 -030097 /* Extended NEC */
98 scancode = scancode << 8;
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -030099 scancode |= st->data[2];
Sean Young2ceeca02016-09-21 06:54:19 -0300100 proto = RC_TYPE_NECX;
Jonathan McDowella4d020e2016-05-20 12:08:35 -0300101 }
102 scancode = scancode << 8;
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -0300103 scancode |= st->data[3];
Jonathan McDowella4d020e2016-05-20 12:08:35 -0300104
105 /* Check command checksum is ok */
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -0300106 if ((u8) ~st->data[3] == st->data[4])
Sean Young2ceeca02016-09-21 06:54:19 -0300107 rc_keydown(d->rc_dev, proto, scancode, 0);
Jonathan McDowella4d020e2016-05-20 12:08:35 -0300108 else
109 rc_keyup(d->rc_dev);
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -0300110 } else if (st->data[0] == 2) {
Jonathan McDowella4d020e2016-05-20 12:08:35 -0300111 rc_repeat(d->rc_dev);
112 } else {
113 rc_keyup(d->rc_dev);
114 }
115
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -0300116 if (st->data[0] != 0)
117 deb_info("st->data: %*ph\n", 5, st->data);
Jonathan McDowella4d020e2016-05-20 12:08:35 -0300118
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -0300119 mutex_unlock(&st->data_mutex);
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700120 return 0;
121}
122
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300123static int dtt200u_frontend_attach(struct dvb_usb_adapter *adap)
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700124{
Michael Krufky77eed212011-09-06 09:31:57 -0300125 adap->fe_adap[0].fe = dtt200u_fe_attach(adap->dev);
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700126 return 0;
127}
128
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300129static struct dvb_usb_device_properties dtt200u_properties;
130static struct dvb_usb_device_properties wt220u_fc_properties;
131static struct dvb_usb_device_properties wt220u_properties;
132static struct dvb_usb_device_properties wt220u_zl0353_properties;
Rasmus Rohded3c35ac2007-07-21 15:37:35 -0300133static struct dvb_usb_device_properties wt220u_miglia_properties;
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700134
135static int dtt200u_usb_probe(struct usb_interface *intf,
136 const struct usb_device_id *id)
137{
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -0300138 struct dvb_usb_device *d;
139 struct dtt200u_state *st;
140
Janne Grunau78e92002008-04-09 19:13:13 -0300141 if (0 == dvb_usb_device_init(intf, &dtt200u_properties,
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -0300142 THIS_MODULE, &d, adapter_nr) ||
Janne Grunau78e92002008-04-09 19:13:13 -0300143 0 == dvb_usb_device_init(intf, &wt220u_properties,
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -0300144 THIS_MODULE, &d, adapter_nr) ||
Janne Grunau78e92002008-04-09 19:13:13 -0300145 0 == dvb_usb_device_init(intf, &wt220u_fc_properties,
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -0300146 THIS_MODULE, &d, adapter_nr) ||
Janne Grunau78e92002008-04-09 19:13:13 -0300147 0 == dvb_usb_device_init(intf, &wt220u_zl0353_properties,
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -0300148 THIS_MODULE, &d, adapter_nr) ||
Janne Grunau78e92002008-04-09 19:13:13 -0300149 0 == dvb_usb_device_init(intf, &wt220u_miglia_properties,
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -0300150 THIS_MODULE, &d, adapter_nr)) {
151 st = d->priv;
152 mutex_init(&st->data_mutex);
153
Patrick Boettcherd590f9c2005-07-07 17:58:33 -0700154 return 0;
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -0300155 }
Patrick Boettcherd590f9c2005-07-07 17:58:33 -0700156
157 return -ENODEV;
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700158}
159
160static struct usb_device_id dtt200u_usb_table [] = {
Patrick Boettcher62703b92005-09-09 13:02:46 -0700161 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_DTT200U_COLD) },
162 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_DTT200U_WARM) },
163 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_COLD) },
164 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_WARM) },
Patrick Boettcherd46e6452006-03-28 16:15:05 -0300165 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_ZL0353_COLD) },
166 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_ZL0353_WARM) },
Alexander Tuschen19e22572006-07-16 15:03:17 -0300167 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_FC_COLD) },
168 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_FC_WARM) },
Jochen Issingded38d22006-08-19 16:03:21 -0300169 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_ZAP250_COLD) },
Rasmus Rohded3c35ac2007-07-21 15:37:35 -0300170 { USB_DEVICE(USB_VID_MIGLIA, USB_PID_WT220U_ZAP250_COLD) },
Patrick Boettcher62703b92005-09-09 13:02:46 -0700171 { 0 },
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700172};
173MODULE_DEVICE_TABLE(usb, dtt200u_usb_table);
174
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300175static struct dvb_usb_device_properties dtt200u_properties = {
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700176 .usb_ctrl = CYPRESS_FX2,
177 .firmware = "dvb-usb-dtt200u-01.fw",
178
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -0300179 .size_of_priv = sizeof(struct dtt200u_state),
180
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300181 .num_adapters = 1,
182 .adapter = {
183 {
Michael Krufky77eed212011-09-06 09:31:57 -0300184 .num_frontends = 1,
185 .fe = {{
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300186 .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_NEED_PID_FILTERING,
187 .pid_filter_count = 15,
188
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700189 .streaming_ctrl = dtt200u_streaming_ctrl,
190 .pid_filter = dtt200u_pid_filter,
191 .frontend_attach = dtt200u_frontend_attach,
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700192 /* parameter for the MPEG2-data transfer */
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300193 .stream = {
194 .type = USB_BULK,
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700195 .count = 7,
196 .endpoint = 0x02,
197 .u = {
198 .bulk = {
199 .buffersize = 4096,
200 }
201 }
202 },
Michael Krufky77eed212011-09-06 09:31:57 -0300203 }},
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300204 }
205 },
206 .power_ctrl = dtt200u_power_ctrl,
207
Jonathan McDowella4d020e2016-05-20 12:08:35 -0300208 .rc.core = {
Mauro Carvalho Chehabf72a27b2010-07-31 18:04:09 -0300209 .rc_interval = 300,
Jonathan McDowella4d020e2016-05-20 12:08:35 -0300210 .rc_codes = RC_MAP_DTT200U,
Mauro Carvalho Chehabf72a27b2010-07-31 18:04:09 -0300211 .rc_query = dtt200u_rc_query,
Jonathan McDowella4d020e2016-05-20 12:08:35 -0300212 .allowed_protos = RC_BIT_NEC,
Mauro Carvalho Chehabf72a27b2010-07-31 18:04:09 -0300213 },
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300214
215 .generic_bulk_ctrl_endpoint = 0x01,
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700216
217 .num_device_descs = 1,
218 .devices = {
Patrick Boettcherd590f9c2005-07-07 17:58:33 -0700219 { .name = "WideView/Yuan/Yakumo/Hama/Typhoon DVB-T USB2.0 (WT-200U)",
Patrick Boettcherfb41f5a2005-07-07 17:58:23 -0700220 .cold_ids = { &dtt200u_usb_table[0], NULL },
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700221 .warm_ids = { &dtt200u_usb_table[1], NULL },
222 },
Al Virodad08df2006-02-01 06:02:50 -0500223 { NULL },
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700224 }
225};
226
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300227static struct dvb_usb_device_properties wt220u_properties = {
Patrick Boettcherd590f9c2005-07-07 17:58:33 -0700228 .usb_ctrl = CYPRESS_FX2,
Patrick Boettcher6ce17c52006-01-09 15:25:45 -0200229 .firmware = "dvb-usb-wt220u-02.fw",
Patrick Boettcherd590f9c2005-07-07 17:58:33 -0700230
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -0300231 .size_of_priv = sizeof(struct dtt200u_state),
232
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300233 .num_adapters = 1,
234 .adapter = {
235 {
Michael Krufky77eed212011-09-06 09:31:57 -0300236 .num_frontends = 1,
237 .fe = {{
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300238 .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_NEED_PID_FILTERING,
239 .pid_filter_count = 15,
240
Patrick Boettcherd590f9c2005-07-07 17:58:33 -0700241 .streaming_ctrl = dtt200u_streaming_ctrl,
242 .pid_filter = dtt200u_pid_filter,
243 .frontend_attach = dtt200u_frontend_attach,
Patrick Boettcherd590f9c2005-07-07 17:58:33 -0700244 /* parameter for the MPEG2-data transfer */
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300245 .stream = {
246 .type = USB_BULK,
Patrick Boettcherd590f9c2005-07-07 17:58:33 -0700247 .count = 7,
248 .endpoint = 0x02,
249 .u = {
250 .bulk = {
251 .buffersize = 4096,
252 }
253 }
254 },
Michael Krufky77eed212011-09-06 09:31:57 -0300255 }},
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300256 }
257 },
258 .power_ctrl = dtt200u_power_ctrl,
259
Jonathan McDowella4d020e2016-05-20 12:08:35 -0300260 .rc.core = {
Mauro Carvalho Chehabf72a27b2010-07-31 18:04:09 -0300261 .rc_interval = 300,
Jonathan McDowella4d020e2016-05-20 12:08:35 -0300262 .rc_codes = RC_MAP_DTT200U,
Mauro Carvalho Chehabf72a27b2010-07-31 18:04:09 -0300263 .rc_query = dtt200u_rc_query,
Jonathan McDowella4d020e2016-05-20 12:08:35 -0300264 .allowed_protos = RC_BIT_NEC,
Mauro Carvalho Chehabf72a27b2010-07-31 18:04:09 -0300265 },
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300266
267 .generic_bulk_ctrl_endpoint = 0x01,
Patrick Boettcherd590f9c2005-07-07 17:58:33 -0700268
269 .num_device_descs = 1,
270 .devices = {
Patrick Boettcher62703b92005-09-09 13:02:46 -0700271 { .name = "WideView WT-220U PenType Receiver (Typhoon/Freecom)",
Jochen Issingded38d22006-08-19 16:03:21 -0300272 .cold_ids = { &dtt200u_usb_table[2], &dtt200u_usb_table[8], NULL },
Patrick Boettcherd590f9c2005-07-07 17:58:33 -0700273 .warm_ids = { &dtt200u_usb_table[3], NULL },
274 },
Al Virodad08df2006-02-01 06:02:50 -0500275 { NULL },
Patrick Boettcherd590f9c2005-07-07 17:58:33 -0700276 }
277};
278
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300279static struct dvb_usb_device_properties wt220u_fc_properties = {
Alexander Tuschen19e22572006-07-16 15:03:17 -0300280 .usb_ctrl = CYPRESS_FX2,
281 .firmware = "dvb-usb-wt220u-fc03.fw",
282
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -0300283 .size_of_priv = sizeof(struct dtt200u_state),
284
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300285 .num_adapters = 1,
286 .adapter = {
287 {
Michael Krufky77eed212011-09-06 09:31:57 -0300288 .num_frontends = 1,
289 .fe = {{
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300290 .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_NEED_PID_FILTERING,
291 .pid_filter_count = 15,
292
Alexander Tuschen19e22572006-07-16 15:03:17 -0300293 .streaming_ctrl = dtt200u_streaming_ctrl,
294 .pid_filter = dtt200u_pid_filter,
295 .frontend_attach = dtt200u_frontend_attach,
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300296 /* parameter for the MPEG2-data transfer */
297 .stream = {
298 .type = USB_BULK,
299 .count = 7,
300 .endpoint = 0x06,
301 .u = {
302 .bulk = {
303 .buffersize = 4096,
304 }
305 }
306 },
Michael Krufky77eed212011-09-06 09:31:57 -0300307 }},
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300308 }
309 },
310 .power_ctrl = dtt200u_power_ctrl,
Alexander Tuschen19e22572006-07-16 15:03:17 -0300311
Jonathan McDowella4d020e2016-05-20 12:08:35 -0300312 .rc.core = {
Mauro Carvalho Chehabf72a27b2010-07-31 18:04:09 -0300313 .rc_interval = 300,
Jonathan McDowella4d020e2016-05-20 12:08:35 -0300314 .rc_codes = RC_MAP_DTT200U,
Mauro Carvalho Chehabf72a27b2010-07-31 18:04:09 -0300315 .rc_query = dtt200u_rc_query,
Jonathan McDowella4d020e2016-05-20 12:08:35 -0300316 .allowed_protos = RC_BIT_NEC,
Mauro Carvalho Chehabf72a27b2010-07-31 18:04:09 -0300317 },
Alexander Tuschen19e22572006-07-16 15:03:17 -0300318
319 .generic_bulk_ctrl_endpoint = 0x01,
320
Alexander Tuschen19e22572006-07-16 15:03:17 -0300321 .num_device_descs = 1,
322 .devices = {
323 { .name = "WideView WT-220U PenType Receiver (Typhoon/Freecom)",
324 .cold_ids = { &dtt200u_usb_table[6], NULL },
325 .warm_ids = { &dtt200u_usb_table[7], NULL },
326 },
327 { NULL },
328 }
329};
330
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300331static struct dvb_usb_device_properties wt220u_zl0353_properties = {
Patrick Boettcherd46e6452006-03-28 16:15:05 -0300332 .usb_ctrl = CYPRESS_FX2,
333 .firmware = "dvb-usb-wt220u-zl0353-01.fw",
334
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -0300335 .size_of_priv = sizeof(struct dtt200u_state),
336
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300337 .num_adapters = 1,
338 .adapter = {
339 {
Michael Krufky77eed212011-09-06 09:31:57 -0300340 .num_frontends = 1,
341 .fe = {{
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300342 .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_NEED_PID_FILTERING,
343 .pid_filter_count = 15,
344
Patrick Boettcher01451e72006-10-13 11:34:46 -0300345 .streaming_ctrl = dtt200u_streaming_ctrl,
346 .pid_filter = dtt200u_pid_filter,
347 .frontend_attach = dtt200u_frontend_attach,
348 /* parameter for the MPEG2-data transfer */
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300349 .stream = {
350 .type = USB_BULK,
Patrick Boettcher01451e72006-10-13 11:34:46 -0300351 .count = 7,
352 .endpoint = 0x02,
353 .u = {
354 .bulk = {
355 .buffersize = 4096,
356 }
357 }
358 },
Michael Krufky77eed212011-09-06 09:31:57 -0300359 }},
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300360 }
361 },
362 .power_ctrl = dtt200u_power_ctrl,
363
Jonathan McDowella4d020e2016-05-20 12:08:35 -0300364 .rc.core = {
Mauro Carvalho Chehabf72a27b2010-07-31 18:04:09 -0300365 .rc_interval = 300,
Jonathan McDowella4d020e2016-05-20 12:08:35 -0300366 .rc_codes = RC_MAP_DTT200U,
Mauro Carvalho Chehabf72a27b2010-07-31 18:04:09 -0300367 .rc_query = dtt200u_rc_query,
Jonathan McDowella4d020e2016-05-20 12:08:35 -0300368 .allowed_protos = RC_BIT_NEC,
Mauro Carvalho Chehabf72a27b2010-07-31 18:04:09 -0300369 },
Patrick Boettcher4d43e132006-09-30 06:53:48 -0300370
371 .generic_bulk_ctrl_endpoint = 0x01,
Patrick Boettcherd46e6452006-03-28 16:15:05 -0300372
373 .num_device_descs = 1,
374 .devices = {
375 { .name = "WideView WT-220U PenType Receiver (based on ZL353)",
376 .cold_ids = { &dtt200u_usb_table[4], NULL },
377 .warm_ids = { &dtt200u_usb_table[5], NULL },
378 },
379 { NULL },
380 }
381};
382
Rasmus Rohded3c35ac2007-07-21 15:37:35 -0300383static struct dvb_usb_device_properties wt220u_miglia_properties = {
384 .usb_ctrl = CYPRESS_FX2,
385 .firmware = "dvb-usb-wt220u-miglia-01.fw",
386
Mauro Carvalho Chehabab883e22016-10-07 08:40:43 -0300387 .size_of_priv = sizeof(struct dtt200u_state),
388
Rasmus Rohded3c35ac2007-07-21 15:37:35 -0300389 .num_adapters = 1,
390 .generic_bulk_ctrl_endpoint = 0x01,
391
392 .num_device_descs = 1,
393 .devices = {
394 { .name = "WideView WT-220U PenType Receiver (Miglia)",
395 .cold_ids = { &dtt200u_usb_table[9], NULL },
396 /* This device turns into WT220U_ZL0353_WARM when fw
397 has been uploaded */
398 .warm_ids = { NULL },
399 },
400 { NULL },
401 }
402};
403
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700404/* usb specific object needed to register this driver with the usb subsystem */
405static struct usb_driver dtt200u_usb_driver = {
Patrick Boettcherd590f9c2005-07-07 17:58:33 -0700406 .name = "dvb_usb_dtt200u",
Patrick Boettcher62703b92005-09-09 13:02:46 -0700407 .probe = dtt200u_usb_probe,
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700408 .disconnect = dvb_usb_device_exit,
Patrick Boettcher62703b92005-09-09 13:02:46 -0700409 .id_table = dtt200u_usb_table,
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700410};
411
Greg Kroah-Hartmanecb3b2b2011-11-18 09:46:12 -0800412module_usb_driver(dtt200u_usb_driver);
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700413
Patrick Boettcher99e44da2016-01-24 12:56:58 -0200414MODULE_AUTHOR("Patrick Boettcher <patrick.boettcher@posteo.de>");
Rasmus Rohded3c35ac2007-07-21 15:37:35 -0300415MODULE_DESCRIPTION("Driver for the WideView/Yakumo/Hama/Typhoon/Club3D/Miglia DVB-T USB2.0 devices");
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700416MODULE_VERSION("1.0");
417MODULE_LICENSE("GPL");