Lines Matching refs:adap
86 static int bristol_frontend_attach(struct dvb_usb_adapter *adap) in bristol_frontend_attach() argument
88 struct dib0700_state *st = adap->dev->priv; in bristol_frontend_attach()
89 if (adap->id == 0) { in bristol_frontend_attach()
90 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); msleep(10); in bristol_frontend_attach()
91 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); msleep(10); in bristol_frontend_attach()
92 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); msleep(10); in bristol_frontend_attach()
93 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); msleep(10); in bristol_frontend_attach()
96 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); in bristol_frontend_attach()
98 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 0); in bristol_frontend_attach()
100 …if (dib3000mc_i2c_enumeration(&adap->dev->i2c_adap, 2, DEFAULT_DIB3000P_I2C_ADDRESS, bristol_dib30… in bristol_frontend_attach()
101 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); msleep(10); in bristol_frontend_attach()
105 st->mt2060_if1[adap->id] = 1220; in bristol_frontend_attach()
106 return (adap->fe_adap[0].fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, in bristol_frontend_attach()
107 (10 + adap->id) << 1, &bristol_dib3000mc_config[adap->id])) == NULL ? -ENODEV : 0; in bristol_frontend_attach()
110 static int eeprom_read(struct i2c_adapter *adap,u8 adrs,u8 *pval) in eeprom_read() argument
116 if (i2c_transfer(adap, msg, 2) != 2) return -EREMOTEIO; in eeprom_read()
120 static int bristol_tuner_attach(struct dvb_usb_adapter *adap) in bristol_tuner_attach() argument
122 struct i2c_adapter *prim_i2c = &adap->dev->i2c_adap; in bristol_tuner_attach()
123 struct i2c_adapter *tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe_adap[0].fe, 1); in bristol_tuner_attach()
126 if (adap->dev->udev->descriptor.idVendor == cpu_to_le16(USB_VID_HAUPPAUGE) && in bristol_tuner_attach()
127 adap->dev->udev->descriptor.idProduct == cpu_to_le16(USB_PID_HAUPPAUGE_NOVA_T_500_2)) { in bristol_tuner_attach()
128 if (!eeprom_read(prim_i2c,0x59 + adap->id,&a)) if1=1220+a; in bristol_tuner_attach()
130 return dvb_attach(mt2060_attach, adap->fe_adap[0].fe, tun_i2c, in bristol_tuner_attach()
131 &bristol_mt2060_config[adap->id], if1) == NULL ? in bristol_tuner_attach()
274 static int stk7700P2_frontend_attach(struct dvb_usb_adapter *adap) in stk7700P2_frontend_attach() argument
276 struct dib0700_adapter_state *state = adap->priv; in stk7700P2_frontend_attach()
281 if (adap->id == 0) { in stk7700P2_frontend_attach()
282 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); in stk7700P2_frontend_attach()
284 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); in stk7700P2_frontend_attach()
285 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); in stk7700P2_frontend_attach()
286 dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); in stk7700P2_frontend_attach()
287 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk7700P2_frontend_attach()
289 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); in stk7700P2_frontend_attach()
291 if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 18, in stk7700P2_frontend_attach()
300 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, in stk7700P2_frontend_attach()
301 0x80 + (adap->id << 1), in stk7700P2_frontend_attach()
302 &stk7700d_dib7000p_mt2266_config[adap->id]); in stk7700P2_frontend_attach()
304 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk7700P2_frontend_attach()
307 static int stk7700d_frontend_attach(struct dvb_usb_adapter *adap) in stk7700d_frontend_attach() argument
309 struct dib0700_adapter_state *state = adap->priv; in stk7700d_frontend_attach()
314 if (adap->id == 0) { in stk7700d_frontend_attach()
315 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); in stk7700d_frontend_attach()
317 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); in stk7700d_frontend_attach()
318 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); in stk7700d_frontend_attach()
319 dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); in stk7700d_frontend_attach()
320 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk7700d_frontend_attach()
322 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); in stk7700d_frontend_attach()
324 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); in stk7700d_frontend_attach()
325 if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 2, 18, in stk7700d_frontend_attach()
334 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, in stk7700d_frontend_attach()
335 0x80 + (adap->id << 1), in stk7700d_frontend_attach()
336 &stk7700d_dib7000p_mt2266_config[adap->id]); in stk7700d_frontend_attach()
338 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk7700d_frontend_attach()
341 static int stk7700d_tuner_attach(struct dvb_usb_adapter *adap) in stk7700d_tuner_attach() argument
344 struct dib0700_adapter_state *state = adap->priv; in stk7700d_tuner_attach()
346 tun_i2c = state->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, in stk7700d_tuner_attach()
348 return dvb_attach(mt2266_attach, adap->fe_adap[0].fe, tun_i2c, in stk7700d_tuner_attach()
349 &stk7700d_mt2266_config[adap->id]) == NULL ? -ENODEV : 0; in stk7700d_tuner_attach()
423 struct dvb_usb_adapter *adap = ptr; in stk7700ph_xc3028_callback() local
424 struct dib0700_adapter_state *state = adap->priv; in stk7700ph_xc3028_callback()
429 state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 0); in stk7700ph_xc3028_callback()
431 state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); in stk7700ph_xc3028_callback()
454 static int stk7700ph_frontend_attach(struct dvb_usb_adapter *adap) in stk7700ph_frontend_attach() argument
456 struct usb_device_descriptor *desc = &adap->dev->udev->descriptor; in stk7700ph_frontend_attach()
457 struct dib0700_adapter_state *state = adap->priv; in stk7700ph_frontend_attach()
464 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); in stk7700ph_frontend_attach()
466 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); in stk7700ph_frontend_attach()
468 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); in stk7700ph_frontend_attach()
469 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); in stk7700ph_frontend_attach()
470 dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); in stk7700ph_frontend_attach()
471 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk7700ph_frontend_attach()
473 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); in stk7700ph_frontend_attach()
475 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); in stk7700ph_frontend_attach()
478 if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 18, in stk7700ph_frontend_attach()
486 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, in stk7700ph_frontend_attach()
489 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk7700ph_frontend_attach()
492 static int stk7700ph_tuner_attach(struct dvb_usb_adapter *adap) in stk7700ph_tuner_attach() argument
495 struct dib0700_adapter_state *state = adap->priv; in stk7700ph_tuner_attach()
497 tun_i2c = state->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, in stk7700ph_tuner_attach()
503 adap->fe_adap[0].fe->callback = stk7700ph_xc3028_callback; in stk7700ph_tuner_attach()
505 return dvb_attach(xc2028_attach, adap->fe_adap[0].fe, &stk7700ph_xc3028_config) in stk7700ph_tuner_attach()
700 static int stk7700p_frontend_attach(struct dvb_usb_adapter *adap) in stk7700p_frontend_attach() argument
702 struct dib0700_state *st = adap->dev->priv; in stk7700p_frontend_attach()
703 struct dib0700_adapter_state *state = adap->priv; in stk7700p_frontend_attach()
710 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk7700p_frontend_attach()
711 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); msleep(50); in stk7700p_frontend_attach()
713 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); msleep(10); in stk7700p_frontend_attach()
714 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); in stk7700p_frontend_attach()
716 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); msleep(10); in stk7700p_frontend_attach()
717 dib0700_ctrl_clock(adap->dev, 72, 1); in stk7700p_frontend_attach()
718 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); msleep(100); in stk7700p_frontend_attach()
720 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); in stk7700p_frontend_attach()
724 if (state->dib7000p_ops.dib7000pc_detection(&adap->dev->i2c_adap)) { in stk7700p_frontend_attach()
725 …adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 18, &stk7700p_dib7000p_config… in stk7700p_frontend_attach()
729 …adap->fe_adap[0].fe = dvb_attach(dib7000m_attach, &adap->dev->i2c_adap, 18, &stk7700p_dib7000m_con… in stk7700p_frontend_attach()
732 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk7700p_frontend_attach()
739 static int stk7700p_tuner_attach(struct dvb_usb_adapter *adap) in stk7700p_tuner_attach() argument
741 struct i2c_adapter *prim_i2c = &adap->dev->i2c_adap; in stk7700p_tuner_attach()
742 struct dib0700_state *st = adap->dev->priv; in stk7700p_tuner_attach()
744 struct dib0700_adapter_state *state = adap->priv; in stk7700p_tuner_attach()
748 if (adap->dev->udev->descriptor.idVendor == cpu_to_le16(USB_VID_HAUPPAUGE) && in stk7700p_tuner_attach()
749 adap->dev->udev->descriptor.idProduct == cpu_to_le16(USB_PID_HAUPPAUGE_NOVA_T_STICK)) { in stk7700p_tuner_attach()
753 tun_i2c = state->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); in stk7700p_tuner_attach()
755 tun_i2c = dib7000m_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); in stk7700p_tuner_attach()
757 return dvb_attach(mt2060_attach, adap->fe_adap[0].fe, tun_i2c, &stk7700p_mt2060_config, in stk7700p_tuner_attach()
797 struct dvb_usb_adapter *adap = fe->dvb->priv; in dib7070_tuner_reset() local
798 struct dib0700_adapter_state *state = adap->priv; in dib7070_tuner_reset()
806 struct dvb_usb_adapter *adap = fe->dvb->priv; in dib7070_tuner_sleep() local
807 struct dib0700_adapter_state *state = adap->priv; in dib7070_tuner_sleep()
843 struct dvb_usb_adapter *adap = fe->dvb->priv; in dib7070_set_param_override() local
844 struct dib0700_adapter_state *state = adap->priv; in dib7070_set_param_override()
861 struct dvb_usb_adapter *adap = fe->dvb->priv; in dib7770_set_param_override() local
862 struct dib0700_adapter_state *state = adap->priv; in dib7770_set_param_override()
882 static int dib7770p_tuner_attach(struct dvb_usb_adapter *adap) in dib7770p_tuner_attach() argument
884 struct dib0700_adapter_state *st = adap->priv; in dib7770p_tuner_attach()
885 struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, in dib7770p_tuner_attach()
888 if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, in dib7770p_tuner_attach()
892 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in dib7770p_tuner_attach()
893 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7770_set_param_override; in dib7770p_tuner_attach()
897 static int dib7070p_tuner_attach(struct dvb_usb_adapter *adap) in dib7070p_tuner_attach() argument
899 struct dib0700_adapter_state *st = adap->priv; in dib7070p_tuner_attach()
900 …struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INT… in dib7070p_tuner_attach()
902 if (adap->id == 0) { in dib7070p_tuner_attach()
903 if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, &dib7070p_dib0070_config[0]) == NULL) in dib7070p_tuner_attach()
906 if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, &dib7070p_dib0070_config[1]) == NULL) in dib7070p_tuner_attach()
910 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in dib7070p_tuner_attach()
911 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7070_set_param_override; in dib7070p_tuner_attach()
983 static int stk7070p_frontend_attach(struct dvb_usb_adapter *adap) in stk7070p_frontend_attach() argument
985 struct usb_device_descriptor *p = &adap->dev->udev->descriptor; in stk7070p_frontend_attach()
986 struct dib0700_adapter_state *state = adap->priv; in stk7070p_frontend_attach()
993 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); in stk7070p_frontend_attach()
995 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); in stk7070p_frontend_attach()
997 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); in stk7070p_frontend_attach()
998 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); in stk7070p_frontend_attach()
999 dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); in stk7070p_frontend_attach()
1000 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk7070p_frontend_attach()
1002 dib0700_ctrl_clock(adap->dev, 72, 1); in stk7070p_frontend_attach()
1005 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); in stk7070p_frontend_attach()
1007 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); in stk7070p_frontend_attach()
1009 if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 18, in stk7070p_frontend_attach()
1017 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, in stk7070p_frontend_attach()
1019 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk7070p_frontend_attach()
1041 static int stk7770p_frontend_attach(struct dvb_usb_adapter *adap) in stk7770p_frontend_attach() argument
1043 struct usb_device_descriptor *p = &adap->dev->udev->descriptor; in stk7770p_frontend_attach()
1044 struct dib0700_adapter_state *state = adap->priv; in stk7770p_frontend_attach()
1051 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); in stk7770p_frontend_attach()
1053 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); in stk7770p_frontend_attach()
1055 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); in stk7770p_frontend_attach()
1056 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); in stk7770p_frontend_attach()
1057 dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); in stk7770p_frontend_attach()
1058 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk7770p_frontend_attach()
1060 dib0700_ctrl_clock(adap->dev, 72, 1); in stk7770p_frontend_attach()
1063 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); in stk7770p_frontend_attach()
1065 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); in stk7770p_frontend_attach()
1067 if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 18, in stk7770p_frontend_attach()
1075 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, in stk7770p_frontend_attach()
1077 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk7770p_frontend_attach()
1231 struct dvb_usb_adapter *adap = fe->dvb->priv; in dib80xx_tuner_reset() local
1232 struct dib0700_adapter_state *state = adap->priv; in dib80xx_tuner_reset()
1239 struct dvb_usb_adapter *adap = fe->dvb->priv; in dib80xx_tuner_sleep() local
1240 struct dib0700_adapter_state *state = adap->priv; in dib80xx_tuner_sleep()
1285 struct dvb_usb_adapter *adap = fe->dvb->priv; in dib807x_set_param_override() local
1286 struct dib0700_adapter_state *state = adap->priv; in dib807x_set_param_override()
1304 static int dib807x_tuner_attach(struct dvb_usb_adapter *adap) in dib807x_tuner_attach() argument
1306 struct dib0700_adapter_state *st = adap->priv; in dib807x_tuner_attach()
1307 struct i2c_adapter *tun_i2c = st->dib8000_ops.get_i2c_master(adap->fe_adap[0].fe, in dib807x_tuner_attach()
1310 if (adap->id == 0) { in dib807x_tuner_attach()
1311 if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, in dib807x_tuner_attach()
1315 if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, in dib807x_tuner_attach()
1320 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in dib807x_tuner_attach()
1321 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib807x_set_param_override; in dib807x_tuner_attach()
1342 static int stk807x_frontend_attach(struct dvb_usb_adapter *adap) in stk807x_frontend_attach() argument
1344 struct dib0700_adapter_state *state = adap->priv; in stk807x_frontend_attach()
1349 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); in stk807x_frontend_attach()
1351 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); in stk807x_frontend_attach()
1352 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); in stk807x_frontend_attach()
1353 dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); in stk807x_frontend_attach()
1355 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk807x_frontend_attach()
1357 dib0700_ctrl_clock(adap->dev, 72, 1); in stk807x_frontend_attach()
1360 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); in stk807x_frontend_attach()
1362 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); in stk807x_frontend_attach()
1364 state->dib8000_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 18, in stk807x_frontend_attach()
1367 adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x80, in stk807x_frontend_attach()
1370 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk807x_frontend_attach()
1374 static int stk807xpvr_frontend_attach0(struct dvb_usb_adapter *adap) in stk807xpvr_frontend_attach0() argument
1376 struct dib0700_adapter_state *state = adap->priv; in stk807xpvr_frontend_attach0()
1381 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); in stk807xpvr_frontend_attach0()
1383 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); in stk807xpvr_frontend_attach0()
1385 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); in stk807xpvr_frontend_attach0()
1386 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); in stk807xpvr_frontend_attach0()
1387 dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); in stk807xpvr_frontend_attach0()
1389 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk807xpvr_frontend_attach0()
1391 dib0700_ctrl_clock(adap->dev, 72, 1); in stk807xpvr_frontend_attach0()
1394 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); in stk807xpvr_frontend_attach0()
1396 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); in stk807xpvr_frontend_attach0()
1399 state->dib8000_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x22, 0x80, 0); in stk807xpvr_frontend_attach0()
1401 adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x80, in stk807xpvr_frontend_attach0()
1404 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk807xpvr_frontend_attach0()
1407 static int stk807xpvr_frontend_attach1(struct dvb_usb_adapter *adap) in stk807xpvr_frontend_attach1() argument
1409 struct dib0700_adapter_state *state = adap->priv; in stk807xpvr_frontend_attach1()
1415 state->dib8000_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x12, 0x82, 0); in stk807xpvr_frontend_attach1()
1417 adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x82, in stk807xpvr_frontend_attach1()
1420 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk807xpvr_frontend_attach1()
1537 struct dvb_usb_adapter *adap = fe->dvb->priv; in dib8090_get_adc_power() local
1538 struct dib0700_adapter_state *state = adap->priv; in dib8090_get_adc_power()
1651 struct dvb_usb_adapter *adap = fe->dvb->priv; in dib8096_set_param_override() local
1652 struct dib0700_adapter_state *state = adap->priv; in dib8096_set_param_override()
1734 static int dib809x_tuner_attach(struct dvb_usb_adapter *adap) in dib809x_tuner_attach() argument
1736 struct dib0700_adapter_state *st = adap->priv; in dib809x_tuner_attach()
1737 …struct i2c_adapter *tun_i2c = st->dib8000_ops.get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTE… in dib809x_tuner_attach()
1739 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &dib809x_dib0090_config) == NULL) in dib809x_tuner_attach()
1742 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in dib809x_tuner_attach()
1743 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib8096_set_param_override; in dib809x_tuner_attach()
1747 static int stk809x_frontend_attach(struct dvb_usb_adapter *adap) in stk809x_frontend_attach() argument
1749 struct dib0700_adapter_state *state = adap->priv; in stk809x_frontend_attach()
1754 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); in stk809x_frontend_attach()
1756 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); in stk809x_frontend_attach()
1757 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); in stk809x_frontend_attach()
1758 dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); in stk809x_frontend_attach()
1760 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk809x_frontend_attach()
1762 dib0700_ctrl_clock(adap->dev, 72, 1); in stk809x_frontend_attach()
1765 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); in stk809x_frontend_attach()
1767 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); in stk809x_frontend_attach()
1769 state->dib8000_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 18, 0x80, 0); in stk809x_frontend_attach()
1771 …adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x80, &dib809x_dib8000_config[… in stk809x_frontend_attach()
1773 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk809x_frontend_attach()
1776 static int nim8096md_tuner_attach(struct dvb_usb_adapter *adap) in nim8096md_tuner_attach() argument
1778 struct dib0700_adapter_state *st = adap->priv; in nim8096md_tuner_attach()
1780 struct dvb_frontend *fe_slave = st->dib8000_ops.get_slave_frontend(adap->fe_adap[0].fe, 1); in nim8096md_tuner_attach()
1786 fe_slave->dvb = adap->fe_adap[0].fe->dvb; in nim8096md_tuner_attach()
1789 tun_i2c = st->dib8000_ops.get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); in nim8096md_tuner_attach()
1790 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &dib809x_dib0090_config) == NULL) in nim8096md_tuner_attach()
1793 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in nim8096md_tuner_attach()
1794 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib8096_set_param_override; in nim8096md_tuner_attach()
1799 static int nim8096md_frontend_attach(struct dvb_usb_adapter *adap) in nim8096md_frontend_attach() argument
1802 struct dib0700_adapter_state *state = adap->priv; in nim8096md_frontend_attach()
1807 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); in nim8096md_frontend_attach()
1809 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); in nim8096md_frontend_attach()
1811 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); in nim8096md_frontend_attach()
1812 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); in nim8096md_frontend_attach()
1813 dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); in nim8096md_frontend_attach()
1815 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in nim8096md_frontend_attach()
1817 dib0700_ctrl_clock(adap->dev, 72, 1); in nim8096md_frontend_attach()
1820 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); in nim8096md_frontend_attach()
1822 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); in nim8096md_frontend_attach()
1824 state->dib8000_ops.i2c_enumeration(&adap->dev->i2c_adap, 2, 18, 0x80, 0); in nim8096md_frontend_attach()
1826 …adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x80, &dib809x_dib8000_config[… in nim8096md_frontend_attach()
1827 if (adap->fe_adap[0].fe == NULL) in nim8096md_frontend_attach()
1834 fe_slave = state->dib8000_ops.init(&adap->dev->i2c_adap, 0x82, &dib809x_dib8000_config[1]); in nim8096md_frontend_attach()
1835 state->dib8000_ops.set_slave_frontend(adap->fe_adap[0].fe, fe_slave); in nim8096md_frontend_attach()
2097 struct dvb_usb_adapter *adap = fe->dvb->priv; in dib8096p_agc_startup() local
2098 struct dib0700_adapter_state *state = adap->priv; in dib8096p_agc_startup()
2119 dib0700_set_i2c_speed(adap->dev, 200); in dib8096p_agc_startup()
2122 dib0700_set_i2c_speed(adap->dev, 1000); in dib8096p_agc_startup()
2127 static int tfe8096p_frontend_attach(struct dvb_usb_adapter *adap) in tfe8096p_frontend_attach() argument
2129 struct dib0700_state *st = adap->dev->priv; in tfe8096p_frontend_attach()
2131 struct dib0700_adapter_state *state = adap->priv; in tfe8096p_frontend_attach()
2136 dib0700_get_version(adap->dev, NULL, NULL, &fw_version, NULL); in tfe8096p_frontend_attach()
2140 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); in tfe8096p_frontend_attach()
2142 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); in tfe8096p_frontend_attach()
2143 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); in tfe8096p_frontend_attach()
2144 dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); in tfe8096p_frontend_attach()
2146 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in tfe8096p_frontend_attach()
2148 dib0700_ctrl_clock(adap->dev, 72, 1); in tfe8096p_frontend_attach()
2151 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); in tfe8096p_frontend_attach()
2153 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); in tfe8096p_frontend_attach()
2155 state->dib8000_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x10, 0x80, 1); in tfe8096p_frontend_attach()
2157 adap->fe_adap[0].fe = state->dib8000_ops.init(&adap->dev->i2c_adap, in tfe8096p_frontend_attach()
2160 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in tfe8096p_frontend_attach()
2163 static int tfe8096p_tuner_attach(struct dvb_usb_adapter *adap) in tfe8096p_tuner_attach() argument
2165 struct dib0700_adapter_state *st = adap->priv; in tfe8096p_tuner_attach()
2166 struct i2c_adapter *tun_i2c = st->dib8000_ops.get_i2c_tuner(adap->fe_adap[0].fe); in tfe8096p_tuner_attach()
2172 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, in tfe8096p_tuner_attach()
2176 st->dib8000_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); in tfe8096p_tuner_attach()
2178 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in tfe8096p_tuner_attach()
2179 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib8096p_agc_startup; in tfe8096p_tuner_attach()
2366 static int stk9090m_frontend_attach(struct dvb_usb_adapter *adap) in stk9090m_frontend_attach() argument
2368 struct dib0700_adapter_state *state = adap->priv; in stk9090m_frontend_attach()
2369 struct dib0700_state *st = adap->dev->priv; in stk9090m_frontend_attach()
2373 dib0700_get_version(adap->dev, NULL, NULL, &fw_version, NULL); in stk9090m_frontend_attach()
2376 dib0700_set_i2c_speed(adap->dev, 340); in stk9090m_frontend_attach()
2378 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); in stk9090m_frontend_attach()
2380 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); in stk9090m_frontend_attach()
2381 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); in stk9090m_frontend_attach()
2382 dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); in stk9090m_frontend_attach()
2383 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in stk9090m_frontend_attach()
2385 dib0700_ctrl_clock(adap->dev, 72, 1); in stk9090m_frontend_attach()
2388 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); in stk9090m_frontend_attach()
2390 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); in stk9090m_frontend_attach()
2392 dib9000_i2c_enumeration(&adap->dev->i2c_adap, 1, 0x10, 0x80); in stk9090m_frontend_attach()
2394 if (request_firmware(&state->frontend_firmware, "dib9090.fw", &adap->dev->udev->dev)) { in stk9090m_frontend_attach()
2403 adap->fe_adap[0].fe = dvb_attach(dib9000_attach, &adap->dev->i2c_adap, 0x80, &stk9090m_config); in stk9090m_frontend_attach()
2405 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk9090m_frontend_attach()
2408 static int dib9090_tuner_attach(struct dvb_usb_adapter *adap) in dib9090_tuner_attach() argument
2410 struct dib0700_adapter_state *state = adap->priv; in dib9090_tuner_attach()
2411 struct i2c_adapter *i2c = dib9000_get_tuner_interface(adap->fe_adap[0].fe); in dib9090_tuner_attach()
2420 if (dvb_attach(dib0090_fw_register, adap->fe_adap[0].fe, i2c, &dib9090_dib0090_config) == NULL) in dib9090_tuner_attach()
2422 i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_1_2, 0); in dib9090_tuner_attach()
2425 dib0700_set_i2c_speed(adap->dev, 1500); in dib9090_tuner_attach()
2426 if (dib9000_firmware_post_pll_init(adap->fe_adap[0].fe) < 0) in dib9090_tuner_attach()
2432 static int nim9090md_frontend_attach(struct dvb_usb_adapter *adap) in nim9090md_frontend_attach() argument
2434 struct dib0700_adapter_state *state = adap->priv; in nim9090md_frontend_attach()
2435 struct dib0700_state *st = adap->dev->priv; in nim9090md_frontend_attach()
2441 dib0700_get_version(adap->dev, NULL, NULL, &fw_version, NULL); in nim9090md_frontend_attach()
2444 dib0700_set_i2c_speed(adap->dev, 340); in nim9090md_frontend_attach()
2446 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); in nim9090md_frontend_attach()
2448 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); in nim9090md_frontend_attach()
2449 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); in nim9090md_frontend_attach()
2450 dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); in nim9090md_frontend_attach()
2451 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in nim9090md_frontend_attach()
2453 dib0700_ctrl_clock(adap->dev, 72, 1); in nim9090md_frontend_attach()
2456 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); in nim9090md_frontend_attach()
2458 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); in nim9090md_frontend_attach()
2460 if (request_firmware(&state->frontend_firmware, "dib9090.fw", &adap->dev->udev->dev)) { in nim9090md_frontend_attach()
2471 dib9000_i2c_enumeration(&adap->dev->i2c_adap, 1, 0x20, 0x80); in nim9090md_frontend_attach()
2472 adap->fe_adap[0].fe = dvb_attach(dib9000_attach, &adap->dev->i2c_adap, 0x80, &nim9090md_config[0]); in nim9090md_frontend_attach()
2474 if (adap->fe_adap[0].fe == NULL) in nim9090md_frontend_attach()
2477 i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_3_4, 0); in nim9090md_frontend_attach()
2481 dib9000_set_slave_frontend(adap->fe_adap[0].fe, fe_slave); in nim9090md_frontend_attach()
2486 static int nim9090md_tuner_attach(struct dvb_usb_adapter *adap) in nim9090md_tuner_attach() argument
2488 struct dib0700_adapter_state *state = adap->priv; in nim9090md_tuner_attach()
2498 i2c = dib9000_get_tuner_interface(adap->fe_adap[0].fe); in nim9090md_tuner_attach()
2499 …if (dvb_attach(dib0090_fw_register, adap->fe_adap[0].fe, i2c, &nim9090md_dib0090_config[0]) == NUL… in nim9090md_tuner_attach()
2501 i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_1_2, 0); in nim9090md_tuner_attach()
2505 dib0700_set_i2c_speed(adap->dev, 1500); in nim9090md_tuner_attach()
2506 if (dib9000_firmware_post_pll_init(adap->fe_adap[0].fe) < 0) in nim9090md_tuner_attach()
2509 fe_slave = dib9000_get_slave_frontend(adap->fe_adap[0].fe, 1); in nim9090md_tuner_attach()
2511 i2c = dib9000_get_component_bus_interface(adap->fe_adap[0].fe); in nim9090md_tuner_attach()
2517 fe_slave->dvb = adap->fe_adap[0].fe->dvb; in nim9090md_tuner_attach()
2518 dib9000_fw_set_component_bus_speed(adap->fe_adap[0].fe, 1500); in nim9090md_tuner_attach()
2603 struct dvb_usb_adapter *adap = fe->dvb->priv; in dib7090_agc_startup() local
2604 struct dib0700_adapter_state *state = adap->priv; in dib7090_agc_startup()
2639 struct dvb_usb_adapter *adap = fe->dvb->priv; in tfe7790p_update_lna() local
2640 struct dib0700_adapter_state *state = adap->priv; in tfe7790p_update_lna()
2794 struct dvb_usb_adapter *adap = fe->dvb->priv; in tfe7090p_pvr_update_lna() local
2795 struct dib0700_adapter_state *state = adap->priv; in tfe7090p_pvr_update_lna()
3018 static int nim7090_frontend_attach(struct dvb_usb_adapter *adap) in nim7090_frontend_attach() argument
3020 struct dib0700_adapter_state *state = adap->priv; in nim7090_frontend_attach()
3025 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); in nim7090_frontend_attach()
3027 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); in nim7090_frontend_attach()
3028 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); in nim7090_frontend_attach()
3029 dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); in nim7090_frontend_attach()
3030 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in nim7090_frontend_attach()
3033 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); in nim7090_frontend_attach()
3035 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); in nim7090_frontend_attach()
3037 …if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x10, &nim7090_dib7000p_config) !… in nim7090_frontend_attach()
3042 …adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, &nim7090_dib7000p_confi… in nim7090_frontend_attach()
3044 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in nim7090_frontend_attach()
3047 static int nim7090_tuner_attach(struct dvb_usb_adapter *adap) in nim7090_tuner_attach() argument
3049 struct dib0700_adapter_state *st = adap->priv; in nim7090_tuner_attach()
3050 struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); in nim7090_tuner_attach()
3056 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &nim7090_dib0090_config) == NULL) in nim7090_tuner_attach()
3059 st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); in nim7090_tuner_attach()
3061 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in nim7090_tuner_attach()
3062 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; in nim7090_tuner_attach()
3066 static int tfe7090pvr_frontend0_attach(struct dvb_usb_adapter *adap) in tfe7090pvr_frontend0_attach() argument
3068 struct dib0700_state *st = adap->dev->priv; in tfe7090pvr_frontend0_attach()
3069 struct dib0700_adapter_state *state = adap->priv; in tfe7090pvr_frontend0_attach()
3077 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); in tfe7090pvr_frontend0_attach()
3079 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); in tfe7090pvr_frontend0_attach()
3080 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); in tfe7090pvr_frontend0_attach()
3081 dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); in tfe7090pvr_frontend0_attach()
3082 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in tfe7090pvr_frontend0_attach()
3085 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); in tfe7090pvr_frontend0_attach()
3087 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); in tfe7090pvr_frontend0_attach()
3090 …if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 0x20, &tfe7090pvr_dib7000p_config… in tfe7090pvr_frontend0_attach()
3096 dib0700_set_i2c_speed(adap->dev, 340); in tfe7090pvr_frontend0_attach()
3097 …adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x90, &tfe7090pvr_dib7000p_co… in tfe7090pvr_frontend0_attach()
3098 if (adap->fe_adap[0].fe == NULL) in tfe7090pvr_frontend0_attach()
3101 state->dib7000p_ops.slave_reset(adap->fe_adap[0].fe); in tfe7090pvr_frontend0_attach()
3106 static int tfe7090pvr_frontend1_attach(struct dvb_usb_adapter *adap) in tfe7090pvr_frontend1_attach() argument
3109 struct dib0700_adapter_state *state = adap->priv; in tfe7090pvr_frontend1_attach()
3111 if (adap->dev->adapter[0].fe_adap[0].fe == NULL) { in tfe7090pvr_frontend1_attach()
3119 …i2c = state->dib7000p_ops.get_i2c_master(adap->dev->adapter[0].fe_adap[0].fe, DIBX000_I2C_INTERFAC… in tfe7090pvr_frontend1_attach()
3126 adap->fe_adap[0].fe = state->dib7000p_ops.init(i2c, 0x92, &tfe7090pvr_dib7000p_config[1]); in tfe7090pvr_frontend1_attach()
3127 dib0700_set_i2c_speed(adap->dev, 200); in tfe7090pvr_frontend1_attach()
3129 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in tfe7090pvr_frontend1_attach()
3132 static int tfe7090pvr_tuner0_attach(struct dvb_usb_adapter *adap) in tfe7090pvr_tuner0_attach() argument
3134 struct dib0700_adapter_state *st = adap->priv; in tfe7090pvr_tuner0_attach()
3135 struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); in tfe7090pvr_tuner0_attach()
3141 …if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &tfe7090pvr_dib0090_config[0]) == N… in tfe7090pvr_tuner0_attach()
3144 st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); in tfe7090pvr_tuner0_attach()
3146 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in tfe7090pvr_tuner0_attach()
3147 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; in tfe7090pvr_tuner0_attach()
3151 static int tfe7090pvr_tuner1_attach(struct dvb_usb_adapter *adap) in tfe7090pvr_tuner1_attach() argument
3153 struct dib0700_adapter_state *st = adap->priv; in tfe7090pvr_tuner1_attach()
3154 struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); in tfe7090pvr_tuner1_attach()
3160 …if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &tfe7090pvr_dib0090_config[1]) == N… in tfe7090pvr_tuner1_attach()
3163 st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); in tfe7090pvr_tuner1_attach()
3165 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in tfe7090pvr_tuner1_attach()
3166 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; in tfe7090pvr_tuner1_attach()
3170 static int tfe7790p_frontend_attach(struct dvb_usb_adapter *adap) in tfe7790p_frontend_attach() argument
3172 struct dib0700_state *st = adap->dev->priv; in tfe7790p_frontend_attach()
3173 struct dib0700_adapter_state *state = adap->priv; in tfe7790p_frontend_attach()
3181 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); in tfe7790p_frontend_attach()
3183 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); in tfe7790p_frontend_attach()
3184 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); in tfe7790p_frontend_attach()
3185 dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); in tfe7790p_frontend_attach()
3186 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in tfe7790p_frontend_attach()
3188 dib0700_ctrl_clock(adap->dev, 72, 1); in tfe7790p_frontend_attach()
3189 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); in tfe7790p_frontend_attach()
3191 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); in tfe7790p_frontend_attach()
3193 if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, in tfe7790p_frontend_attach()
3200 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, in tfe7790p_frontend_attach()
3203 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in tfe7790p_frontend_attach()
3206 static int tfe7790p_tuner_attach(struct dvb_usb_adapter *adap) in tfe7790p_tuner_attach() argument
3208 struct dib0700_adapter_state *st = adap->priv; in tfe7790p_tuner_attach()
3210 st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); in tfe7790p_tuner_attach()
3217 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, in tfe7790p_tuner_attach()
3221 st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); in tfe7790p_tuner_attach()
3223 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; in tfe7790p_tuner_attach()
3224 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; in tfe7790p_tuner_attach()
3276 static int stk7070pd_frontend_attach0(struct dvb_usb_adapter *adap) in stk7070pd_frontend_attach0() argument
3278 struct dib0700_adapter_state *state = adap->priv; in stk7070pd_frontend_attach0()
3283 stk7070pd_init(adap->dev); in stk7070pd_frontend_attach0()
3286 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); in stk7070pd_frontend_attach0()
3288 if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 2, 18, in stk7070pd_frontend_attach0()
3296 …adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, &stk7070pd_dib7000p_con… in stk7070pd_frontend_attach0()
3297 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk7070pd_frontend_attach0()
3300 static int stk7070pd_frontend_attach1(struct dvb_usb_adapter *adap) in stk7070pd_frontend_attach1() argument
3302 struct dib0700_adapter_state *state = adap->priv; in stk7070pd_frontend_attach1()
3307 …adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x82, &stk7070pd_dib7000p_con… in stk7070pd_frontend_attach1()
3308 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in stk7070pd_frontend_attach1()
3314 struct dvb_usb_adapter *adap = fe->dvb->priv; in novatd_read_status_override() local
3315 struct dvb_usb_device *dev = adap->dev; in novatd_read_status_override()
3322 dib0700_set_gpio(dev, adap->id == 0 ? GPIO1 : GPIO0, GPIO_OUT, in novatd_read_status_override()
3330 struct dvb_usb_adapter *adap = fe->dvb->priv; in novatd_sleep_override() local
3331 struct dvb_usb_device *dev = adap->dev; in novatd_sleep_override()
3335 dib0700_set_gpio(dev, adap->id == 0 ? GPIO1 : GPIO0, GPIO_OUT, 0); in novatd_sleep_override()
3346 static int novatd_frontend_attach(struct dvb_usb_adapter *adap) in novatd_frontend_attach() argument
3348 struct dvb_usb_device *dev = adap->dev; in novatd_frontend_attach()
3350 struct dib0700_adapter_state *state = adap->priv; in novatd_frontend_attach()
3355 if (adap->id == 0) { in novatd_frontend_attach()
3372 adap->fe_adap[0].fe = state->dib7000p_ops.init(&dev->i2c_adap, in novatd_frontend_attach()
3373 adap->id == 0 ? 0x80 : 0x82, in novatd_frontend_attach()
3374 &stk7070pd_dib7000p_config[adap->id]); in novatd_frontend_attach()
3376 if (adap->fe_adap[0].fe == NULL) in novatd_frontend_attach()
3379 st->read_status = adap->fe_adap[0].fe->ops.read_status; in novatd_frontend_attach()
3380 adap->fe_adap[0].fe->ops.read_status = novatd_read_status_override; in novatd_frontend_attach()
3381 st->sleep = adap->fe_adap[0].fe->ops.sleep; in novatd_frontend_attach()
3382 adap->fe_adap[0].fe->ops.sleep = novatd_sleep_override; in novatd_frontend_attach()
3409 static int s5h1411_frontend_attach(struct dvb_usb_adapter *adap) in s5h1411_frontend_attach() argument
3411 struct dib0700_state *st = adap->dev->priv; in s5h1411_frontend_attach()
3420 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 0); in s5h1411_frontend_attach()
3421 dib0700_set_gpio(adap->dev, GPIO3, GPIO_OUT, 0); in s5h1411_frontend_attach()
3422 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); in s5h1411_frontend_attach()
3424 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in s5h1411_frontend_attach()
3426 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); in s5h1411_frontend_attach()
3428 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); in s5h1411_frontend_attach()
3429 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); in s5h1411_frontend_attach()
3430 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); in s5h1411_frontend_attach()
3431 dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); in s5h1411_frontend_attach()
3432 dib0700_set_gpio(adap->dev, GPIO2, GPIO_OUT, 0); in s5h1411_frontend_attach()
3436 dib0700_set_gpio(adap->dev, GPIO2, GPIO_OUT, 1); in s5h1411_frontend_attach()
3439 adap->fe_adap[0].fe = dvb_attach(s5h1411_attach, &pinnacle_801e_config, in s5h1411_frontend_attach()
3440 &adap->dev->i2c_adap); in s5h1411_frontend_attach()
3441 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in s5h1411_frontend_attach()
3447 struct dvb_usb_adapter *adap = priv; in dib0700_xc5000_tuner_callback() local
3451 dib0700_set_gpio(adap->dev, GPIO1, GPIO_OUT, 0); in dib0700_xc5000_tuner_callback()
3453 dib0700_set_gpio(adap->dev, GPIO1, GPIO_OUT, 1); in dib0700_xc5000_tuner_callback()
3468 static int xc5000_tuner_attach(struct dvb_usb_adapter *adap) in xc5000_tuner_attach() argument
3471 adap->fe_adap[0].fe->callback = dib0700_xc5000_tuner_callback; in xc5000_tuner_attach()
3473 return dvb_attach(xc5000_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, in xc5000_tuner_attach()
3481 struct dvb_usb_adapter *adap = priv; in dib0700_xc4000_tuner_callback() local
3482 struct dib0700_adapter_state *state = adap->priv; in dib0700_xc4000_tuner_callback()
3486 state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 0); in dib0700_xc4000_tuner_callback()
3488 state->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); in dib0700_xc4000_tuner_callback()
3571 static int pctv340e_frontend_attach(struct dvb_usb_adapter *adap) in pctv340e_frontend_attach() argument
3573 struct dib0700_state *st = adap->dev->priv; in pctv340e_frontend_attach()
3574 struct dib0700_adapter_state *state = adap->priv; in pctv340e_frontend_attach()
3580 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); in pctv340e_frontend_attach()
3582 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); in pctv340e_frontend_attach()
3586 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in pctv340e_frontend_attach()
3588 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); in pctv340e_frontend_attach()
3591 dib0700_set_gpio(adap->dev, GPIO8, GPIO_OUT, 1); in pctv340e_frontend_attach()
3594 dib0700_set_gpio(adap->dev, GPIO2, GPIO_OUT, 1); in pctv340e_frontend_attach()
3597 dib0700_ctrl_clock(adap->dev, 72, 1); in pctv340e_frontend_attach()
3601 if (state->dib7000p_ops.dib7000pc_detection(&adap->dev->i2c_adap) == 0) { in pctv340e_frontend_attach()
3607 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x12, in pctv340e_frontend_attach()
3611 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in pctv340e_frontend_attach()
3622 static int xc4000_tuner_attach(struct dvb_usb_adapter *adap) in xc4000_tuner_attach() argument
3625 struct dib0700_adapter_state *state = adap->priv; in xc4000_tuner_attach()
3628 tun_i2c = state->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, in xc4000_tuner_attach()
3636 adap->fe_adap[0].fe->callback = dib0700_xc4000_tuner_callback; in xc4000_tuner_attach()
3638 return dvb_attach(xc4000_attach, adap->fe_adap[0].fe, tun_i2c, in xc4000_tuner_attach()
3671 static int lgdt3305_frontend_attach(struct dvb_usb_adapter *adap) in lgdt3305_frontend_attach() argument
3673 struct dib0700_state *st = adap->dev->priv; in lgdt3305_frontend_attach()
3681 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); in lgdt3305_frontend_attach()
3683 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); in lgdt3305_frontend_attach()
3687 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); in lgdt3305_frontend_attach()
3689 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); in lgdt3305_frontend_attach()
3691 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); in lgdt3305_frontend_attach()
3694 adap->fe_adap[0].fe = dvb_attach(lgdt3305_attach, in lgdt3305_frontend_attach()
3696 &adap->dev->i2c_adap); in lgdt3305_frontend_attach()
3698 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; in lgdt3305_frontend_attach()
3701 static int mxl5007t_tuner_attach(struct dvb_usb_adapter *adap) in mxl5007t_tuner_attach() argument
3703 return dvb_attach(mxl5007t_attach, adap->fe_adap[0].fe, in mxl5007t_tuner_attach()
3704 &adap->dev->i2c_adap, 0x60, in mxl5007t_tuner_attach()