Пример #1
0
static int si2168_fe_enter_mode(struct aml_fe *fe, int mode)
{
	struct aml_fe_dev *dev = fe->dtv_demod;
	int ret;
	
	pr_dbg("=========================si2168 demod init\r\n");
	ret=amlogic_gpio_request(dev->reset_gpio, "si2168_reset");
	ret = amlogic_gpio_direction_output(dev->reset_gpio, dev->reset_value, "si2168_reset");
	msleep(300);
	ret=amlogic_gpio_direction_output(dev->reset_gpio, !dev->reset_value, "si2168_reset"); //enable tuner power
	msleep(200);
	//reset
	int standard;
	standard=SILABS_DVB_T2;
	//Initialize LSI
	printf("Initializing LSI .. ");
	SiLabs_API_SW_Init(&front_end, DEMOD_ADDRESS+(fe1*2), TUNER_ADDRESS_TER+(fe1*2), TUNER_ADDRESS_SAT+(fe1*2));
	front_end.Si2168_FE->demod->i2c=DEMOD_ADDRESS;
	SiLabs_API_switch_to_standard		(&front_end, standard, 1);
	printk("chip id is %d, i2c is %x\n",front_end.chip,front_end.Si2168_FE->demod->i2c);
	SiLabs_API_Tuner_I2C_Enable(&front_end);
	if(MDrv_Tuner_Init()==1)
		pr_dbg("TUNER OK\n");
	else
		pr_dbg("TUNER NG\n");	
	SiLabs_API_Tuner_I2C_Disable(&front_end);
	return 0;

}
Пример #2
0
static int SI2168_Init(struct dvb_frontend *fe)
{
	pr_dbg("frontend_reset is %d\n",frontend_reset);
	//reset
	int standard;
	standard=SILABS_DVB_T2;
	SI2168_Reset();
	msleep(100);
	//Initialize LSI
	printf("Initializing LSI .. ");
	SiLabs_API_SW_Init(&front_end, DEMOD_ADDRESS+(fe1*2), TUNER_ADDRESS_TER+(fe1*2), TUNER_ADDRESS_SAT+(fe1*2));
	front_end.Si2168_FE->demod->i2c=DEMOD_ADDRESS;
	SiLabs_API_switch_to_standard		(&front_end, standard, 1);
	printk("chip id is %d, i2c is %x\n",front_end.chip,front_end.Si2168_FE->demod->i2c);
	if(MDrv_Tuner_Init()==1)
		pr_dbg("TUNER OK\n");
	else
		pr_dbg("TUNER NG\n");	
	return 0;
}