--- zzzz-none-000/linux-3.10.107/drivers/media/dvb-frontends/lgdt3305.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/media/dvb-frontends/lgdt3305.c 2021-02-04 17:41:59.000000000 +0000 @@ -60,7 +60,7 @@ struct dvb_frontend frontend; - fe_modulation_t current_modulation; + enum fe_modulation current_modulation; u32 current_frequency; u32 snr; }; @@ -236,12 +236,13 @@ return lgdt3305_set_reg_bit(state, LGDT3305_TP_CTRL_1, 5, mode); } -static int lgdt3305_mpeg_mode_polarity(struct lgdt3305_state *state, - enum lgdt3305_tp_clock_edge edge, - enum lgdt3305_tp_valid_polarity valid) +static int lgdt3305_mpeg_mode_polarity(struct lgdt3305_state *state) { u8 val; int ret; + enum lgdt3305_tp_clock_edge edge = state->cfg->tpclk_edge; + enum lgdt3305_tp_clock_mode mode = state->cfg->tpclk_mode; + enum lgdt3305_tp_valid_polarity valid = state->cfg->tpvalid_polarity; lg_dbg("edge = %d, valid = %d\n", edge, valid); @@ -253,6 +254,8 @@ if (edge) val |= 0x08; + if (mode) + val |= 0x40; if (valid) val |= 0x01; @@ -740,9 +743,7 @@ goto fail; /* lgdt3305_mpeg_mode_polarity calls lgdt3305_soft_reset */ - ret = lgdt3305_mpeg_mode_polarity(state, - state->cfg->tpclk_edge, - state->cfg->tpvalid_polarity); + ret = lgdt3305_mpeg_mode_polarity(state); fail: return ret; } @@ -806,9 +807,7 @@ goto fail; /* lgdt3305_mpeg_mode_polarity calls lgdt3305_soft_reset */ - ret = lgdt3305_mpeg_mode_polarity(state, - state->cfg->tpclk_edge, - state->cfg->tpvalid_polarity); + ret = lgdt3305_mpeg_mode_polarity(state); fail: return ret; } @@ -913,7 +912,7 @@ return ret; } -static int lgdt3305_read_status(struct dvb_frontend *fe, fe_status_t *status) +static int lgdt3305_read_status(struct dvb_frontend *fe, enum fe_status *status) { struct lgdt3305_state *state = fe->demodulator_priv; u8 val; @@ -1176,6 +1175,7 @@ }, .i2c_gate_ctrl = lgdt3305_i2c_gate_ctrl, .init = lgdt3305_init, + .sleep = lgdt3305_sleep, .set_frontend = lgdt3304_set_parameters, .get_frontend = lgdt3305_get_frontend, .get_tune_settings = lgdt3305_get_tune_settings, @@ -1214,9 +1214,3 @@ MODULE_AUTHOR("Michael Krufky "); MODULE_LICENSE("GPL"); MODULE_VERSION("0.2"); - -/* - * Local variables: - * c-basic-offset: 8 - * End: - */