Lines Matching full:fe
4 * flexcop-fe-tuner.c - methods for frontend attachment and DiSEqC controlling
28 #define FE_SUPPORTED(fe) IS_REACHABLE(CONFIG_DVB_ ## fe) argument
31 static int flexcop_fe_request_firmware(struct dvb_frontend *fe, in flexcop_fe_request_firmware() argument
34 struct flexcop_device *fc = fe->dvb->priv; in flexcop_fe_request_firmware()
42 static int flexcop_set_voltage(struct dvb_frontend *fe, in flexcop_set_voltage() argument
45 struct flexcop_device *fc = fe->dvb->priv; in flexcop_set_voltage()
71 static int __maybe_unused flexcop_sleep(struct dvb_frontend* fe) in flexcop_sleep() argument
73 struct flexcop_device *fc = fe->dvb->priv; in flexcop_sleep()
75 return fc->fe_sleep(fe); in flexcop_sleep()
82 static int flexcop_set_tone(struct dvb_frontend *fe, enum fe_sec_tone_mode tone) in flexcop_set_tone() argument
85 struct flexcop_device *fc = fe->dvb->priv; in flexcop_set_tone()
109 static void flexcop_diseqc_send_bit(struct dvb_frontend* fe, int data) in flexcop_diseqc_send_bit() argument
111 flexcop_set_tone(fe, SEC_TONE_ON); in flexcop_diseqc_send_bit()
113 flexcop_set_tone(fe, SEC_TONE_OFF); in flexcop_diseqc_send_bit()
117 static void flexcop_diseqc_send_byte(struct dvb_frontend* fe, int data) in flexcop_diseqc_send_byte() argument
123 flexcop_diseqc_send_bit(fe, d); in flexcop_diseqc_send_byte()
125 flexcop_diseqc_send_bit(fe, par); in flexcop_diseqc_send_byte()
128 static int flexcop_send_diseqc_msg(struct dvb_frontend *fe, in flexcop_send_diseqc_msg() argument
133 flexcop_set_tone(fe, SEC_TONE_OFF); in flexcop_send_diseqc_msg()
137 flexcop_diseqc_send_byte(fe,msg[i]); in flexcop_send_diseqc_msg()
142 flexcop_diseqc_send_byte(fe, 0xff); in flexcop_send_diseqc_msg()
144 flexcop_set_tone(fe, SEC_TONE_ON); in flexcop_send_diseqc_msg()
147 flexcop_set_tone(fe, SEC_TONE_OFF); in flexcop_send_diseqc_msg()
154 static int flexcop_diseqc_send_master_cmd(struct dvb_frontend *fe, in flexcop_diseqc_send_master_cmd() argument
157 return flexcop_send_diseqc_msg(fe, cmd->msg_len, cmd->msg, 0); in flexcop_diseqc_send_master_cmd()
160 static int flexcop_diseqc_send_burst(struct dvb_frontend *fe, in flexcop_diseqc_send_burst() argument
163 return flexcop_send_diseqc_msg(fe, 0, NULL, minicmd); in flexcop_diseqc_send_burst()
175 fc->fe = dvb_attach(mt312_attach, &skystar23_samsung_tbdu18132_config, i2c); in skystar2_rev23_attach()
176 if (!fc->fe) in skystar2_rev23_attach()
179 if (!dvb_attach(dvb_pll_attach, fc->fe, 0x61, i2c, in skystar2_rev23_attach()
183 ops = &fc->fe->ops; in skystar2_rev23_attach()
198 static int samsung_tbmu24112_set_symbol_rate(struct dvb_frontend *fe, in samsung_tbmu24112_set_symbol_rate() argument
218 stv0299_writereg(fe, 0x13, aclk); in samsung_tbmu24112_set_symbol_rate()
219 stv0299_writereg(fe, 0x14, bclk); in samsung_tbmu24112_set_symbol_rate()
220 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff); in samsung_tbmu24112_set_symbol_rate()
221 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff); in samsung_tbmu24112_set_symbol_rate()
222 stv0299_writereg(fe, 0x21, ratio & 0xf0); in samsung_tbmu24112_set_symbol_rate()
286 fc->fe = dvb_attach(stv0299_attach, &samsung_tbmu24112_config, i2c); in skystar2_rev26_attach()
287 if (!fc->fe) in skystar2_rev26_attach()
290 if (!dvb_attach(dvb_pll_attach, fc->fe, 0x61, i2c, in skystar2_rev26_attach()
294 fc->fe->ops.set_voltage = flexcop_set_voltage; in skystar2_rev26_attach()
295 fc->fe_sleep = fc->fe->ops.sleep; in skystar2_rev26_attach()
296 fc->fe->ops.sleep = flexcop_sleep; in skystar2_rev26_attach()
325 fc->fe = dvb_attach(s5h1420_attach, &skystar2_rev2_7_s5h1420_config, in skystar2_rev27_attach()
327 if (!fc->fe) in skystar2_rev27_attach()
330 i2c_tuner = s5h1420_get_tuner_i2c_adapter(fc->fe); in skystar2_rev27_attach()
334 fc->fe_sleep = fc->fe->ops.sleep; in skystar2_rev27_attach()
335 fc->fe->ops.sleep = flexcop_sleep; in skystar2_rev27_attach()
339 if (!dvb_attach(isl6421_attach, fc->fe, &fc->fc_i2c_adap[2].i2c_adap, in skystar2_rev27_attach()
349 if (!dvb_attach(itd1000_attach, fc->fe, i2c_tuner, in skystar2_rev27_attach()
388 fc->fe = dvb_attach(cx24123_attach, &skystar2_rev2_8_cx24123_config, in skystar2_rev28_attach()
390 if (!fc->fe) in skystar2_rev28_attach()
393 i2c_tuner = cx24123_get_tuner_i2c_adapter(fc->fe); in skystar2_rev28_attach()
397 if (!dvb_attach(cx24113_attach, fc->fe, &skystar2_rev2_8_cx24113_config, in skystar2_rev28_attach()
405 if (!dvb_attach(isl6421_attach, fc->fe, &fc->fc_i2c_adap[2].i2c_adap, in skystar2_rev28_attach()
422 static int samsung_tdtc9251dh0_demod_init(struct dvb_frontend *fe) in samsung_tdtc9251dh0_demod_init() argument
430 mt352_write(fe, mt352_clock_config, sizeof(mt352_clock_config)); in samsung_tdtc9251dh0_demod_init()
432 mt352_write(fe, mt352_reset, sizeof(mt352_reset)); in samsung_tdtc9251dh0_demod_init()
433 mt352_write(fe, mt352_adc_ctl_1_cfg, sizeof(mt352_adc_ctl_1_cfg)); in samsung_tdtc9251dh0_demod_init()
434 mt352_write(fe, mt352_agc_cfg, sizeof(mt352_agc_cfg)); in samsung_tdtc9251dh0_demod_init()
435 mt352_write(fe, mt352_capt_range_cfg, sizeof(mt352_capt_range_cfg)); in samsung_tdtc9251dh0_demod_init()
447 fc->fe = dvb_attach(mt352_attach, &samsung_tdtc9251dh0_config, i2c); in airstar_dvbt_attach()
448 if (!fc->fe) in airstar_dvbt_attach()
451 return !!dvb_attach(dvb_pll_attach, fc->fe, 0x61, NULL, in airstar_dvbt_attach()
468 fc->fe = dvb_attach(bcm3510_attach, &air2pc_atsc_first_gen_config, i2c); in airstar_atsc1_attach()
469 return fc->fe != NULL; in airstar_atsc1_attach()
484 fc->fe = dvb_attach(nxt200x_attach, &samsung_tbmv_config, i2c); in airstar_atsc2_attach()
485 if (!fc->fe) in airstar_atsc2_attach()
488 return !!dvb_attach(dvb_pll_attach, fc->fe, 0x61, NULL, in airstar_atsc2_attach()
506 fc->fe = dvb_attach(lgdt330x_attach, &air2pc_atsc_hd5000_config, in airstar_atsc3_attach()
508 if (!fc->fe) in airstar_atsc3_attach()
511 return !!dvb_attach(simple_tuner_attach, fc->fe, i2c, 0x61, in airstar_atsc3_attach()
602 fc->fe = dvb_attach(stv0297_attach, &alps_tdee4_stv0297_config, i2c); in cablestar2_attach()
603 if (!fc->fe) in cablestar2_attach()
608 if (fc->fe->ops.i2c_gate_ctrl) in cablestar2_attach()
609 fc->fe->ops.i2c_gate_ctrl(fc->fe, 0); in cablestar2_attach()
610 fc->fe->ops.i2c_gate_ctrl = NULL; in cablestar2_attach()
612 if (!dvb_attach(dvb_pll_attach, fc->fe, 0x61, in cablestar2_attach()
640 fc->fe = dvb_attach(cx24120_attach, in skystarS2_rev33_attach()
642 if (!fc->fe) in skystarS2_rev33_attach()
647 if (!dvb_attach(isl6421_attach, fc->fe, &fc->fc_i2c_adap[2].i2c_adap, in skystarS2_rev33_attach()
693 if (fc->fe) { in flexcop_frontend_init()
694 dvb_frontend_detach(fc->fe); in flexcop_frontend_init()
695 fc->fe = NULL; in flexcop_frontend_init()
703 info("found '%s' .", fc->fe->ops.info.name); in flexcop_frontend_init()
704 if (dvb_register_frontend(&fc->dvb_adapter, fc->fe)) { in flexcop_frontend_init()
706 dvb_frontend_detach(fc->fe); in flexcop_frontend_init()
707 fc->fe = NULL; in flexcop_frontend_init()
717 dvb_unregister_frontend(fc->fe); in flexcop_frontend_exit()
718 dvb_frontend_detach(fc->fe); in flexcop_frontend_exit()