aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Alberto Reguero <jareguero@telefonica.net>2013-02-03 17:40:24 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-11 05:38:46 -0500
commit02f9cf96df57575acea2e6eb4041e9f3ecd32548 (patch)
tree7fda4b6fcd72811dca236c0d326dda341395bb70
parentfe4860af002a4516dd878f7297b61e186c475b35 (diff)
[media] [PATH,2/2] mxl5007 move loop_thru to attach
This patch move the loop_thru configuration to the attach function, because with dual tuners until loop_tru configuration the other tuner don't work. 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>
-rw-r--r--drivers/media/tuners/mxl5007t.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/media/tuners/mxl5007t.c b/drivers/media/tuners/mxl5007t.c
index eb61304c260d..1810ad66888e 100644
--- a/drivers/media/tuners/mxl5007t.c
+++ b/drivers/media/tuners/mxl5007t.c
@@ -374,7 +374,6 @@ static struct reg_pair_t *mxl5007t_calc_init_regs(struct mxl5007t_state *state,
374 mxl5007t_set_if_freq_bits(state, cfg->if_freq_hz, cfg->invert_if); 374 mxl5007t_set_if_freq_bits(state, cfg->if_freq_hz, cfg->invert_if);
375 mxl5007t_set_xtal_freq_bits(state, cfg->xtal_freq_hz); 375 mxl5007t_set_xtal_freq_bits(state, cfg->xtal_freq_hz);
376 376
377 set_reg_bits(state->tab_init, 0x04, 0x01, cfg->loop_thru_enable);
378 set_reg_bits(state->tab_init, 0x03, 0x08, cfg->clk_out_enable << 3); 377 set_reg_bits(state->tab_init, 0x03, 0x08, cfg->clk_out_enable << 3);
379 set_reg_bits(state->tab_init, 0x03, 0x07, cfg->clk_out_amp); 378 set_reg_bits(state->tab_init, 0x03, 0x07, cfg->clk_out_amp);
380 379
@@ -908,6 +907,18 @@ struct dvb_frontend *mxl5007t_attach(struct dvb_frontend *fe,
908 if (mxl_fail(ret)) 907 if (mxl_fail(ret))
909 goto fail; 908 goto fail;
910 909
910 if (fe->ops.i2c_gate_ctrl)
911 fe->ops.i2c_gate_ctrl(fe, 1);
912
913 ret = mxl5007t_write_reg(state, 0x04,
914 state->config->loop_thru_enable);
915
916 if (fe->ops.i2c_gate_ctrl)
917 fe->ops.i2c_gate_ctrl(fe, 0);
918
919 if (mxl_fail(ret))
920 goto fail;
921
911 fe->tuner_priv = state; 922 fe->tuner_priv = state;
912 923
913 mutex_unlock(&mxl5007t_list_mutex); 924 mutex_unlock(&mxl5007t_list_mutex);