[media] cx23885: add support for DVB I2C SEC client

Add support for I2C SEC (satellite equipment controller) client.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
Antti Palosaari 2015-04-16 13:59:46 -03:00 committed by Mauro Carvalho Chehab
parent 8022f9afcd
commit bf5e3ef0cc
2 changed files with 17 additions and 0 deletions

View File

@ -1190,6 +1190,7 @@ static int dvb_register(struct cx23885_tsport *port)
struct i2c_board_info info;
struct i2c_adapter *adapter;
struct i2c_client *client_demod = NULL, *client_tuner = NULL;
struct i2c_client *client_sec = NULL;
const struct m88ds3103_config *p_m88ds3103_config = NULL;
int (*p_set_voltage)(struct dvb_frontend *fe, fe_sec_voltage_t voltage) = NULL;
int mfe_shared = 0; /* bus not shared by default */
@ -2242,6 +2243,14 @@ static int dvb_register(struct cx23885_tsport *port)
return 0;
frontend_detach:
/* remove I2C client for SEC */
client_sec = port->i2c_client_sec;
if (client_sec) {
module_put(client_sec->dev.driver->owner);
i2c_unregister_device(client_sec);
port->i2c_client_sec = NULL;
}
/* remove I2C client for tuner */
client_tuner = port->i2c_client_tuner;
if (client_tuner) {
@ -2343,6 +2352,13 @@ int cx23885_dvb_unregister(struct cx23885_tsport *port)
i2c_unregister_device(client);
}
/* remove I2C client for SEC */
client = port->i2c_client_sec;
if (client) {
module_put(client->dev.driver->owner);
i2c_unregister_device(client);
}
/* remove I2C client for tuner */
client = port->i2c_client_tuner;
if (client) {

View File

@ -304,6 +304,7 @@ struct cx23885_tsport {
struct i2c_client *i2c_client_demod;
struct i2c_client *i2c_client_tuner;
struct i2c_client *i2c_client_sec;
struct i2c_client *i2c_client_ci;
int (*set_frontend)(struct dvb_frontend *fe);