Lines Matching refs:fc
33 struct flexcop_device *fc = fe->dvb->priv; in flexcop_set_voltage() local
37 v = fc->read_ibi_reg(fc, misc_204); in flexcop_set_voltage()
54 return fc->write_ibi_reg(fc, misc_204, v); in flexcop_set_voltage()
61 struct flexcop_device *fc = fe->dvb->priv; in flexcop_sleep() local
62 if (fc->fe_sleep) in flexcop_sleep()
63 return fc->fe_sleep(fe); in flexcop_sleep()
73 struct flexcop_device *fc = fe->dvb->priv; in flexcop_set_tone() local
94 return fc->write_ibi_reg(fc,lnb_switch_freq_200,v); in flexcop_set_tone()
158 static int skystar2_rev23_attach(struct flexcop_device *fc, in skystar2_rev23_attach() argument
163 fc->fe = dvb_attach(mt312_attach, &skystar23_samsung_tbdu18132_config, i2c); in skystar2_rev23_attach()
164 if (!fc->fe) in skystar2_rev23_attach()
167 if (!dvb_attach(dvb_pll_attach, fc->fe, 0x61, i2c, in skystar2_rev23_attach()
171 ops = &fc->fe->ops; in skystar2_rev23_attach()
176 fc->fe_sleep = ops->sleep; in skystar2_rev23_attach()
271 static int skystar2_rev26_attach(struct flexcop_device *fc, in skystar2_rev26_attach() argument
274 fc->fe = dvb_attach(stv0299_attach, &samsung_tbmu24112_config, i2c); in skystar2_rev26_attach()
275 if (!fc->fe) in skystar2_rev26_attach()
278 if (!dvb_attach(dvb_pll_attach, fc->fe, 0x61, i2c, in skystar2_rev26_attach()
282 fc->fe->ops.set_voltage = flexcop_set_voltage; in skystar2_rev26_attach()
283 fc->fe_sleep = fc->fe->ops.sleep; in skystar2_rev26_attach()
284 fc->fe->ops.sleep = flexcop_sleep; in skystar2_rev26_attach()
305 static int skystar2_rev27_attach(struct flexcop_device *fc, in skystar2_rev27_attach() argument
312 fc->fc_i2c_adap[0].no_base_addr = 1; in skystar2_rev27_attach()
313 fc->fe = dvb_attach(s5h1420_attach, &skystar2_rev2_7_s5h1420_config, in skystar2_rev27_attach()
315 if (!fc->fe) in skystar2_rev27_attach()
318 i2c_tuner = s5h1420_get_tuner_i2c_adapter(fc->fe); in skystar2_rev27_attach()
322 fc->fe_sleep = fc->fe->ops.sleep; in skystar2_rev27_attach()
323 fc->fe->ops.sleep = flexcop_sleep; in skystar2_rev27_attach()
326 fc->fc_i2c_adap[2].no_base_addr = 1; in skystar2_rev27_attach()
327 if (!dvb_attach(isl6421_attach, fc->fe, &fc->fc_i2c_adap[2].i2c_adap, in skystar2_rev27_attach()
336 fc->write_ibi_reg(fc, tw_sm_c_108, r108); in skystar2_rev27_attach()
337 if (!dvb_attach(itd1000_attach, fc->fe, i2c_tuner, in skystar2_rev27_attach()
348 fc->fc_i2c_adap[2].no_base_addr = 0; in skystar2_rev27_attach()
351 fc->fc_i2c_adap[0].no_base_addr = 0; in skystar2_rev27_attach()
371 static int skystar2_rev28_attach(struct flexcop_device *fc, in skystar2_rev28_attach() argument
376 fc->fe = dvb_attach(cx24123_attach, &skystar2_rev2_8_cx24123_config, in skystar2_rev28_attach()
378 if (!fc->fe) in skystar2_rev28_attach()
381 i2c_tuner = cx24123_get_tuner_i2c_adapter(fc->fe); in skystar2_rev28_attach()
385 if (!dvb_attach(cx24113_attach, fc->fe, &skystar2_rev2_8_cx24113_config, in skystar2_rev28_attach()
392 fc->fc_i2c_adap[2].no_base_addr = 1; in skystar2_rev28_attach()
393 if (!dvb_attach(isl6421_attach, fc->fe, &fc->fc_i2c_adap[2].i2c_adap, in skystar2_rev28_attach()
396 fc->fc_i2c_adap[2].no_base_addr = 0; in skystar2_rev28_attach()
432 static int airstar_dvbt_attach(struct flexcop_device *fc, in airstar_dvbt_attach() argument
435 fc->fe = dvb_attach(mt352_attach, &samsung_tdtc9251dh0_config, i2c); in airstar_dvbt_attach()
436 if (!fc->fe) in airstar_dvbt_attach()
439 return !!dvb_attach(dvb_pll_attach, fc->fe, 0x61, NULL, in airstar_dvbt_attach()
451 struct flexcop_device *fc = fe->dvb->priv; in flexcop_fe_request_firmware() local
452 return request_firmware(fw, name, fc->dev); in flexcop_fe_request_firmware()
460 static int airstar_atsc1_attach(struct flexcop_device *fc, in airstar_atsc1_attach() argument
463 fc->fe = dvb_attach(bcm3510_attach, &air2pc_atsc_first_gen_config, i2c); in airstar_atsc1_attach()
464 return fc->fe != NULL; in airstar_atsc1_attach()
476 static int airstar_atsc2_attach(struct flexcop_device *fc, in airstar_atsc2_attach() argument
479 fc->fe = dvb_attach(nxt200x_attach, &samsung_tbmv_config, i2c); in airstar_atsc2_attach()
480 if (!fc->fe) in airstar_atsc2_attach()
483 return !!dvb_attach(dvb_pll_attach, fc->fe, 0x61, NULL, in airstar_atsc2_attach()
499 static int airstar_atsc3_attach(struct flexcop_device *fc, in airstar_atsc3_attach() argument
502 fc->fe = dvb_attach(lgdt330x_attach, &air2pc_atsc_hd5000_config, i2c); in airstar_atsc3_attach()
503 if (!fc->fe) in airstar_atsc3_attach()
506 return !!dvb_attach(simple_tuner_attach, fc->fe, i2c, 0x61, in airstar_atsc3_attach()
593 static int cablestar2_attach(struct flexcop_device *fc, in cablestar2_attach() argument
596 fc->fc_i2c_adap[0].no_base_addr = 1; in cablestar2_attach()
597 fc->fe = dvb_attach(stv0297_attach, &alps_tdee4_stv0297_config, i2c); in cablestar2_attach()
598 if (!fc->fe) in cablestar2_attach()
603 if (fc->fe->ops.i2c_gate_ctrl) in cablestar2_attach()
604 fc->fe->ops.i2c_gate_ctrl(fc->fe, 0); in cablestar2_attach()
605 fc->fe->ops.i2c_gate_ctrl = NULL; in cablestar2_attach()
607 if (!dvb_attach(dvb_pll_attach, fc->fe, 0x61, in cablestar2_attach()
608 &fc->fc_i2c_adap[2].i2c_adap, DVB_PLL_TDEE4)) in cablestar2_attach()
615 fc->fc_i2c_adap[0].no_base_addr = 0; in cablestar2_attach()
638 int flexcop_frontend_init(struct flexcop_device *fc) in flexcop_frontend_init() argument
646 fc->dev_type = flexcop_frontends[i].type; in flexcop_frontend_init()
647 if (flexcop_frontends[i].attach(fc, &fc->fc_i2c_adap[0].i2c_adap)) in flexcop_frontend_init()
650 if (fc->fe) { in flexcop_frontend_init()
651 dvb_frontend_detach(fc->fe); in flexcop_frontend_init()
652 fc->fe = NULL; in flexcop_frontend_init()
655 fc->dev_type = FC_UNK; in flexcop_frontend_init()
660 info("found '%s' .", fc->fe->ops.info.name); in flexcop_frontend_init()
661 if (dvb_register_frontend(&fc->dvb_adapter, fc->fe)) { in flexcop_frontend_init()
663 dvb_frontend_detach(fc->fe); in flexcop_frontend_init()
664 fc->fe = NULL; in flexcop_frontend_init()
667 fc->init_state |= FC_STATE_FE_INIT; in flexcop_frontend_init()
671 void flexcop_frontend_exit(struct flexcop_device *fc) in flexcop_frontend_exit() argument
673 if (fc->init_state & FC_STATE_FE_INIT) { in flexcop_frontend_exit()
674 dvb_unregister_frontend(fc->fe); in flexcop_frontend_exit()
675 dvb_frontend_detach(fc->fe); in flexcop_frontend_exit()
677 fc->init_state &= ~FC_STATE_FE_INIT; in flexcop_frontend_exit()