+static struct mt312_config skystar23_samsung_tbdu18132_config = {
+
+ .demod_address = 0x0e,
+ .pll_set = skystar23_samsung_tbdu18132_pll_set,
+};
+
+
+
+
+static void frontend_init(struct adapter *skystar2)
+{
+ switch(skystar2->pdev->device) {
+ case 0x2103: // Technisat Skystar2 OR Technisat Airstar2 (DVB-T or ATSC)
+
+ // Attempt to load the Nextwave nxt2002 for ATSC support
+ skystar2->fe = nxt2002_attach(&samsung_tbmv_config, &skystar2->i2c_adap);
+ if (skystar2->fe != NULL) {
+ skystar2->fe_sleep = skystar2->fe->ops->sleep;
+ skystar2->fe->ops->sleep = flexcop_sleep;
+ break;
+ }
+
+ // try the skystar2 v2.6 first (stv0299/Samsung tbmu24112(sl1935))
+ skystar2->fe = stv0299_attach(&samsung_tbmu24112_config, &skystar2->i2c_adap);
+ if (skystar2->fe != NULL) {
+ skystar2->fe->ops->set_voltage = flexcop_set_voltage;
+ skystar2->fe_sleep = skystar2->fe->ops->sleep;
+ skystar2->fe->ops->sleep = flexcop_sleep;
+ break;
+}
+
+ // try the airstar2 (mt352/Samsung tdtc9251dh0(??))
+ skystar2->fe = mt352_attach(&samsung_tdtc9251dh0_config, &skystar2->i2c_adap);
+ if (skystar2->fe != NULL) {
+ skystar2->fe->ops->info.frequency_min = 474000000;
+ skystar2->fe->ops->info.frequency_max = 858000000;
+ break;
+ }
+
+ // try the skystar2 v2.3 (vp310/Samsung tbdu18132(tsa5059))
+ skystar2->fe = vp310_attach(&skystar23_samsung_tbdu18132_config, &skystar2->i2c_adap);
+ if (skystar2->fe != NULL) {
+ skystar2->fe->ops->diseqc_send_master_cmd = flexcop_diseqc_send_master_cmd;
+ skystar2->fe->ops->diseqc_send_burst = flexcop_diseqc_send_burst;
+ skystar2->fe->ops->set_tone = flexcop_set_tone;
+ skystar2->fe->ops->set_voltage = flexcop_set_voltage;
+ skystar2->fe_sleep = skystar2->fe->ops->sleep;
+ skystar2->fe->ops->sleep = flexcop_sleep;
+ break;
+ }
+ break;
+ }
+
+ if (skystar2->fe == NULL) {
+ printk("skystar2: A frontend driver was not found for device %04x/%04x subsystem %04x/%04x\n",
+ skystar2->pdev->vendor,
+ skystar2->pdev->device,
+ skystar2->pdev->subsystem_vendor,
+ skystar2->pdev->subsystem_device);
+ } else {
+ if (dvb_register_frontend(skystar2->dvb_adapter, skystar2->fe)) {
+ printk("skystar2: Frontend registration failed!\n");
+ if (skystar2->fe->ops->release)
+ skystar2->fe->ops->release(skystar2->fe);
+ skystar2->fe = NULL;
+ }
+ }
+}
+
+