diff options
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r-- | drivers/media/dvb/frontends/s5h1420.c | 11 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/s5h1420.h | 8 |
2 files changed, 12 insertions, 7 deletions
diff --git a/drivers/media/dvb/frontends/s5h1420.c b/drivers/media/dvb/frontends/s5h1420.c index 747d3fa2e5e5..2e9fd2893ede 100644 --- a/drivers/media/dvb/frontends/s5h1420.c +++ b/drivers/media/dvb/frontends/s5h1420.c | |||
@@ -59,7 +59,7 @@ struct s5h1420_state { | |||
59 | * it does not support repeated-start, workaround: write addr-1 | 59 | * it does not support repeated-start, workaround: write addr-1 |
60 | * and then read | 60 | * and then read |
61 | */ | 61 | */ |
62 | u8 shadow[255]; | 62 | u8 shadow[256]; |
63 | }; | 63 | }; |
64 | 64 | ||
65 | static u32 s5h1420_getsymbolrate(struct s5h1420_state* state); | 65 | static u32 s5h1420_getsymbolrate(struct s5h1420_state* state); |
@@ -94,8 +94,11 @@ static u8 s5h1420_readreg(struct s5h1420_state *state, u8 reg) | |||
94 | if (ret != 3) | 94 | if (ret != 3) |
95 | return ret; | 95 | return ret; |
96 | } else { | 96 | } else { |
97 | ret = i2c_transfer(state->i2c, &msg[1], 2); | 97 | ret = i2c_transfer(state->i2c, &msg[1], 1); |
98 | if (ret != 2) | 98 | if (ret != 1) |
99 | return ret; | ||
100 | ret = i2c_transfer(state->i2c, &msg[2], 1); | ||
101 | if (ret != 1) | ||
99 | return ret; | 102 | return ret; |
100 | } | 103 | } |
101 | 104 | ||
@@ -823,7 +826,7 @@ static int s5h1420_init (struct dvb_frontend* fe) | |||
823 | struct s5h1420_state* state = fe->demodulator_priv; | 826 | struct s5h1420_state* state = fe->demodulator_priv; |
824 | 827 | ||
825 | /* disable power down and do reset */ | 828 | /* disable power down and do reset */ |
826 | state->CON_1_val = 0x10; | 829 | state->CON_1_val = state->config->serial_mpeg << 4; |
827 | s5h1420_writereg(state, 0x02, state->CON_1_val); | 830 | s5h1420_writereg(state, 0x02, state->CON_1_val); |
828 | msleep(10); | 831 | msleep(10); |
829 | s5h1420_reset(state); | 832 | s5h1420_reset(state); |
diff --git a/drivers/media/dvb/frontends/s5h1420.h b/drivers/media/dvb/frontends/s5h1420.h index 4c913f142bc4..ff308136d865 100644 --- a/drivers/media/dvb/frontends/s5h1420.h +++ b/drivers/media/dvb/frontends/s5h1420.h | |||
@@ -32,10 +32,12 @@ struct s5h1420_config | |||
32 | u8 demod_address; | 32 | u8 demod_address; |
33 | 33 | ||
34 | /* does the inversion require inversion? */ | 34 | /* does the inversion require inversion? */ |
35 | u8 invert : 1; | 35 | u8 invert:1; |
36 | 36 | ||
37 | u8 repeated_start_workaround : 1; | 37 | u8 repeated_start_workaround:1; |
38 | u8 cdclk_polarity : 1; /* 1 == falling edge, 0 == raising edge */ | 38 | u8 cdclk_polarity:1; /* 1 == falling edge, 0 == raising edge */ |
39 | |||
40 | u8 serial_mpeg:1; | ||
39 | }; | 41 | }; |
40 | 42 | ||
41 | #if defined(CONFIG_DVB_S5H1420) || (defined(CONFIG_DVB_S5H1420_MODULE) && defined(MODULE)) | 43 | #if defined(CONFIG_DVB_S5H1420) || (defined(CONFIG_DVB_S5H1420_MODULE) && defined(MODULE)) |