Lines Matching refs:fe
56 struct dvb_frontend *fe; member
146 state->cfg->sleep(state->fe, 0); \
148 state->cfg->reset(state->fe,1); msleep(10); \
149 state->cfg->reset(state->fe,0); msleep(10); \
153 static int dib0070_set_bandwidth(struct dvb_frontend *fe) in dib0070_set_bandwidth() argument
155 struct dib0070_state *state = fe->tuner_priv; in dib0070_set_bandwidth()
158 if (state->fe->dtv_property_cache.bandwidth_hz/1000 > 7000) in dib0070_set_bandwidth()
160 else if (state->fe->dtv_property_cache.bandwidth_hz/1000 > 6000) in dib0070_set_bandwidth()
162 else if (state->fe->dtv_property_cache.bandwidth_hz/1000 > 5000) in dib0070_set_bandwidth()
170 if (state->fe->dtv_property_cache.delivery_system == SYS_ISDBT) { in dib0070_set_bandwidth()
239 static int dib0070_set_ctrl_lo5(struct dvb_frontend *fe, u8 vco_bias_trim, u8 hf_div_trim, u8 cp_cu… in dib0070_set_ctrl_lo5() argument
241 struct dib0070_state *state = fe->tuner_priv; in dib0070_set_ctrl_lo5()
248 void dib0070_ctrl_agc_filter(struct dvb_frontend *fe, u8 open) in dib0070_ctrl_agc_filter() argument
250 struct dib0070_state *state = fe->tuner_priv; in dib0070_ctrl_agc_filter()
335 static int dib0070_tune_digital(struct dvb_frontend *fe) in dib0070_tune_digital() argument
337 struct dib0070_state *state = fe->tuner_priv; in dib0070_tune_digital()
345 u8 band = (u8)BAND_OF_FREQUENCY(fe->dtv_property_cache.frequency/1000); in dib0070_tune_digital()
346 …u32 freq = fe->dtv_property_cache.frequency/1000 + (band == BAND_VHF ? state->cfg->freq_offset_khz… in dib0070_tune_digital()
349 …if (state->fe->dtv_property_cache.delivery_system == SYS_ISDBT && state->fe->dtv_property_cache.is… in dib0070_tune_digital()
350 if (((state->fe->dtv_property_cache.isdbt_sb_segment_count % 2) in dib0070_tune_digital()
351 …&& (state->fe->dtv_property_cache.isdbt_sb_segment_idx == ((state->fe->dtv_property_cache.isdbt_sb… in dib0070_tune_digital()
352 || (((state->fe->dtv_property_cache.isdbt_sb_segment_count % 2) == 0) in dib0070_tune_digital()
353 …&& (state->fe->dtv_property_cache.isdbt_sb_segment_idx == (state->fe->dtv_property_cache.isdbt_sb_… in dib0070_tune_digital()
354 || (((state->fe->dtv_property_cache.isdbt_sb_segment_count % 2) == 0) in dib0070_tune_digital()
355 …&& (state->fe->dtv_property_cache.isdbt_sb_segment_idx == ((state->fe->dtv_property_cache.isdbt_sb… in dib0070_tune_digital()
452 dib0070_set_ctrl_lo5(fe, 2, 4, 3, 0); in dib0070_tune_digital()
455 dib0070_set_ctrl_lo5(fe, 5, 4, 3, 1); in dib0070_tune_digital()
508 dib0070_set_bandwidth(fe); in dib0070_tune_digital()
517 static int dib0070_tune(struct dvb_frontend *fe) in dib0070_tune() argument
519 struct dib0070_state *state = fe->tuner_priv; in dib0070_tune()
525 ret = dib0070_tune_digital(fe); in dib0070_tune()
535 static int dib0070_wakeup(struct dvb_frontend *fe) in dib0070_wakeup() argument
537 struct dib0070_state *state = fe->tuner_priv; in dib0070_wakeup()
539 state->cfg->sleep(fe, 0); in dib0070_wakeup()
543 static int dib0070_sleep(struct dvb_frontend *fe) in dib0070_sleep() argument
545 struct dib0070_state *state = fe->tuner_priv; in dib0070_sleep()
547 state->cfg->sleep(fe, 1); in dib0070_sleep()
551 u8 dib0070_get_rf_output(struct dvb_frontend *fe) in dib0070_get_rf_output() argument
553 struct dib0070_state *state = fe->tuner_priv; in dib0070_get_rf_output()
558 int dib0070_set_rf_output(struct dvb_frontend *fe, u8 no) in dib0070_set_rf_output() argument
560 struct dib0070_state *state = fe->tuner_priv; in dib0070_set_rf_output()
632 u16 dib0070_wbd_offset(struct dvb_frontend *fe) in dib0070_wbd_offset() argument
634 struct dib0070_state *state = fe->tuner_priv; in dib0070_wbd_offset()
636 u32 freq = fe->dtv_property_cache.frequency/1000; in dib0070_wbd_offset()
650 static int dib0070_reset(struct dvb_frontend *fe) in dib0070_reset() argument
652 struct dib0070_state *state = fe->tuner_priv; in dib0070_reset()
705 dib0070_set_ctrl_lo5(fe, 2, 4, 3, 0); in dib0070_reset()
707 dib0070_set_ctrl_lo5(fe, 5, 4, state->cfg->charge_pump, in dib0070_reset()
717 static int dib0070_get_frequency(struct dvb_frontend *fe, u32 *frequency) in dib0070_get_frequency() argument
719 struct dib0070_state *state = fe->tuner_priv; in dib0070_get_frequency()
725 static int dib0070_release(struct dvb_frontend *fe) in dib0070_release() argument
727 kfree(fe->tuner_priv); in dib0070_release()
728 fe->tuner_priv = NULL; in dib0070_release()
749 struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dib007… in dib0070_attach() argument
757 state->fe = fe; in dib0070_attach()
759 fe->tuner_priv = state; in dib0070_attach()
761 if (dib0070_reset(fe) != 0) in dib0070_attach()
765 memcpy(&fe->ops.tuner_ops, &dib0070_ops, sizeof(struct dvb_tuner_ops)); in dib0070_attach()
767 fe->tuner_priv = state; in dib0070_attach()
768 return fe; in dib0070_attach()
772 fe->tuner_priv = NULL; in dib0070_attach()