aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb/frontends/s5h1420.c
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2008-09-06 13:31:58 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-04 23:00:46 -0300
commitc18c5ffe13e553cf670da521fe09150c36edeb61 (patch)
tree35ed5d296b5d8d05254110d2c15e7cfccd4e4598 /drivers/media/dvb/frontends/s5h1420.c
parentdda06a8e4610757def753ee3a541a0b1a1feb36b (diff)
V4L/DVB (9037): Fix support for Hauppauge Nova-S SE
Different backends have different input busses (saa7146, flexcop). To reflect that a config-option to the s5h1420-driver was added which makes the output mode selectable. Furthermore the s5h1420-driver is now doing the same i2c-method as it was done before adding support for other i2c-users. This patch needs to go into the current release of the kernel, as this driver is currently broken. (Thanks to Eberhard Kaltenhaeuser for helping out to debug this issue.) Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/s5h1420.c')
-rw-r--r--drivers/media/dvb/frontends/s5h1420.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/dvb/frontends/s5h1420.c b/drivers/media/dvb/frontends/s5h1420.c
index 747d3fa2e5e..7d6cb39da1d 100644
--- a/drivers/media/dvb/frontends/s5h1420.c
+++ b/drivers/media/dvb/frontends/s5h1420.c
@@ -94,8 +94,11 @@ static u8 s5h1420_readreg(struct s5h1420_state *state, u8 reg)
if (ret != 3)
return ret;
} else {
- ret = i2c_transfer(state->i2c, &msg[1], 2);
- if (ret != 2)
+ ret = i2c_transfer(state->i2c, &msg[1], 1);
+ if (ret != 1)
+ return ret;
+ ret = i2c_transfer(state->i2c, &msg[2], 1);
+ if (ret != 1)
return ret;
}
@@ -823,7 +826,7 @@ static int s5h1420_init (struct dvb_frontend* fe)
struct s5h1420_state* state = fe->demodulator_priv;
/* disable power down and do reset */
- state->CON_1_val = 0x10;
+ state->CON_1_val = state->config->serial_mpeg << 4;
s5h1420_writereg(state, 0x02, state->CON_1_val);
msleep(10);
s5h1420_reset(state);