From 76c96cd404f5d9165a84c8c7c7fcce4ee001d1cb Mon Sep 17 00:00:00 2001 From: "nengwen.chen" Date: Thu, 9 Aug 2018 21:38:56 +0800 Subject: [PATCH] hw_demux: fix compile error by commit 'add xtal config for tuner' [1/1] PD#171245: fix compile error by commit 'add xtal config for tuner' Change-Id: I303bce09f127ee8e11417e570bcdf468b2f92eeb Signed-off-by: nengwen.chen --- .../stream_input/parser/hw_demux/aml_demod_gt.h | 5 ++++- .../media_modules/stream_input/parser/hw_demux/aml_dvb.c | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/amlogic/media_modules/stream_input/parser/hw_demux/aml_demod_gt.h b/drivers/amlogic/media_modules/stream_input/parser/hw_demux/aml_demod_gt.h index 7025e233ad3d..729257b50ebf 100644 --- a/drivers/amlogic/media_modules/stream_input/parser/hw_demux/aml_demod_gt.h +++ b/drivers/amlogic/media_modules/stream_input/parser/hw_demux/aml_demod_gt.h @@ -18,11 +18,14 @@ struct amlfe_demod_config { int reset_value; }; +/* For configure different tuners */ +/* It can add fields as extensions */ struct tuner_config { u8 id; u8 i2c_addr; - u8 xtal; + u8 xtal; /* 0: 16MHz, 1: 24MHz, 3: 27MHz */ u8 xtal_cap; + u8 xtal_mode; }; static inline struct dvb_frontend* aml_dtvdm_attach (const struct amlfe_exp_config *config) { diff --git a/drivers/amlogic/media_modules/stream_input/parser/hw_demux/aml_dvb.c b/drivers/amlogic/media_modules/stream_input/parser/hw_demux/aml_dvb.c index e6cddb39ad0e..337c5dbe56c8 100644 --- a/drivers/amlogic/media_modules/stream_input/parser/hw_demux/aml_dvb.c +++ b/drivers/amlogic/media_modules/stream_input/parser/hw_demux/aml_dvb.c @@ -1960,6 +1960,12 @@ static int aml_dvb_probe(struct platform_device *pdev) else cfg.xtal = value; + ret = of_property_read_u32(node_tuner, "tuner_xtal_mode", &value); + if (ret) + pr_err("tuner_xtal_mode error.\n"); + else + cfg.xtal_mode = value; + ret = of_property_read_u32(node_tuner, "tuner_xtal_cap", &value); if (ret) pr_err("tuner_xtal_cap error.\n");