aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/tda18271-fe.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-12-01 15:40:16 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:03:12 -0500
commitefce841093589bfef571a07e18e5446def9e04b4 (patch)
treeab2627d9dc1058b8a2834cc0203d7ee8e3c18983 /drivers/media/dvb/frontends/tda18271-fe.c
parent2b057e8dc6cc8318956fef92b77a4e86985e84d9 (diff)
V4L/DVB (6723): tda18271: only force init once during attach
Once the image rejection calibration procedure has been successful, we should not initialize the tuner registers again. 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-fe.c')
-rw-r--r--drivers/media/dvb/frontends/tda18271-fe.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/tda18271-fe.c b/drivers/media/dvb/frontends/tda18271-fe.c
index 726e102cbc5..25c127f67c2 100644
--- a/drivers/media/dvb/frontends/tda18271-fe.c
+++ b/drivers/media/dvb/frontends/tda18271-fe.c
@@ -337,6 +337,20 @@ static int tda18271_init_regs(struct dvb_frontend *fe)
337 return 0; 337 return 0;
338} 338}
339 339
340static int tda18271_init(struct dvb_frontend *fe)
341{
342 struct tda18271_priv *priv = fe->tuner_priv;
343 unsigned char *regs = priv->tda18271_regs;
344
345 tda18271_read_regs(fe);
346
347 /* test IR_CAL_OK to see if we need init */
348 if ((regs[R_EP1] & 0x08) == 0)
349 tda18271_init_regs(fe);
350
351 return 0;
352}
353
340static int tda18271_tune(struct dvb_frontend *fe, 354static int tda18271_tune(struct dvb_frontend *fe,
341 u32 ifc, u32 freq, u32 bw, u8 std) 355 u32 ifc, u32 freq, u32 bw, u8 std)
342{ 356{
@@ -742,7 +756,7 @@ static struct dvb_tuner_ops tda18271_tuner_ops = {
742 .frequency_max = 864000000, 756 .frequency_max = 864000000,
743 .frequency_step = 62500 757 .frequency_step = 62500
744 }, 758 },
745 .init = tda18271_init_regs, 759 .init = tda18271_init,
746 .set_params = tda18271_set_params, 760 .set_params = tda18271_set_params,
747 .set_analog_params = tda18271_set_analog_params, 761 .set_analog_params = tda18271_set_analog_params,
748 .release = tda18271_release, 762 .release = tda18271_release,
@@ -768,6 +782,8 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr,
768 782
769 fe->tuner_priv = priv; 783 fe->tuner_priv = priv;
770 784
785 tda18271_init_regs(fe);
786
771 return fe; 787 return fe;
772} 788}
773EXPORT_SYMBOL_GPL(tda18271_attach); 789EXPORT_SYMBOL_GPL(tda18271_attach);