aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners/e4000.h
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2013-10-15 18:22:45 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-03-14 04:21:27 -0400
commit28fd31f82dccfcfcb4c80fd916d4caf875c04d90 (patch)
treecbc74bc76d16c9de8ccb46119f4034bba37471ee /drivers/media/tuners/e4000.h
parent8ea5488a919bbd49941584f773fd66623192ffc0 (diff)
[media] e4000: convert DVB tuner to I2C driver model
Driver conversion from proprietary DVB tuner model to more general I2C driver model. Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/tuners/e4000.h')
-rw-r--r--drivers/media/tuners/e4000.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/media/tuners/e4000.h b/drivers/media/tuners/e4000.h
index 25ee7c07abff..e74b8b2f2fc3 100644
--- a/drivers/media/tuners/e4000.h
+++ b/drivers/media/tuners/e4000.h
@@ -24,12 +24,15 @@
24#include <linux/kconfig.h> 24#include <linux/kconfig.h>
25#include "dvb_frontend.h" 25#include "dvb_frontend.h"
26 26
27/*
28 * I2C address
29 * 0x64, 0x65, 0x66, 0x67
30 */
27struct e4000_config { 31struct e4000_config {
28 /* 32 /*
29 * I2C address 33 * frontend
30 * 0x64, 0x65, 0x66, 0x67
31 */ 34 */
32 u8 i2c_addr; 35 struct dvb_frontend *fe;
33 36
34 /* 37 /*
35 * clock 38 * clock
@@ -37,16 +40,4 @@ struct e4000_config {
37 u32 clock; 40 u32 clock;
38}; 41};
39 42
40#if IS_ENABLED(CONFIG_MEDIA_TUNER_E4000)
41extern struct dvb_frontend *e4000_attach(struct dvb_frontend *fe,
42 struct i2c_adapter *i2c, const struct e4000_config *cfg);
43#else
44static inline struct dvb_frontend *e4000_attach(struct dvb_frontend *fe,
45 struct i2c_adapter *i2c, const struct e4000_config *cfg)
46{
47 dev_warn(&i2c->dev, "%s: driver disabled by Kconfig\n", __func__);
48 return NULL;
49}
50#endif
51
52#endif 43#endif