Lines Matching refs:priv
64 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8290_i2c_bridge() local
72 tuner_i2c_xfer_send(&priv->i2c_props, msg, 2); in tda8290_i2c_bridge()
77 tuner_i2c_xfer_send(&priv->i2c_props, msg, 2); in tda8290_i2c_bridge()
85 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8295_i2c_bridge() local
94 tuner_i2c_xfer_send(&priv->i2c_props, msg, 2); in tda8295_i2c_bridge()
99 tuner_i2c_xfer_send_recv(&priv->i2c_props, msg, 1, &msg[1], 1); in tda8295_i2c_bridge()
103 tuner_i2c_xfer_send(&priv->i2c_props, buf, 3); in tda8295_i2c_bridge()
107 tuner_i2c_xfer_send(&priv->i2c_props, msg, 2); in tda8295_i2c_bridge()
118 struct tda8290_priv *priv = fe->analog_demod_priv; in set_audio() local
122 priv->tda8290_easy_mode = 0x01; in set_audio()
125 priv->tda8290_easy_mode = 0x02; in set_audio()
128 priv->tda8290_easy_mode = 0x04; in set_audio()
131 priv->tda8290_easy_mode = 0x08; in set_audio()
134 priv->tda8290_easy_mode = 0x10; in set_audio()
137 priv->tda8290_easy_mode = 0x20; in set_audio()
140 priv->tda8290_easy_mode = 0x40; in set_audio()
143 priv->tda8290_easy_mode = 0x10; in set_audio()
149 priv->tda8290_easy_mode = (priv->ver & TDA8295) ? 0x80 : 0x01; in set_audio()
179 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8290_set_params() local
182 unsigned char easy_mode[] = { 0x01, priv->tda8290_easy_mode }; in tda8290_set_params()
205 if (priv->cfg.config) in tda8290_set_params()
206 tuner_dbg("tda827xa config is 0x%02x\n", priv->cfg.config); in tda8290_set_params()
207 tuner_i2c_xfer_send(&priv->i2c_props, easy_mode, 2); in tda8290_set_params()
208 tuner_i2c_xfer_send(&priv->i2c_props, agc_out_on, 2); in tda8290_set_params()
209 tuner_i2c_xfer_send(&priv->i2c_props, soft_reset, 2); in tda8290_set_params()
221 tuner_i2c_xfer_send(&priv->i2c_props, fm_mode[i].seq, 2); in tda8290_set_params()
223 tuner_i2c_xfer_send(&priv->i2c_props, deemphasis, 2); in tda8290_set_params()
225 expert_mode[1] = priv->tda8290_easy_mode + 0x80; in tda8290_set_params()
226 tuner_i2c_xfer_send(&priv->i2c_props, expert_mode, 2); in tda8290_set_params()
227 tuner_i2c_xfer_send(&priv->i2c_props, gainset_off, 2); in tda8290_set_params()
228 tuner_i2c_xfer_send(&priv->i2c_props, if_agc_spd, 2); in tda8290_set_params()
229 if (priv->tda8290_easy_mode & 0x60) in tda8290_set_params()
230 tuner_i2c_xfer_send(&priv->i2c_props, adc_head_9, 2); in tda8290_set_params()
232 tuner_i2c_xfer_send(&priv->i2c_props, adc_head_6, 2); in tda8290_set_params()
233 tuner_i2c_xfer_send(&priv->i2c_props, pll_bw_nom, 2); in tda8290_set_params()
244 tuner_i2c_xfer_send_recv(&priv->i2c_props, in tda8290_set_params()
247 tuner_i2c_xfer_send_recv(&priv->i2c_props, in tda8290_set_params()
250 tuner_i2c_xfer_send_recv(&priv->i2c_props, in tda8290_set_params()
264 tuner_i2c_xfer_send(&priv->i2c_props, gainset_2, 2); in tda8290_set_params()
266 tuner_i2c_xfer_send_recv(&priv->i2c_props, in tda8290_set_params()
268 tuner_i2c_xfer_send_recv(&priv->i2c_props, in tda8290_set_params()
273 if (priv->cfg.agcf) in tda8290_set_params()
274 priv->cfg.agcf(fe); in tda8290_set_params()
276 tuner_i2c_xfer_send_recv(&priv->i2c_props, in tda8290_set_params()
279 tuner_i2c_xfer_send_recv(&priv->i2c_props, in tda8290_set_params()
284 tuner_i2c_xfer_send(&priv->i2c_props, adc_head_12, 2); in tda8290_set_params()
285 tuner_i2c_xfer_send(&priv->i2c_props, pll_bw_low, 2); in tda8290_set_params()
292 if(priv->tda8290_easy_mode & 0x60) { in tda8290_set_params()
293 tuner_i2c_xfer_send_recv(&priv->i2c_props, in tda8290_set_params()
296 tuner_i2c_xfer_send_recv(&priv->i2c_props, in tda8290_set_params()
301 tuner_i2c_xfer_send(&priv->i2c_props, agc_rst_on, 2); in tda8290_set_params()
303 tuner_i2c_xfer_send(&priv->i2c_props, agc_rst_off, 2); in tda8290_set_params()
309 tuner_i2c_xfer_send(&priv->i2c_props, if_agc_set, 2); in tda8290_set_params()
316 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8295_power() local
319 tuner_i2c_xfer_send_recv(&priv->i2c_props, &buf[0], 1, &buf[1], 1); in tda8295_power()
326 tuner_i2c_xfer_send(&priv->i2c_props, buf, 2); in tda8295_power()
331 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8295_set_easy_mode() local
334 tuner_i2c_xfer_send_recv(&priv->i2c_props, &buf[0], 1, &buf[1], 1); in tda8295_set_easy_mode()
341 tuner_i2c_xfer_send(&priv->i2c_props, buf, 2); in tda8295_set_easy_mode()
346 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8295_set_video_std() local
347 unsigned char buf[] = { 0x00, priv->tda8290_easy_mode }; in tda8295_set_video_std()
349 tuner_i2c_xfer_send(&priv->i2c_props, buf, 2); in tda8295_set_video_std()
360 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8295_agc1_out() local
363 tuner_i2c_xfer_send_recv(&priv->i2c_props, &buf[0], 1, &buf[1], 1); in tda8295_agc1_out()
370 tuner_i2c_xfer_send(&priv->i2c_props, buf, 2); in tda8295_agc1_out()
375 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8295_agc2_out() local
379 tuner_i2c_xfer_send_recv(&priv->i2c_props, in tda8295_agc2_out()
381 tuner_i2c_xfer_send_recv(&priv->i2c_props, in tda8295_agc2_out()
390 tuner_i2c_xfer_send(&priv->i2c_props, set_gpio_cf, 2); in tda8295_agc2_out()
391 tuner_i2c_xfer_send(&priv->i2c_props, set_gpio_val, 2); in tda8295_agc2_out()
396 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8295_has_signal() local
401 tuner_i2c_xfer_send_recv(&priv->i2c_props, &hvpll_stat, 1, &ret, 1); in tda8295_has_signal()
411 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8295_set_params() local
422 tuner_i2c_xfer_send_recv(&priv->i2c_props, in tda8295_set_params()
428 tuner_i2c_xfer_send(&priv->i2c_props, blanking_mode, 2); in tda8295_set_params()
437 if (priv->cfg.agcf) in tda8295_set_params()
438 priv->cfg.agcf(fe); in tda8295_set_params()
454 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8290_has_signal() local
459 tuner_i2c_xfer_send_recv(&priv->i2c_props, in tda8290_has_signal()
469 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8290_standby() local
474 struct i2c_msg msg = {.addr = priv->tda827x_addr, .flags=0, .buf=cb1, .len = 2}; in tda8290_standby()
478 if (priv->ver & TDA8275A) in tda8290_standby()
480 i2c_transfer(priv->i2c_props.adap, &msg, 1); in tda8290_standby()
483 tuner_i2c_xfer_send(&priv->i2c_props, tda8290_agc_tri, 2); in tda8290_standby()
484 tuner_i2c_xfer_send(&priv->i2c_props, tda8290_standby, 2); in tda8290_standby()
496 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8290_init_if() local
502 if ((priv->cfg.config == TDA8290_LNA_GP0_HIGH_ON) || in tda8290_init_if()
503 (priv->cfg.config == TDA8290_LNA_GP0_HIGH_OFF)) in tda8290_init_if()
504 tuner_i2c_xfer_send(&priv->i2c_props, set_GP00_CF, 2); in tda8290_init_if()
506 tuner_i2c_xfer_send(&priv->i2c_props, set_GP01_CF, 2); in tda8290_init_if()
507 tuner_i2c_xfer_send(&priv->i2c_props, set_VS, 2); in tda8290_init_if()
512 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8295_init_if() local
527 tuner_i2c_xfer_send(&priv->i2c_props, set_adc_ctl, 2); in tda8295_init_if()
528 tuner_i2c_xfer_send(&priv->i2c_props, set_adc_ctl2, 2); in tda8295_init_if()
529 tuner_i2c_xfer_send(&priv->i2c_props, set_pll_reg6, 2); in tda8295_init_if()
530 tuner_i2c_xfer_send(&priv->i2c_props, set_pll_reg0, 2); in tda8295_init_if()
531 tuner_i2c_xfer_send(&priv->i2c_props, set_pll_reg7, 2); in tda8295_init_if()
532 tuner_i2c_xfer_send(&priv->i2c_props, set_pll_reg10, 2); in tda8295_init_if()
533 tuner_i2c_xfer_send(&priv->i2c_props, set_gpio_reg0, 2); in tda8295_init_if()
541 struct tda8290_priv *priv = fe->analog_demod_priv; in tda8290_init_tuner() local
546 struct i2c_msg msg = {.addr = priv->tda827x_addr, .flags=0, in tda8290_init_tuner()
548 if (priv->ver & TDA8275A) in tda8290_init_tuner()
553 i2c_transfer(priv->i2c_props.adap, &msg, 1); in tda8290_init_tuner()
562 struct tda8290_priv *priv = fe->analog_demod_priv; in tda829x_release() local
566 if (priv->ver & (TDA18271 | TDA8275 | TDA8275A)) in tda829x_release()
580 struct tda8290_priv *priv = fe->analog_demod_priv; in tda829x_find_tuner() local
594 ret = i2c_transfer(priv->i2c_props.adap, &msg, 1); in tda829x_find_tuner()
611 ret = i2c_transfer(priv->i2c_props.adap, &msg, 1); in tda829x_find_tuner()
626 priv->tda827x_addr = tuner_addrs; in tda829x_find_tuner()
631 ret = i2c_transfer(priv->i2c_props.adap, &msg, 1); in tda829x_find_tuner()
641 priv->ver |= TDA18271; in tda829x_find_tuner()
642 tda829x_tda18271_config.config = priv->cfg.config; in tda829x_find_tuner()
643 tda829x_tda18271_config.std_map = priv->tda18271_std_map; in tda829x_find_tuner()
644 dvb_attach(tda18271_attach, fe, priv->tda827x_addr, in tda829x_find_tuner()
645 priv->i2c_props.adap, &tda829x_tda18271_config); in tda829x_find_tuner()
648 priv->ver |= TDA8275; in tda829x_find_tuner()
650 priv->ver |= TDA8275A; in tda829x_find_tuner()
652 dvb_attach(tda827x_attach, fe, priv->tda827x_addr, in tda829x_find_tuner()
653 priv->i2c_props.adap, &priv->cfg); in tda829x_find_tuner()
654 priv->cfg.switch_addr = priv->i2c_props.addr; in tda829x_find_tuner()
744 struct tda8290_priv *priv = NULL; in tda829x_attach() local
747 priv = kzalloc(sizeof(struct tda8290_priv), GFP_KERNEL); in tda829x_attach()
748 if (priv == NULL) in tda829x_attach()
750 fe->analog_demod_priv = priv; in tda829x_attach()
752 priv->i2c_props.addr = i2c_addr; in tda829x_attach()
753 priv->i2c_props.adap = i2c_adap; in tda829x_attach()
754 priv->i2c_props.name = "tda829x"; in tda829x_attach()
756 priv->cfg.config = cfg->lna_cfg; in tda829x_attach()
757 priv->tda18271_std_map = cfg->tda18271_std_map; in tda829x_attach()
760 if (tda8290_probe(&priv->i2c_props) == 0) { in tda829x_attach()
761 priv->ver = TDA8290; in tda829x_attach()
766 if (tda8295_probe(&priv->i2c_props) == 0) { in tda829x_attach()
767 priv->ver = TDA8295; in tda829x_attach()
781 switch (priv->ver) { in tda829x_attach()
813 if (priv->ver & TDA8290) { in tda829x_attach()
814 if (priv->ver & (TDA8275 | TDA8275A)) in tda829x_attach()
817 } else if (priv->ver & TDA8295) in tda829x_attach()