aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb/frontends
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2006-09-19 12:51:40 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-10-03 15:12:36 -0300
commit6958effedb0dc709966c22e7fd0e8210b5401b84 (patch)
treee9a0d9768b1a5e53c6667309d946cb6c3204e3c0 /drivers/media/dvb/frontends
parentb7f54910ce018f93a74211136be46c09cefd80e2 (diff)
V4L/DVB (4648): Hauppauge Nova-T 500 support added
This changeset finalizes the support of the Hauppauge Nova-T 500 (Dual DVB-T). It adds correct AGC setting for the 3000P, correct firmware download state detection. Additionally it fixes the mt2060-driver to be able to be used with dvb_attach. Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r--drivers/media/dvb/frontends/dib3000mc.c1
-rw-r--r--drivers/media/dvb/frontends/mt2060.c10
-rw-r--r--drivers/media/dvb/frontends/mt2060.h2
3 files changed, 7 insertions, 6 deletions
diff --git a/drivers/media/dvb/frontends/dib3000mc.c b/drivers/media/dvb/frontends/dib3000mc.c
index d7c4a98da12..60e10dba368 100644
--- a/drivers/media/dvb/frontends/dib3000mc.c
+++ b/drivers/media/dvb/frontends/dib3000mc.c
@@ -830,6 +830,7 @@ struct dvb_frontend * dib3000mc_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr
st->cfg = cfg;
st->i2c_adap = i2c_adap;
+ st->i2c_addr = i2c_addr;
demod = &st->demod;
demod->demodulator_priv = st;
diff --git a/drivers/media/dvb/frontends/mt2060.c b/drivers/media/dvb/frontends/mt2060.c
index 19bd66a1816..450fad8d9b6 100644
--- a/drivers/media/dvb/frontends/mt2060.c
+++ b/drivers/media/dvb/frontends/mt2060.c
@@ -332,14 +332,14 @@ static const struct dvb_tuner_ops mt2060_tuner_ops = {
};
/* This functions tries to identify a MT2060 tuner by reading the PART/REV register. This is hasty. */
-int mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2060_config *cfg, u16 if1)
+struct dvb_frontend * mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2060_config *cfg, u16 if1)
{
struct mt2060_priv *priv = NULL;
u8 id = 0;
priv = kzalloc(sizeof(struct mt2060_priv), GFP_KERNEL);
if (priv == NULL)
- return -ENOMEM;
+ return NULL;
priv->cfg = cfg;
priv->i2c = i2c;
@@ -347,12 +347,12 @@ int mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt206
if (mt2060_readreg(priv,REG_PART_REV,&id) != 0) {
kfree(priv);
- return -ENODEV;
+ return NULL;
}
if (id != PART_REV) {
kfree(priv);
- return -ENODEV;
+ return NULL;
}
printk(KERN_INFO "MT2060: successfully identified (IF1 = %d)\n", if1);
memcpy(&fe->ops.tuner_ops, &mt2060_tuner_ops, sizeof(struct dvb_tuner_ops));
@@ -361,7 +361,7 @@ int mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt206
mt2060_calibrate(priv);
- return 0;
+ return fe;
}
EXPORT_SYMBOL(mt2060_attach);
diff --git a/drivers/media/dvb/frontends/mt2060.h b/drivers/media/dvb/frontends/mt2060.h
index 471d3326e29..fc12c790f91 100644
--- a/drivers/media/dvb/frontends/mt2060.h
+++ b/drivers/media/dvb/frontends/mt2060.h
@@ -30,6 +30,6 @@ struct mt2060_config {
u8 clock_out; /* 0 = off, 1 = CLK/1, 2 = CLK/2, 3 = CLK/4 */
};
-extern int mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2060_config *cfg, u16 if1);
+extern struct dvb_frontend * mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct mt2060_config *cfg, u16 if1);
#endif