aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners/mxl5007t.c
diff options
context:
space:
mode:
authorJose Alberto Reguero <jareguero@telefonica.net>2013-02-03 17:30:38 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-11 05:38:28 -0500
commitfe4860af002a4516dd878f7297b61e186c475b35 (patch)
treee96cf3c7c7728e349642358a1e406631663c1516 /drivers/media/tuners/mxl5007t.c
parent47a09af68ba50695c46511b8ed7f036d249bba48 (diff)
[media] [PATH,1/2] mxl5007 move reset to attach
This patch move the soft reset to the attach function because with dual tuners, when one tuner do reset, the other one is perturbed, and the stream has errors. Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/tuners/mxl5007t.c')
-rw-r--r--drivers/media/tuners/mxl5007t.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/media/tuners/mxl5007t.c b/drivers/media/tuners/mxl5007t.c
index 69e453ef0a1a..eb61304c260d 100644
--- a/drivers/media/tuners/mxl5007t.c
+++ b/drivers/media/tuners/mxl5007t.c
@@ -531,10 +531,6 @@ static int mxl5007t_tuner_init(struct mxl5007t_state *state,
531 struct reg_pair_t *init_regs; 531 struct reg_pair_t *init_regs;
532 int ret; 532 int ret;
533 533
534 ret = mxl5007t_soft_reset(state);
535 if (mxl_fail(ret))
536 goto fail;
537
538 /* calculate initialization reg array */ 534 /* calculate initialization reg array */
539 init_regs = mxl5007t_calc_init_regs(state, mode); 535 init_regs = mxl5007t_calc_init_regs(state, mode);
540 536
@@ -900,7 +896,20 @@ struct dvb_frontend *mxl5007t_attach(struct dvb_frontend *fe,
900 /* existing tuner instance */ 896 /* existing tuner instance */
901 break; 897 break;
902 } 898 }
899
900 if (fe->ops.i2c_gate_ctrl)
901 fe->ops.i2c_gate_ctrl(fe, 1);
902
903 ret = mxl5007t_soft_reset(state);
904
905 if (fe->ops.i2c_gate_ctrl)
906 fe->ops.i2c_gate_ctrl(fe, 0);
907
908 if (mxl_fail(ret))
909 goto fail;
910
903 fe->tuner_priv = state; 911 fe->tuner_priv = state;
912
904 mutex_unlock(&mxl5007t_list_mutex); 913 mutex_unlock(&mxl5007t_list_mutex);
905 914
906 memcpy(&fe->ops.tuner_ops, &mxl5007t_tuner_ops, 915 memcpy(&fe->ops.tuner_ops, &mxl5007t_tuner_ops,