summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2011-04-22 06:00:22 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-20 09:29:25 -0300
commit853e3b2930001534b88fb36e936c9a734a79046c (patch)
treec00a9e6e8fb0229cfcf0b233bf2960768a5bfd4b
parent08921ac9e9d185d6f472238ea9c79a3a70eb7ea7 (diff)
downloadblackbird-op-linux-853e3b2930001534b88fb36e936c9a734a79046c.tar.gz
blackbird-op-linux-853e3b2930001534b88fb36e936c9a734a79046c.zip
[media] IX2505V Keep I2C gate control alive
Gate could close after first I2C message. On stv0288 it does. Keep 2nd and 3rd message I2C gate control alive. Remove unnecessary gate closing in this module. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb/frontends/ix2505v.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/dvb/frontends/ix2505v.c b/drivers/media/dvb/frontends/ix2505v.c
index 6c2e929bd79f..9a517a4bf96d 100644
--- a/drivers/media/dvb/frontends/ix2505v.c
+++ b/drivers/media/dvb/frontends/ix2505v.c
@@ -218,11 +218,13 @@ static int ix2505v_set_params(struct dvb_frontend *fe,
fe->ops.i2c_gate_ctrl(fe, 1);
len = sizeof(data);
-
ret |= ix2505v_write(state, data, len);
data[2] |= 0x4; /* set TM = 1 other bits same */
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 1);
+
len = 1;
ret |= ix2505v_write(state, &data[2], len); /* write byte 4 only */
@@ -233,12 +235,12 @@ static int ix2505v_set_params(struct dvb_frontend *fe,
deb_info("Data 2=[%x%x]\n", data[2], data[3]);
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 1);
+
len = 2;
ret |= ix2505v_write(state, &data[2], len); /* write byte 4 & 5 */
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 0);
-
if (state->config->min_delay_ms)
msleep(state->config->min_delay_ms);
OpenPOWER on IntegriCloud