Lines Matching refs:fe
365 static int s5h1411_softreset(struct dvb_frontend *fe) in s5h1411_softreset() argument
367 struct s5h1411_state *state = fe->demodulator_priv; in s5h1411_softreset()
376 static int s5h1411_set_if_freq(struct dvb_frontend *fe, int KHz) in s5h1411_set_if_freq() argument
378 struct s5h1411_state *state = fe->demodulator_priv; in s5h1411_set_if_freq()
415 static int s5h1411_set_mpeg_timing(struct dvb_frontend *fe, int mode) in s5h1411_set_mpeg_timing() argument
417 struct s5h1411_state *state = fe->demodulator_priv; in s5h1411_set_mpeg_timing()
445 static int s5h1411_set_spectralinversion(struct dvb_frontend *fe, int inversion) in s5h1411_set_spectralinversion() argument
447 struct s5h1411_state *state = fe->demodulator_priv; in s5h1411_set_spectralinversion()
460 static int s5h1411_set_serialmode(struct dvb_frontend *fe, int serial) in s5h1411_set_serialmode() argument
462 struct s5h1411_state *state = fe->demodulator_priv; in s5h1411_set_serialmode()
474 static int s5h1411_enable_modulation(struct dvb_frontend *fe, in s5h1411_enable_modulation() argument
477 struct s5h1411_state *state = fe->demodulator_priv; in s5h1411_enable_modulation()
490 s5h1411_set_if_freq(fe, state->config->vsb_if); in s5h1411_enable_modulation()
499 s5h1411_set_if_freq(fe, state->config->qam_if); in s5h1411_enable_modulation()
512 s5h1411_softreset(fe); in s5h1411_enable_modulation()
517 static int s5h1411_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) in s5h1411_i2c_gate_ctrl() argument
519 struct s5h1411_state *state = fe->demodulator_priv; in s5h1411_i2c_gate_ctrl()
529 static int s5h1411_set_gpio(struct dvb_frontend *fe, int enable) in s5h1411_set_gpio() argument
531 struct s5h1411_state *state = fe->demodulator_priv; in s5h1411_set_gpio()
545 static int s5h1411_set_powerstate(struct dvb_frontend *fe, int enable) in s5h1411_set_powerstate() argument
547 struct s5h1411_state *state = fe->demodulator_priv; in s5h1411_set_powerstate()
555 s5h1411_softreset(fe); in s5h1411_set_powerstate()
561 static int s5h1411_sleep(struct dvb_frontend *fe) in s5h1411_sleep() argument
563 return s5h1411_set_powerstate(fe, 1); in s5h1411_sleep()
566 static int s5h1411_register_reset(struct dvb_frontend *fe) in s5h1411_register_reset() argument
568 struct s5h1411_state *state = fe->demodulator_priv; in s5h1411_register_reset()
576 static int s5h1411_set_frontend(struct dvb_frontend *fe) in s5h1411_set_frontend() argument
578 struct dtv_frontend_properties *p = &fe->dtv_property_cache; in s5h1411_set_frontend()
579 struct s5h1411_state *state = fe->demodulator_priv; in s5h1411_set_frontend()
583 s5h1411_softreset(fe); in s5h1411_set_frontend()
587 s5h1411_enable_modulation(fe, p->modulation); in s5h1411_set_frontend()
589 if (fe->ops.tuner_ops.set_params) { in s5h1411_set_frontend()
590 if (fe->ops.i2c_gate_ctrl) in s5h1411_set_frontend()
591 fe->ops.i2c_gate_ctrl(fe, 1); in s5h1411_set_frontend()
593 fe->ops.tuner_ops.set_params(fe); in s5h1411_set_frontend()
595 if (fe->ops.i2c_gate_ctrl) in s5h1411_set_frontend()
596 fe->ops.i2c_gate_ctrl(fe, 0); in s5h1411_set_frontend()
601 s5h1411_softreset(fe); in s5h1411_set_frontend()
608 static int s5h1411_init(struct dvb_frontend *fe) in s5h1411_init() argument
610 struct s5h1411_state *state = fe->demodulator_priv; in s5h1411_init()
615 s5h1411_set_powerstate(fe, 0); in s5h1411_init()
616 s5h1411_register_reset(fe); in s5h1411_init()
633 s5h1411_set_serialmode(fe, 1); in s5h1411_init()
636 s5h1411_set_serialmode(fe, 0); in s5h1411_init()
638 s5h1411_set_spectralinversion(fe, state->config->inversion); in s5h1411_init()
639 s5h1411_set_if_freq(fe, state->config->vsb_if); in s5h1411_init()
640 s5h1411_set_gpio(fe, state->config->gpio); in s5h1411_init()
641 s5h1411_set_mpeg_timing(fe, state->config->mpeg_timing); in s5h1411_init()
642 s5h1411_softreset(fe); in s5h1411_init()
645 s5h1411_i2c_gate_ctrl(fe, 0); in s5h1411_init()
650 static int s5h1411_read_status(struct dvb_frontend *fe, enum fe_status *status) in s5h1411_read_status() argument
652 struct s5h1411_state *state = fe->demodulator_priv; in s5h1411_read_status()
693 if (fe->ops.tuner_ops.get_status) { in s5h1411_read_status()
694 if (fe->ops.i2c_gate_ctrl) in s5h1411_read_status()
695 fe->ops.i2c_gate_ctrl(fe, 1); in s5h1411_read_status()
697 fe->ops.tuner_ops.get_status(fe, &tuner_status); in s5h1411_read_status()
699 if (fe->ops.i2c_gate_ctrl) in s5h1411_read_status()
700 fe->ops.i2c_gate_ctrl(fe, 0); in s5h1411_read_status()
712 static int s5h1411_qam256_lookup_snr(struct dvb_frontend *fe, u16 *snr, u16 v) in s5h1411_qam256_lookup_snr() argument
727 static int s5h1411_qam64_lookup_snr(struct dvb_frontend *fe, u16 *snr, u16 v) in s5h1411_qam64_lookup_snr() argument
742 static int s5h1411_vsb_lookup_snr(struct dvb_frontend *fe, u16 *snr, u16 v) in s5h1411_vsb_lookup_snr() argument
758 static int s5h1411_read_snr(struct dvb_frontend *fe, u16 *snr) in s5h1411_read_snr() argument
760 struct s5h1411_state *state = fe->demodulator_priv; in s5h1411_read_snr()
767 return s5h1411_qam64_lookup_snr(fe, snr, reg); in s5h1411_read_snr()
770 return s5h1411_qam256_lookup_snr(fe, snr, reg); in s5h1411_read_snr()
774 return s5h1411_vsb_lookup_snr(fe, snr, reg); in s5h1411_read_snr()
782 static int s5h1411_read_signal_strength(struct dvb_frontend *fe, in s5h1411_read_signal_strength() argument
794 int ret = s5h1411_read_snr(fe, &snr); in s5h1411_read_signal_strength()
817 static int s5h1411_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) in s5h1411_read_ucblocks() argument
819 struct s5h1411_state *state = fe->demodulator_priv; in s5h1411_read_ucblocks()
826 static int s5h1411_read_ber(struct dvb_frontend *fe, u32 *ber) in s5h1411_read_ber() argument
828 return s5h1411_read_ucblocks(fe, ber); in s5h1411_read_ber()
831 static int s5h1411_get_frontend(struct dvb_frontend *fe, in s5h1411_get_frontend() argument
834 struct s5h1411_state *state = fe->demodulator_priv; in s5h1411_get_frontend()
842 static int s5h1411_get_tune_settings(struct dvb_frontend *fe, in s5h1411_get_tune_settings() argument
849 static void s5h1411_release(struct dvb_frontend *fe) in s5h1411_release() argument
851 struct s5h1411_state *state = fe->demodulator_priv; in s5h1411_release()