aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/tda18271.h
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-12-09 20:23:30 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:03:32 -0500
commite435f95ce6468f0240f050e14c9eac93e2fe7e71 (patch)
tree574b8764e3206b37666bda01acc2b0f1a4d44dde /drivers/media/dvb/frontends/tda18271.h
parent7206abbc2d19b6846b879fb266672b40da9961cb (diff)
V4L/DVB (6801): tda18271: pass i2c gate configuration into tda18271_attach()
If we pass TDA18271_GATE_DIGITAL into tda18271_attach(), it will always try to use the digital demodulator's i2c gate. If we pass TDA18271_GATE_ANALOG into tda18271_attach(), it will always try to use the analog demodulator's i2c gate. If we pass TDA18271_GATE_AUTO into tda18271_attach(), it will try to use the analog demodulator's i2c gate when tuning in analog mode, and it will try to use the digital demodulator's i2c gate when tuning in digital mode. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends/tda18271.h')
-rw-r--r--drivers/media/dvb/frontends/tda18271.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/tda18271.h b/drivers/media/dvb/frontends/tda18271.h
index a8a19a7197f0..d8400337263b 100644
--- a/drivers/media/dvb/frontends/tda18271.h
+++ b/drivers/media/dvb/frontends/tda18271.h
@@ -24,13 +24,21 @@
24#include <linux/i2c.h> 24#include <linux/i2c.h>
25#include "dvb_frontend.h" 25#include "dvb_frontend.h"
26 26
27enum tda18271_i2c_gate {
28 TDA18271_GATE_AUTO = 0,
29 TDA18271_GATE_ANALOG,
30 TDA18271_GATE_DIGITAL,
31};
32
27#if defined(CONFIG_DVB_TDA18271) || (defined(CONFIG_DVB_TDA18271_MODULE) && defined(MODULE)) 33#if defined(CONFIG_DVB_TDA18271) || (defined(CONFIG_DVB_TDA18271_MODULE) && defined(MODULE))
28extern struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr, 34extern struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr,
29 struct i2c_adapter *i2c); 35 struct i2c_adapter *i2c,
36 enum tda18271_i2c_gate gate);
30#else 37#else
31static inline struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, 38static inline struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe,
32 u8 addr, 39 u8 addr,
33 struct i2c_adapter *i2c) 40 struct i2c_adapter *i2c,
41 enum tda18271_i2c_gate gate);
34{ 42{
35 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__); 43 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__);
36 return NULL; 44 return NULL;