aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb/frontends/tda18271.h
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-01-02 03:01:54 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 19:04:36 -0200
commitf21e0d7f0513e743b14df3197fdeeb9a9b7edbb2 (patch)
treefed91b8a1b032f3ebf827378b0517ceca9d7793a /drivers/media/dvb/frontends/tda18271.h
parent59067f7ed491ec95e6e9033e35e1ae726cff3cee (diff)
V4L/DVB (6962): tda18271: allow device-specific configuration of IF frequency and std bits
Allow drivers to pass device-specific configuration parameters during attach. If these parameters are omitted, default values will be used. 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.h30
1 files changed, 28 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/tda18271.h b/drivers/media/dvb/frontends/tda18271.h
index f5356810331..36a3a548a6f 100644
--- a/drivers/media/dvb/frontends/tda18271.h
+++ b/drivers/media/dvb/frontends/tda18271.h
@@ -24,21 +24,47 @@
#include <linux/i2c.h>
#include "dvb_frontend.h"
+struct tda18271_std_map_item {
+ u32 if_freq;
+ u8 std_bits;
+};
+
+struct tda18271_std_map {
+ struct tda18271_std_map_item atv_b;
+ struct tda18271_std_map_item atv_dk;
+ struct tda18271_std_map_item atv_gh;
+ struct tda18271_std_map_item atv_i;
+ struct tda18271_std_map_item atv_l;
+ struct tda18271_std_map_item atv_lc;
+ struct tda18271_std_map_item atv_mn;
+ struct tda18271_std_map_item atsc_6;
+ struct tda18271_std_map_item dvbt_6;
+ struct tda18271_std_map_item dvbt_7;
+ struct tda18271_std_map_item dvbt_8;
+ struct tda18271_std_map_item qam_6;
+ struct tda18271_std_map_item qam_8;
+};
+
enum tda18271_i2c_gate {
TDA18271_GATE_AUTO = 0,
TDA18271_GATE_ANALOG,
TDA18271_GATE_DIGITAL,
};
+struct tda18271_config {
+ struct tda18271_std_map *std_map;
+ enum tda18271_i2c_gate gate;
+};
+
#if defined(CONFIG_DVB_TDA18271) || (defined(CONFIG_DVB_TDA18271_MODULE) && defined(MODULE))
extern struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr,
struct i2c_adapter *i2c,
- enum tda18271_i2c_gate gate);
+ struct tda18271_config *cfg);
#else
static inline struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe,
u8 addr,
struct i2c_adapter *i2c,
- enum tda18271_i2c_gate gate)
+ struct tda18271_config *cfg)
{
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__);
return NULL;