aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends/stv0910.c
diff options
context:
space:
mode:
authorDaniel Scheller2018-05-09 16:08:02 -0400
committerMauro Carvalho Chehab2018-05-28 17:46:04 -0400
commit7069018ec3afd532ad2043d58ee87821a03d8df4 (patch)
tree3d35df9f1b693d06b896bd26b93b3d9091688923 /drivers/media/dvb-frontends/stv0910.c
parentcaf2827cfe546ae2fbc27641c619be57c23d2a9b (diff)
media: dvb-frontends/stv0910: make TS speed configurable
Add a tsspeed config option to struct stv0910_cfg which can be used by users of the driver to set the (parallel) TS speed (higher speeds enable support for higher bitrate transponders). If tsspeed isn't set in the config, it'll default to a sane value. This commit also updates the two consumers of the stv0910 driver (ngene and ddbridge) to have a default tsspeed in their stv0910_cfg templates. Signed-off-by: Daniel Scheller <d.scheller@gmx.net> Tested-by: Richard Scobie <rascobie@slingshot.co.nz> Tested-by: Helmut Auer <post@helmutauer.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/dvb-frontends/stv0910.c')
-rw-r--r--drivers/media/dvb-frontends/stv0910.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/dvb-frontends/stv0910.c b/drivers/media/dvb-frontends/stv0910.c
index 7e9b016b3b28..41444fa1c0bb 100644
--- a/drivers/media/dvb-frontends/stv0910.c
+++ b/drivers/media/dvb-frontends/stv0910.c
@@ -1200,7 +1200,6 @@ static int probe(struct stv *state)
write_reg(state, RSTV0910_P1_TSCFGM, 0xC0); /* Manual speed */
write_reg(state, RSTV0910_P1_TSCFGL, 0x20);
- /* Speed = 67.5 MHz */
write_reg(state, RSTV0910_P1_TSSPEED, state->tsspeed);
write_reg(state, RSTV0910_P2_TSCFGH, state->tscfgh | 0x01);
@@ -1208,7 +1207,6 @@ static int probe(struct stv *state)
write_reg(state, RSTV0910_P2_TSCFGM, 0xC0); /* Manual speed */
write_reg(state, RSTV0910_P2_TSCFGL, 0x20);
- /* Speed = 67.5 MHz */
write_reg(state, RSTV0910_P2_TSSPEED, state->tsspeed);
/* Reset stream merger */
@@ -1790,7 +1788,8 @@ struct dvb_frontend *stv0910_attach(struct i2c_adapter *i2c,
state->tscfgh = 0x20 | (cfg->parallel ? 0 : 0x40);
state->tsgeneral = (cfg->parallel == 2) ? 0x02 : 0x00;
state->i2crpt = 0x0A | ((cfg->rptlvl & 0x07) << 4);
- state->tsspeed = 0x28;
+ /* use safe tsspeed value if unspecified through stv0910_cfg */
+ state->tsspeed = (cfg->tsspeed ? cfg->tsspeed : 0x28);
state->nr = nr;
state->regoff = state->nr ? 0 : 0x200;
state->search_range = 16000000;