summaryrefslogtreecommitdiff
path: root/drivers/media/usb/em28xx/em28xx-dvb.c
diff options
context:
space:
mode:
authorOlli Salonen <olli.salonen@iki.fi>2014-11-24 03:57:34 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-25 09:13:10 -0200
commitfc30dd7647e502b757c47c2a1b7163face9e0272 (patch)
tree755d1568c996f88c44303195d1477e9f21c9fdae /drivers/media/usb/em28xx/em28xx-dvb.c
parent073f38494ab9bad6edf589c74a1f09c358c5068c (diff)
[media] em28xx: Add support for Terratec Cinergy T2 Stick HD
Terratec Cinergy T2 Stick HD [eb1a:8179] is a USB DVB-T/T2/C tuner that contains following components: * Empia EM28178 USB bridge * Silicon Labs Si2168-A30 demodulator * Silicon Labs Si2146-A10 tuner I don't have the remote, so the RC_MAP is a best guess based on the pictures of the remote controllers and other supported Terratec devices with a similar remote. [Antti: Resolved conflict caused by Leadtek VC100 patch] Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-dvb.c')
-rw-r--r--drivers/media/usb/em28xx/em28xx-dvb.c59
1 files changed, 59 insertions, 0 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
index 5a94f174cc74..0b8823d7f7ec 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -1604,6 +1604,65 @@ static int em28xx_dvb_init(struct em28xx *dev)
dvb->fe[0]->ops.set_lna = em28xx_pctv_292e_set_lna;
}
break;
+ case EM28178_BOARD_TERRATEC_T2_STICK_HD:
+ {
+ struct i2c_adapter *adapter;
+ struct i2c_client *client;
+ struct i2c_board_info info;
+ struct si2168_config si2168_config;
+ struct si2157_config si2157_config;
+
+ /* attach demod */
+ memset(&si2168_config, 0, sizeof(si2168_config));
+ si2168_config.i2c_adapter = &adapter;
+ si2168_config.fe = &dvb->fe[0];
+ si2168_config.ts_mode = SI2168_TS_PARALLEL;
+ memset(&info, 0, sizeof(struct i2c_board_info));
+ strlcpy(info.type, "si2168", I2C_NAME_SIZE);
+ info.addr = 0x64;
+ info.platform_data = &si2168_config;
+ request_module(info.type);
+ client = i2c_new_device(&dev->i2c_adap[dev->def_i2c_bus], &info);
+ if (client == NULL || client->dev.driver == NULL) {
+ result = -ENODEV;
+ goto out_free;
+ }
+
+ if (!try_module_get(client->dev.driver->owner)) {
+ i2c_unregister_device(client);
+ result = -ENODEV;
+ goto out_free;
+ }
+
+ dvb->i2c_client_demod = client;
+
+ /* attach tuner */
+ memset(&si2157_config, 0, sizeof(si2157_config));
+ si2157_config.fe = dvb->fe[0];
+ memset(&info, 0, sizeof(struct i2c_board_info));
+ strlcpy(info.type, "si2146", I2C_NAME_SIZE);
+ info.addr = 0x60;
+ info.platform_data = &si2157_config;
+ request_module("si2157");
+ client = i2c_new_device(adapter, &info);
+ if (client == NULL || client->dev.driver == NULL) {
+ module_put(dvb->i2c_client_demod->dev.driver->owner);
+ i2c_unregister_device(dvb->i2c_client_demod);
+ result = -ENODEV;
+ goto out_free;
+ }
+
+ if (!try_module_get(client->dev.driver->owner)) {
+ i2c_unregister_device(client);
+ module_put(dvb->i2c_client_demod->dev.driver->owner);
+ i2c_unregister_device(dvb->i2c_client_demod);
+ result = -ENODEV;
+ goto out_free;
+ }
+
+ dvb->i2c_client_tuner = client;
+ }
+ break;
default:
em28xx_errdev("/2: The frontend of your DVB/ATSC card"
" isn't supported yet\n");