diff options
author | Igor M. Liplianin <liplianin@me.by> | 2008-10-05 14:52:18 +0300 |
---|---|---|
committer | Igor M. Liplianin <liplianin@me.by> | 2008-10-05 14:52:18 +0300 |
commit | 7e8210054d8fdde51bf14c22cc8279f90396fd11 (patch) | |
tree | dd89d2bc0d6731f070e169dcea2d3001901b3d70 /linux/drivers/media/dvb/frontends/stv0288.c | |
parent | b42ee9569d2b79420ffc6f113c7cb94bd335b2aa (diff) | |
download | mediapointer-dvb-s2-7e8210054d8fdde51bf14c22cc8279f90396fd11.tar.gz mediapointer-dvb-s2-7e8210054d8fdde51bf14c22cc8279f90396fd11.tar.bz2 |
Allow custom inittab for ST STV0288 demodulator.
From: Igor M. Liplianin <liplianin@me.by>
Allow custom inittab for ST STV0288 demodulator,
as it is needed for DvbWorld USB card.
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Diffstat (limited to 'linux/drivers/media/dvb/frontends/stv0288.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/stv0288.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/linux/drivers/media/dvb/frontends/stv0288.c b/linux/drivers/media/dvb/frontends/stv0288.c index 90e72e771..ff1194de3 100644 --- a/linux/drivers/media/dvb/frontends/stv0288.c +++ b/linux/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; } |