diff options
Diffstat (limited to 'drivers/media/dvb/dvb-usb/ttusb2.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/ttusb2.c | 62 |
1 files changed, 58 insertions, 4 deletions
diff --git a/drivers/media/dvb/dvb-usb/ttusb2.c b/drivers/media/dvb/dvb-usb/ttusb2.c index 3b9da9c25c6e..0eb33378254b 100644 --- a/drivers/media/dvb/dvb-usb/ttusb2.c +++ b/drivers/media/dvb/dvb-usb/ttusb2.c | |||
@@ -176,17 +176,23 @@ static int ttusb2_tuner_attach(struct dvb_usb_adapter *adap) | |||
176 | 176 | ||
177 | /* DVB USB Driver stuff */ | 177 | /* DVB USB Driver stuff */ |
178 | static struct dvb_usb_device_properties ttusb2_properties; | 178 | static struct dvb_usb_device_properties ttusb2_properties; |
179 | static struct dvb_usb_device_properties ttusb2_properties_s2400; | ||
179 | 180 | ||
180 | static int ttusb2_probe(struct usb_interface *intf, | 181 | static int ttusb2_probe(struct usb_interface *intf, |
181 | const struct usb_device_id *id) | 182 | const struct usb_device_id *id) |
182 | { | 183 | { |
183 | return dvb_usb_device_init(intf,&ttusb2_properties,THIS_MODULE,NULL); | 184 | if (dvb_usb_device_init(intf, &ttusb2_properties, THIS_MODULE, NULL) == 0 || |
185 | dvb_usb_device_init(intf, &ttusb2_properties_s2400, THIS_MODULE, NULL) == 0) | ||
186 | return 0; | ||
187 | return -ENODEV; | ||
184 | } | 188 | } |
185 | 189 | ||
186 | static struct usb_device_id ttusb2_table [] = { | 190 | static struct usb_device_id ttusb2_table [] = { |
187 | { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PCTV_400E) }, | 191 | { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PCTV_400E) }, |
188 | { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PCTV_450E) }, | 192 | { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PCTV_450E) }, |
189 | {} /* Terminating entry */ | 193 | { USB_DEVICE(USB_VID_TECHNOTREND, |
194 | USB_PID_TECHNOTREND_CONNECT_S2400) }, | ||
195 | {} /* Terminating entry */ | ||
190 | }; | 196 | }; |
191 | MODULE_DEVICE_TABLE (usb, ttusb2_table); | 197 | MODULE_DEVICE_TABLE (usb, ttusb2_table); |
192 | 198 | ||
@@ -242,6 +248,54 @@ static struct dvb_usb_device_properties ttusb2_properties = { | |||
242 | } | 248 | } |
243 | }; | 249 | }; |
244 | 250 | ||
251 | static struct dvb_usb_device_properties ttusb2_properties_s2400 = { | ||
252 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, | ||
253 | |||
254 | .usb_ctrl = CYPRESS_FX2, | ||
255 | .firmware = "dvb-usb-tt-s2400-01.fw", | ||
256 | |||
257 | .size_of_priv = sizeof(struct ttusb2_state), | ||
258 | |||
259 | .num_adapters = 1, | ||
260 | .adapter = { | ||
261 | { | ||
262 | .streaming_ctrl = NULL, | ||
263 | |||
264 | .frontend_attach = ttusb2_frontend_attach, | ||
265 | .tuner_attach = ttusb2_tuner_attach, | ||
266 | |||
267 | /* parameter for the MPEG2-data transfer */ | ||
268 | .stream = { | ||
269 | .type = USB_ISOC, | ||
270 | .count = 5, | ||
271 | .endpoint = 0x02, | ||
272 | .u = { | ||
273 | .isoc = { | ||
274 | .framesperurb = 4, | ||
275 | .framesize = 940, | ||
276 | .interval = 1, | ||
277 | } | ||
278 | } | ||
279 | } | ||
280 | } | ||
281 | }, | ||
282 | |||
283 | .power_ctrl = ttusb2_power_ctrl, | ||
284 | .identify_state = ttusb2_identify_state, | ||
285 | |||
286 | .i2c_algo = &ttusb2_i2c_algo, | ||
287 | |||
288 | .generic_bulk_ctrl_endpoint = 0x01, | ||
289 | |||
290 | .num_device_descs = 1, | ||
291 | .devices = { | ||
292 | { "Technotrend TT-connect S-2400", | ||
293 | { &ttusb2_table[2], NULL }, | ||
294 | { NULL }, | ||
295 | }, | ||
296 | } | ||
297 | }; | ||
298 | |||
245 | static struct usb_driver ttusb2_driver = { | 299 | static struct usb_driver ttusb2_driver = { |
246 | .name = "dvb_usb_ttusb2", | 300 | .name = "dvb_usb_ttusb2", |
247 | .probe = ttusb2_probe, | 301 | .probe = ttusb2_probe, |