diff options
author | Igor M. Liplianin <liplianin@me.by> | 2008-10-05 11:52:18 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-13 14:26:01 (GMT) |
commit | de9be0eaae2a23b1782ae0d271961b83abc6e200 (patch) | |
tree | 45bd5e4d81e1a7988d762539c4c1eefb6f7f69a6 /drivers/media/dvb/frontends/stv0288.c | |
parent | 82d7669dc3c0e795c24111fed88e9d5d70f209e0 (diff) | |
download | linux-fsl-qoriq-de9be0eaae2a23b1782ae0d271961b83abc6e200.tar.xz |
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/dvb/frontends/stv0288.c')
-rw-r--r-- | drivers/media/dvb/frontends/stv0288.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/media/dvb/frontends/stv0288.c b/drivers/media/dvb/frontends/stv0288.c index 90e72e7..ff1194d 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) { struct stv0288_state *state = fe->demodulator_priv; int i; + u8 reg; + u8 val; dprintk("stv0288: init chip\n"); stv0288_writeregI(state, 0x41, 0x04); msleep(50); - for (i = 0; !(stv0288_inittab[i] == 0xff && + /* we have default inittab */ + if (state->config->inittab == NULL) { + for (i = 0; !(stv0288_inittab[i] == 0xff && stv0288_inittab[i + 1] == 0xff); i += 2) - stv0288_writeregI(state, stv0288_inittab[i], - stv0288_inittab[i + 1]); - + stv0288_writeregI(state, stv0288_inittab[i], + stv0288_inittab[i + 1]); + } else { + for (i = 0; ; i += 2) { + reg = state->config->inittab[i]; + val = state->config->inittab[i+1]; + if (reg == 0xff && val == 0xff) + break; + stv0288_writeregI(state, reg, val); + } + } return 0; } |