diff options
author | Manu Abraham <abraham.manu@gmail.com> | 2009-04-07 04:19:54 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 17:20:38 -0400 |
commit | 017eb0381fedbfdcad1e8e536d014c4064e6687f (patch) | |
tree | b88ea3f72137c515ad5fd18785787a07915d5a13 /drivers/media/dvb/frontends/stv090x.c | |
parent | dd4c2b3f6a2d30602d22485ab725c84f2fb074b6 (diff) |
V4L/DVB (11581): stv090x and stv6110x: fix repeater level setup and ref clock
* Reference clock was unused
* Fix missing repeater level setup
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/stv090x.c')
-rw-r--r-- | drivers/media/dvb/frontends/stv090x.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/stv090x.c b/drivers/media/dvb/frontends/stv090x.c index a65f1b7849a1..e80d163c767f 100644 --- a/drivers/media/dvb/frontends/stv090x.c +++ b/drivers/media/dvb/frontends/stv090x.c | |||
@@ -640,16 +640,19 @@ static int stv090x_write_reg(struct stv090x_state *state, unsigned int reg, u8 d | |||
640 | static int stv090x_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) | 640 | static int stv090x_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) |
641 | { | 641 | { |
642 | struct stv090x_state *state = fe->demodulator_priv; | 642 | struct stv090x_state *state = fe->demodulator_priv; |
643 | const struct stv090x_config *config = state->config; | ||
643 | u32 reg; | 644 | u32 reg; |
644 | 645 | ||
645 | reg = STV090x_READ_DEMOD(state, I2CRPT); | 646 | reg = STV090x_READ_DEMOD(state, I2CRPT); |
646 | 647 | // STV090x_SETFIELD_Px(reg, ENARPT_LEVEL_FIELD, config->repeater_level); | |
647 | if (enable) { | 648 | if (enable) { |
649 | dprintk(FE_DEBUG, 1, "Enable Gate"); | ||
648 | STV090x_SETFIELD_Px(reg, I2CT_ON_FIELD, 1); | 650 | STV090x_SETFIELD_Px(reg, I2CT_ON_FIELD, 1); |
649 | if (STV090x_WRITE_DEMOD(state, I2CRPT, reg) < 0) | 651 | if (STV090x_WRITE_DEMOD(state, I2CRPT, reg) < 0) |
650 | goto err; | 652 | goto err; |
651 | 653 | ||
652 | } else { | 654 | } else { |
655 | dprintk(FE_DEBUG, 1, "Disable Gate"); | ||
653 | STV090x_SETFIELD_Px(reg, I2CT_ON_FIELD, 0); | 656 | STV090x_SETFIELD_Px(reg, I2CT_ON_FIELD, 0); |
654 | if ((STV090x_WRITE_DEMOD(state, I2CRPT, reg)) < 0) | 657 | if ((STV090x_WRITE_DEMOD(state, I2CRPT, reg)) < 0) |
655 | goto err; | 658 | goto err; |
@@ -3773,6 +3776,7 @@ static int stv090x_setup(struct dvb_frontend *fe) | |||
3773 | const struct stv090x_reg *stv090x_initval = NULL; | 3776 | const struct stv090x_reg *stv090x_initval = NULL; |
3774 | const struct stv090x_reg *stv090x_cut20_val = NULL; | 3777 | const struct stv090x_reg *stv090x_cut20_val = NULL; |
3775 | unsigned long t1_size = 0, t2_size = 0; | 3778 | unsigned long t1_size = 0, t2_size = 0; |
3779 | u32 reg = 0; | ||
3776 | 3780 | ||
3777 | int i; | 3781 | int i; |
3778 | 3782 | ||
@@ -3799,7 +3803,8 @@ static int stv090x_setup(struct dvb_frontend *fe) | |||
3799 | if (STV090x_WRITE_DEMOD(state, TNRCFG, 0x6c) < 0) /* check register ! (No Tuner Mode) */ | 3803 | if (STV090x_WRITE_DEMOD(state, TNRCFG, 0x6c) < 0) /* check register ! (No Tuner Mode) */ |
3800 | goto err; | 3804 | goto err; |
3801 | 3805 | ||
3802 | if (STV090x_WRITE_DEMOD(state, I2CRPT, 0x00) < 0) /* repeater OFF */ | 3806 | STV090x_SETFIELD_Px(reg, ENARPT_LEVEL_FIELD, config->repeater_level); |
3807 | if (STV090x_WRITE_DEMOD(state, I2CRPT, reg) < 0) /* repeater OFF */ | ||
3803 | goto err; | 3808 | goto err; |
3804 | 3809 | ||
3805 | if (stv090x_write_reg(state, STV090x_NCOARSE, 0x13) < 0) /* set PLL divider */ | 3810 | if (stv090x_write_reg(state, STV090x_NCOARSE, 0x13) < 0) /* set PLL divider */ |