aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/tda18271-fe.c
diff options
context:
space:
mode:
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);