dtv_mode: add si2159 into tuner checklist

PD#165368: dtv_mode: add si2159 into tuner checklist

Change-Id: I760ebb7c1144843e30353c03ff86679b493b4608
Signed-off-by: manhao liang <manhao.liang@amlogic.com>
This commit is contained in:
manhao liang
2018-05-09 14:42:49 +08:00
committed by Dongjin Kim
parent 077fbb3a8f
commit 4e7f513353
2 changed files with 22 additions and 2 deletions

View File

@@ -36,8 +36,14 @@ static inline struct dvb_frontend* si2151_attach (struct dvb_frontend *fe,struct
return NULL;
}
static inline struct dvb_frontend* mxl661_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,u8 i2c_addr/*,
struct si2151_config *cfg*/)
struct mxl661_config *cfg*/)
{
return NULL;
}
static inline struct dvb_frontend* si2159_attach (struct dvb_frontend *fe,struct i2c_adapter *i2c,u8 i2c_addr/*,
struct si2159_config *cfg*/)
{
return NULL;
}
#endif /*__AML_DEMOD_GT_H__*/

View File

@@ -51,6 +51,7 @@ typedef enum __tuner_type
TUNER_INVALID,
TUNER_SI2151,
TUNER_MXL661,
TUNER_SI2159,
TUNER_MAX_NUM
}tuner_type;
@@ -1877,6 +1878,14 @@ static int aml_dvb_probe(struct platform_device *pdev)
pr_inf("mxl661_attach attach sucess\n");
s_tuner_type = TUNER_MXL661;
}
}else if(!strcmp(str,"si2159_tuner")) {
if (!dvb_attach(si2159_attach, frontend,i2c_adapter,i2c_addr)) {
pr_error("dvb attach si2159_attach tuner error\n");
goto error_fe;
} else {
pr_inf("si2159_attach attach sucess\n");
s_tuner_type = TUNER_SI2159;
}
}else {
pr_error("can't support tuner type: %s\n",str);
}
@@ -1899,6 +1908,9 @@ error_fe:
}else if (s_tuner_type == TUNER_MXL661) {
dvb_detach(mxl661_attach);
s_tuner_type = TUNER_INVALID;
}else if (s_tuner_type == TUNER_SI2159) {
dvb_detach(si2159_attach);
s_tuner_type = TUNER_INVALID;
}
return 0;
}
@@ -1937,9 +1949,11 @@ static int aml_dvb_remove(struct platform_device *pdev)
dvb_detach(si2151_attach);
}else if (s_tuner_type == TUNER_MXL661) {
dvb_detach(mxl661_attach);
}else if (s_tuner_type == TUNER_SI2159) {
dvb_detach(si2159_attach);
}
if (frontend && \
((s_tuner_type == TUNER_SI2151) || (s_tuner_type == TUNER_MXL661)) \
( (s_tuner_type == TUNER_SI2151) || (s_tuner_type == TUNER_MXL661) || (s_tuner_type == TUNER_SI2159) ) \
)
{
dvb_unregister_frontend(frontend);