diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/frontends/stv0288.c | 20 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/stv0288.h | 2 |
2 files changed, 18 insertions, 4 deletions
diff --git a/drivers/media/dvb/frontends/stv0288.c b/drivers/media/dvb/frontends/stv0288.c index 90e72e771a04..ff1194de34c0 100644 --- a/drivers/media/dvb/frontends/stv0288.c +++ b/drivers/media/dvb/frontends/stv0288.c | |||
@@ -328,16 +328,28 @@ static int stv0288_init(struct dvb_frontend *fe) | |||
328 | { | 328 | { |
329 | struct stv0288_state *state = fe->demodulator_priv; | 329 | struct stv0288_state *state = fe->demodulator_priv; |
330 | int i; | 330 | int i; |
331 | u8 reg; | ||
332 | u8 val; | ||
331 | 333 | ||
332 | dprintk("stv0288: init chip\n"); | 334 | dprintk("stv0288: init chip\n"); |
333 | stv0288_writeregI(state, 0x41, 0x04); | 335 | stv0288_writeregI(state, 0x41, 0x04); |
334 | msleep(50); | 336 | msleep(50); |
335 | 337 | ||
336 | for (i = 0; !(stv0288_inittab[i] == 0xff && | 338 | /* we have default inittab */ |
339 | if (state->config->inittab == NULL) { | ||
340 | for (i = 0; !(stv0288_inittab[i] == 0xff && | ||
337 | stv0288_inittab[i + 1] == 0xff); i += 2) | 341 | stv0288_inittab[i + 1] == 0xff); i += 2) |
338 | stv0288_writeregI(state, stv0288_inittab[i], | 342 | stv0288_writeregI(state, stv0288_inittab[i], |
339 | stv0288_inittab[i + 1]); | 343 | stv0288_inittab[i + 1]); |
340 | 344 | } else { | |
345 | for (i = 0; ; i += 2) { | ||
346 | reg = state->config->inittab[i]; | ||
347 | val = state->config->inittab[i+1]; | ||
348 | if (reg == 0xff && val == 0xff) | ||
349 | break; | ||
350 | stv0288_writeregI(state, reg, val); | ||
351 | } | ||
352 | } | ||
341 | return 0; | 353 | return 0; |
342 | } | 354 | } |
343 | 355 | ||
diff --git a/drivers/media/dvb/frontends/stv0288.h b/drivers/media/dvb/frontends/stv0288.h index aa0cdd273040..f2b53db0606d 100644 --- a/drivers/media/dvb/frontends/stv0288.h +++ b/drivers/media/dvb/frontends/stv0288.h | |||
@@ -34,6 +34,8 @@ struct stv0288_config { | |||
34 | /* the demodulator's i2c address */ | 34 | /* the demodulator's i2c address */ |
35 | u8 demod_address; | 35 | u8 demod_address; |
36 | 36 | ||
37 | u8* inittab; | ||
38 | |||
37 | /* minimum delay before retuning */ | 39 | /* minimum delay before retuning */ |
38 | int min_delay_ms; | 40 | int min_delay_ms; |
39 | 41 | ||