aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorIgor M. Liplianin <liplianin@me.by>2008-10-05 07:52:18 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-13 10:26:01 -0400
commitde9be0eaae2a23b1782ae0d271961b83abc6e200 (patch)
tree45bd5e4d81e1a7988d762539c4c1eefb6f7f69a6 /drivers/media
parent82d7669dc3c0e795c24111fed88e9d5d70f209e0 (diff)
V4L/DVB (9174): Allow custom inittab for ST STV0288 demodulator.
Allow custom inittab for ST STV0288 demodulator, as it is needed for DvbWorld USB card. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/frontends/stv0288.c20
-rw-r--r--drivers/media/dvb/frontends/stv0288.h2
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