From 3b2a5e8c080da37be6135f44d236fe6b796666d9 Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Tue, 26 Aug 2014 17:14:16 -0300 Subject: [media] it913x: convert to I2C driver Change the it913x driver to use the I2C high lever tuner binding model. As af9035 depends on it, add a code there to do the binding. [mchehab@osg.samsung.com: Merge 3 patches into one, because we don't want to break bisect due to the conversion] Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- drivers/media/tuners/it913x.h | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'drivers/media/tuners/it913x.h') diff --git a/drivers/media/tuners/it913x.h b/drivers/media/tuners/it913x.h index 12dd36bd9e79..9789c4d2a6ea 100644 --- a/drivers/media/tuners/it913x.h +++ b/drivers/media/tuners/it913x.h @@ -25,21 +25,22 @@ #include "dvb_frontend.h" -#if defined(CONFIG_MEDIA_TUNER_IT913X) || \ - (defined(CONFIG_MEDIA_TUNER_IT913X_MODULE) && defined(MODULE)) -extern struct dvb_frontend *it913x_attach(struct dvb_frontend *fe, - struct i2c_adapter *i2c_adap, - u8 i2c_addr, - u8 config); -#else -static inline struct dvb_frontend *it913x_attach(struct dvb_frontend *fe, - struct i2c_adapter *i2c_adap, - u8 i2c_addr, - u8 config) -{ - pr_warn("%s: driver disabled by Kconfig\n", __func__); - return NULL; -} -#endif +/* + * I2C address + * 0x38, 0x3a, 0x3c, 0x3e + */ +struct it913x_config { + /* + * pointer to DVB frontend + */ + struct dvb_frontend *fe; + + /* + * chip version + * 1 = IT9135 AX + * 2 = IT9135 BX + */ + u8 chip_ver:2; +}; #endif -- cgit v1.2.3