diff options
author | Nibble Max <nibble.max@gmail.com> | 2014-11-12 01:23:12 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-11-14 18:28:41 -0200 |
commit | c02ef64aab828d80040b5dce934729312e698c33 (patch) | |
tree | a0f5c9a2ab61c4ac8bb4b44cb9f9234396709b9b /drivers/media/pci/cx23885/cx23885-dvb.c | |
parent | 9aa785b1500a7bd40b736f31b341e204bd5fb174 (diff) | |
download | blackbird-op-linux-c02ef64aab828d80040b5dce934729312e698c33.tar.gz blackbird-op-linux-c02ef64aab828d80040b5dce934729312e698c33.zip |
[media] cx23885: add DVBSky T982(Dual DVB-T2/T/C) support
DVBSky T982 DVB-T2/T/C dual PCIe card:
1>dvb frontend: SI2158A20(tuner),SI2168A30(demod)
2>PCIe bridge: CX23885(port b: parallel mode, port c: serial mode)
3>rc: cx23885 integrated.
Signed-off-by: Nibble Max <nibble.max@gmail.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci/cx23885/cx23885-dvb.c')
-rw-r--r-- | drivers/media/pci/cx23885/cx23885-dvb.c | 60 |
1 files changed, 59 insertions, 1 deletions
diff --git a/drivers/media/pci/cx23885/cx23885-dvb.c b/drivers/media/pci/cx23885/cx23885-dvb.c index 2457b6483a40..1ed92eeb46d1 100644 --- a/drivers/media/pci/cx23885/cx23885-dvb.c +++ b/drivers/media/pci/cx23885/cx23885-dvb.c @@ -1945,6 +1945,63 @@ static int dvb_register(struct cx23885_tsport *port) port->i2c_client_tuner = client_tuner; break; + case CX23885_BOARD_DVBSKY_T982: + memset(&si2168_config, 0, sizeof(si2168_config)); + switch (port->nr) { + /* port b */ + case 1: + i2c_bus = &dev->i2c_bus[1]; + si2168_config.ts_mode = SI2168_TS_PARALLEL; + break; + /* port c */ + case 2: + i2c_bus = &dev->i2c_bus[0]; + si2168_config.ts_mode = SI2168_TS_SERIAL; + break; + } + + /* attach frontend */ + si2168_config.i2c_adapter = &adapter; + si2168_config.fe = &fe0->dvb.frontend; + 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_demod = i2c_new_device(&i2c_bus->i2c_adap, &info); + if (client_demod == NULL || + client_demod->dev.driver == NULL) + goto frontend_detach; + if (!try_module_get(client_demod->dev.driver->owner)) { + i2c_unregister_device(client_demod); + goto frontend_detach; + } + port->i2c_client_demod = client_demod; + + /* attach tuner */ + memset(&si2157_config, 0, sizeof(si2157_config)); + si2157_config.fe = fe0->dvb.frontend; + memset(&info, 0, sizeof(struct i2c_board_info)); + strlcpy(info.type, "si2157", I2C_NAME_SIZE); + info.addr = 0x60; + info.platform_data = &si2157_config; + request_module(info.type); + client_tuner = i2c_new_device(adapter, &info); + if (client_tuner == NULL || + client_tuner->dev.driver == NULL) { + module_put(client_demod->dev.driver->owner); + i2c_unregister_device(client_demod); + goto frontend_detach; + } + if (!try_module_get(client_tuner->dev.driver->owner)) { + i2c_unregister_device(client_tuner); + module_put(client_demod->dev.driver->owner); + i2c_unregister_device(client_demod); + port->i2c_client_demod = NULL; + goto frontend_detach; + } + port->i2c_client_tuner = client_tuner; + break; default: printk(KERN_INFO "%s: The frontend of your DVB/ATSC card " " isn't supported yet\n", @@ -2021,7 +2078,8 @@ static int dvb_register(struct cx23885_tsport *port) } case CX23885_BOARD_DVBSKY_T9580: case CX23885_BOARD_DVBSKY_S950: - case CX23885_BOARD_DVBSKY_S952: { + case CX23885_BOARD_DVBSKY_S952: + case CX23885_BOARD_DVBSKY_T982: { u8 eeprom[256]; /* 24C02 i2c eeprom */ if (port->nr > 2) |