aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/s5h1411.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/frontends/s5h1411.c')
-rw-r--r--drivers/media/dvb/frontends/s5h1411.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/s5h1411.c b/drivers/media/dvb/frontends/s5h1411.c
index c79e23ded4d7..4cb056140767 100644
--- a/drivers/media/dvb/frontends/s5h1411.c
+++ b/drivers/media/dvb/frontends/s5h1411.c
@@ -470,6 +470,20 @@ static int s5h1411_set_spectralinversion(struct dvb_frontend *fe, int inversion)
470 return s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0x24, val); 470 return s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0x24, val);
471} 471}
472 472
473static int s5h1411_set_serialmode(struct dvb_frontend *fe, int serial)
474{
475 struct s5h1411_state *state = fe->demodulator_priv;
476 u16 val;
477
478 dprintk("%s(%d)\n", __func__, serial);
479 val = s5h1411_readreg(state, S5H1411_I2C_TOP_ADDR, 0xbd) & ~0x100;
480
481 if (serial == 1)
482 val |= 0x100;
483
484 return s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0xbd, val);
485}
486
473static int s5h1411_enable_modulation(struct dvb_frontend *fe, 487static int s5h1411_enable_modulation(struct dvb_frontend *fe,
474 fe_modulation_t m) 488 fe_modulation_t m)
475{ 489{
@@ -611,10 +625,10 @@ static int s5h1411_init(struct dvb_frontend *fe)
611 625
612 if (state->config->output_mode == S5H1411_SERIAL_OUTPUT) 626 if (state->config->output_mode == S5H1411_SERIAL_OUTPUT)
613 /* Serial */ 627 /* Serial */
614 s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0xbd, 0x1101); 628 s5h1411_set_serialmode(fe, 1);
615 else 629 else
616 /* Parallel */ 630 /* Parallel */
617 s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0xbd, 0x1001); 631 s5h1411_set_serialmode(fe, 0);
618 632
619 s5h1411_set_spectralinversion(fe, state->config->inversion); 633 s5h1411_set_spectralinversion(fe, state->config->inversion);
620 s5h1411_set_if_freq(fe, state->config->vsb_if); 634 s5h1411_set_if_freq(fe, state->config->vsb_if);