Lines Matching refs:fe
299 static int load_all_firmwares(struct dvb_frontend *fe, in load_all_firmwares() argument
302 struct xc2028_data *priv = fe->tuner_priv; in load_all_firmwares()
432 static int seek_firmware(struct dvb_frontend *fe, unsigned int type, in seek_firmware() argument
435 struct xc2028_data *priv = fe->tuner_priv; in seek_firmware()
523 static inline int do_tuner_callback(struct dvb_frontend *fe, int cmd, int arg) in do_tuner_callback() argument
525 struct xc2028_data *priv = fe->tuner_priv; in do_tuner_callback()
534 return (!fe->callback) ? -EINVAL : in do_tuner_callback()
535 fe->callback(((fe->dvb) && (fe->dvb->priv)) ? in do_tuner_callback()
536 fe->dvb->priv : priv->i2c_props.adap->algo_data, in do_tuner_callback()
540 static int load_firmware(struct dvb_frontend *fe, unsigned int type, in load_firmware() argument
543 struct xc2028_data *priv = fe->tuner_priv; in load_firmware()
552 pos = seek_firmware(fe, type, id); in load_firmware()
581 rc = do_tuner_callback(fe, XC2028_TUNER_RESET, 0); in load_firmware()
592 rc = do_tuner_callback(fe, XC2028_RESET_CLK, 0); in load_firmware()
642 rc = do_tuner_callback(fe, XC2028_I2C_FLUSH, 0); in load_firmware()
651 static int load_scode(struct dvb_frontend *fe, unsigned int type, in load_scode() argument
654 struct xc2028_data *priv = fe->tuner_priv; in load_scode()
661 pos = seek_firmware(fe, type, id); in load_scode()
713 static int xc2028_sleep(struct dvb_frontend *fe);
715 static int check_firmware(struct dvb_frontend *fe, unsigned int type, in check_firmware() argument
718 struct xc2028_data *priv = fe->tuner_priv; in check_firmware()
770 rc = do_tuner_callback(fe, XC2028_TUNER_RESET, 0); in check_firmware()
776 rc = load_firmware(fe, BASE | new_fw.type, &std0); in check_firmware()
786 rc = load_firmware(fe, BASE | INIT1 | new_fw.type, &std0); in check_firmware()
788 rc = load_firmware(fe, (BASE | INIT1 | new_fw.type) & ~F8MHZ, in check_firmware()
810 rc = load_firmware(fe, new_fw.type, &new_fw.id); in check_firmware()
812 rc = load_firmware(fe, new_fw.type & ~F8MHZ, &new_fw.id); in check_firmware()
830 rc = load_scode(fe, new_fw.type | new_fw.scode_table, &new_fw.id, in check_firmware()
898 xc2028_sleep(fe); in check_firmware()
905 static int xc2028_signal(struct dvb_frontend *fe, u16 *strength) in xc2028_signal() argument
907 struct xc2028_data *priv = fe->tuner_priv; in xc2028_signal()
959 static int xc2028_get_afc(struct dvb_frontend *fe, s32 *afc) in xc2028_get_afc() argument
961 struct xc2028_data *priv = fe->tuner_priv; in xc2028_get_afc()
1010 static int generic_set_freq(struct dvb_frontend *fe, u32 freq /* in HZ */, in generic_set_freq() argument
1016 struct xc2028_data *priv = fe->tuner_priv; in generic_set_freq()
1027 if (check_firmware(fe, type, std, int_freq) < 0) in generic_set_freq()
1132 do_tuner_callback(fe, XC2028_RESET_CLK, 1); in generic_set_freq()
1159 static int xc2028_set_analog_freq(struct dvb_frontend *fe, in xc2028_set_analog_freq() argument
1162 struct xc2028_data *priv = fe->tuner_priv; in xc2028_set_analog_freq()
1171 return generic_set_freq(fe, (625l * p->frequency) / 10, in xc2028_set_analog_freq()
1186 return generic_set_freq(fe, 62500l * p->frequency, in xc2028_set_analog_freq()
1190 static int xc2028_set_params(struct dvb_frontend *fe) in xc2028_set_params() argument
1192 struct dtv_frontend_properties *c = &fe->dtv_property_cache; in xc2028_set_params()
1195 struct xc2028_data *priv = fe->tuner_priv; in xc2028_set_params()
1284 return generic_set_freq(fe, c->frequency, in xc2028_set_params()
1288 static int xc2028_sleep(struct dvb_frontend *fe) in xc2028_sleep() argument
1290 struct xc2028_data *priv = fe->tuner_priv; in xc2028_sleep()
1326 static int xc2028_dvb_release(struct dvb_frontend *fe) in xc2028_dvb_release() argument
1328 struct xc2028_data *priv = fe->tuner_priv; in xc2028_dvb_release()
1346 fe->tuner_priv = NULL; in xc2028_dvb_release()
1351 static int xc2028_get_frequency(struct dvb_frontend *fe, u32 *frequency) in xc2028_get_frequency() argument
1353 struct xc2028_data *priv = fe->tuner_priv; in xc2028_get_frequency()
1370 struct dvb_frontend *fe = context; in load_firmware_cb() local
1371 struct xc2028_data *priv = fe->tuner_priv; in load_firmware_cb()
1381 rc = load_all_firmwares(fe, fw); in load_firmware_cb()
1390 static int xc2028_set_config(struct dvb_frontend *fe, void *priv_cfg) in xc2028_set_config() argument
1392 struct xc2028_data *priv = fe->tuner_priv; in xc2028_set_config()
1434 fe, load_firmware_cb); in xc2028_set_config()
1465 struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe, in xc2028_attach() argument
1477 if (!fe) { in xc2028_attach()
1498 fe->tuner_priv = priv; in xc2028_attach()
1502 fe->tuner_priv = priv; in xc2028_attach()
1506 memcpy(&fe->ops.tuner_ops, &xc2028_dvb_tuner_ops, in xc2028_attach()
1512 xc2028_set_config(fe, cfg->ctrl); in xc2028_attach()
1516 return fe; in xc2028_attach()
1520 xc2028_dvb_release(fe); in xc2028_attach()