diff options
| -rw-r--r-- | drivers/media/dvb/frontends/zl10353.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/zl10353.c b/drivers/media/dvb/frontends/zl10353.c index 0d8241de89ee..50dac2054353 100644 --- a/drivers/media/dvb/frontends/zl10353.c +++ b/drivers/media/dvb/frontends/zl10353.c | |||
| @@ -142,14 +142,16 @@ static int zl10353_set_parameters(struct dvb_frontend *fe, | |||
| 142 | zl10353_single_write(fe, 0x66, 0xE9); | 142 | zl10353_single_write(fe, 0x66, 0xE9); |
| 143 | zl10353_single_write(fe, 0x6C, 0xCD); | 143 | zl10353_single_write(fe, 0x6C, 0xCD); |
| 144 | zl10353_single_write(fe, 0x6D, 0x7E); | 144 | zl10353_single_write(fe, 0x6D, 0x7E); |
| 145 | zl10353_single_write(fe, 0x62, 0x0A); | 145 | if (fe->ops.i2c_gate_ctrl) |
| 146 | fe->ops.i2c_gate_ctrl(fe, 0); | ||
| 146 | 147 | ||
| 147 | // if there is no attached secondary tuner, we call set_params to program | 148 | // if there is no attached secondary tuner, we call set_params to program |
| 148 | // a potential tuner attached somewhere else | 149 | // a potential tuner attached somewhere else |
| 149 | if (state->config.no_tuner) { | 150 | if (state->config.no_tuner) { |
| 150 | if (fe->ops.tuner_ops.set_params) { | 151 | if (fe->ops.tuner_ops.set_params) { |
| 151 | fe->ops.tuner_ops.set_params(fe, param); | 152 | fe->ops.tuner_ops.set_params(fe, param); |
| 152 | if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); | 153 | if (fe->ops.i2c_gate_ctrl) |
| 154 | fe->ops.i2c_gate_ctrl(fe, 0); | ||
| 153 | } | 155 | } |
| 154 | } | 156 | } |
| 155 | 157 | ||
| @@ -294,6 +296,16 @@ static int zl10353_init(struct dvb_frontend *fe) | |||
| 294 | return 0; | 296 | return 0; |
| 295 | } | 297 | } |
| 296 | 298 | ||
| 299 | static int zl10353_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) | ||
| 300 | { | ||
| 301 | u8 val = 0x0a; | ||
| 302 | |||
| 303 | if (enable) | ||
| 304 | val |= 0x10; | ||
| 305 | |||
| 306 | return zl10353_single_write(fe, 0x62, val); | ||
| 307 | } | ||
| 308 | |||
| 297 | static void zl10353_release(struct dvb_frontend *fe) | 309 | static void zl10353_release(struct dvb_frontend *fe) |
| 298 | { | 310 | { |
| 299 | struct zl10353_state *state = fe->demodulator_priv; | 311 | struct zl10353_state *state = fe->demodulator_priv; |
| @@ -352,6 +364,7 @@ static struct dvb_frontend_ops zl10353_ops = { | |||
| 352 | 364 | ||
| 353 | .init = zl10353_init, | 365 | .init = zl10353_init, |
| 354 | .sleep = zl10353_sleep, | 366 | .sleep = zl10353_sleep, |
| 367 | .i2c_gate_ctrl = zl10353_i2c_gate_ctrl, | ||
| 355 | .write = zl10353_write, | 368 | .write = zl10353_write, |
| 356 | 369 | ||
| 357 | .set_frontend = zl10353_set_parameters, | 370 | .set_frontend = zl10353_set_parameters, |
