if (atv_demod_get_state() == ATVDEMOD_STATE_WORK)
return 0;
#endif
- if (amlatvdemod_devp->pin_name != NULL)
+ if (amlatvdemod_devp->pin_name != NULL) {
amlatvdemod_devp->agc_pin =
devm_pinctrl_get_select(amlatvdemod_devp->dev,
amlatvdemod_devp->pin_name);
+ if (IS_ERR(amlatvdemod_devp->agc_pin)) {
+ amlatvdemod_devp->agc_pin = NULL;
+ pr_err("%s: get agc pins fail\n", __func__);
+ }
+ }
adc_set_pll_cntl(1, 0x1, NULL);
vdac_enable(1, 1);
aml_afc_timer_disable(fe);
atvdemod_uninit();
- if (amlatvdemod_devp->agc_pin != NULL) {
+ if (!IS_ERR_OR_NULL(amlatvdemod_devp->agc_pin)) {
devm_pinctrl_put(amlatvdemod_devp->agc_pin);
amlatvdemod_devp->agc_pin = NULL;
}
if (on) {
dtvdd_devp->pin = devm_pinctrl_get_select(dtvdd_devp->dev,
dtvdd_devp->pin_name);
+ if (IS_ERR(dtvdd_devp->pin)) {
+ dtvdd_devp->pin = NULL;
+ PR_ERR("get agc pins fail\n");
+ }
} else {
/*off*/
- if (dtvdd_devp->pin != NULL) {
+ if (!IS_ERR_OR_NULL(dtvdd_devp->pin)) {
devm_pinctrl_put(dtvdd_devp->pin);
dtvdd_devp->pin = NULL;
}
};
static struct dvb_frontend_ops aml_dtvdm_txl_ops = {
- .delsys = { /*SYS_DVBC_ANNEX_A,*/ SYS_DTMB, SYS_ANALOG},
+ .delsys = { SYS_DVBC_ANNEX_A, SYS_DTMB, SYS_ANALOG},
.info = {
/*in aml_fe, it is 'amlogic dvb frontend' */
.name = "amlogic dtv demod txl",
bool status;
status = (delsys == SYS_DVBT) || (delsys == SYS_DVBC_ANNEX_A) ||
- (delsys == SYS_DVBS) || (delsys == SYS_ATSC);
+ (delsys == SYS_DVBS) || (delsys == SYS_ATSC) ||
+ (delsys == SYS_DTMB); /* added by Amlogic 20180720 */
return status;
}