[media] ts2020: register I2C driver from legacy media attach

Register driver using I2C bindings internally when legacy media
attach is used. That is done by registering driver using I2C binding
from legacy attach. That way we can get valid I2C client, which is
needed for proper dev_() logging and regmap for example even legacy
binding is used.

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-03-26 20:20:42 -03:00
committed by Mauro Carvalho Chehab
parent 2ca58f45cc
commit e6ad9ce3e9
2 changed files with 29 additions and 49 deletions

View File

@@ -52,10 +52,15 @@ struct ts2020_config {
* pointer to DVB frontend
*/
struct dvb_frontend *fe;
/*
* driver private, do not set value
*/
u8 attach_in_use:1;
};
/* Do not add new ts2020_attach() users! Use I2C bindings instead. */
#if IS_REACHABLE(CONFIG_DVB_TS2020)
extern struct dvb_frontend *ts2020_attach(
struct dvb_frontend *fe,
const struct ts2020_config *config,