atv_demod: modify tuner config in dts [1/3]
authornengwen.chen <nengwen.chen@amlogic.com>
Tue, 24 Jul 2018 13:02:12 +0000 (21:02 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Thu, 26 Jul 2018 14:25:00 +0000 (07:25 -0700)
PD#170567: modify tuner config in dts

Change-Id: Ibd14a6d334f097b1df243bfdfb9e22cad5b80e93
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
12 files changed:
arch/arm64/boot/dts/amlogic/txl_t950_p341.dts
arch/arm64/boot/dts/amlogic/txl_t960_p346.dts
arch/arm64/boot/dts/amlogic/txl_t962_p320.dts
arch/arm64/boot/dts/amlogic/txl_t962_p321.dts
arch/arm64/boot/dts/amlogic/txlx_t962e_r321.dts
arch/arm64/boot/dts/amlogic/txlx_t962e_r321_buildroot.dts
arch/arm64/boot/dts/amlogic/txlx_t962x_r311_1g.dts
arch/arm64/boot/dts/amlogic/txlx_t962x_r311_2g.dts
arch/arm64/boot/dts/amlogic/txlx_t962x_r311_720p.dts
drivers/amlogic/atv_demod/atv_demod_driver.c
drivers/amlogic/atv_demod/atv_demod_driver.h
include/linux/amlogic/aml_atvdemod.h

index 066a3d9f7ff1bebc08de5795bc9e9c8bb35e57c4..b104a1b6324b5c05f706d0dee578e2064dcb86ed 100644 (file)
                cm_en = <1>;/*1:enabel ;0:disable*/
        };
 
+       tuner: tuner {
+               status = "okay";
+               tuner_name = "r842_tuner";
+               tuner_i2c_adap = <&i2c1>;
+               tuner_i2c_addr = <0xf6>;
+               tuner_xtal = <3>;
+                                       /* NO_SHARE_XTAL(0)
+                                        * MASTER_TO_SLAVE_XTAL_IN(1)
+                                        * MASTER_TO_SLAVE_XTAL_OUT(2)
+                                        * SLAVE_XTAL_OUT(3)
+                                        */
+               tuner_xtal_cap = <0>; /* 0 ~ 41 (pf) */
+       };
+
        atv-demod {
                compatible = "amlogic, atv-demod";
                status = "okay";
-               tuner = "r842_tuner";
-               tuner_i2c_ada_id = <&i2c1>;
-               tuner_i2c_addr = <0xf6>;
+               tuner = <&tuner>;
                btsc_sap_mode = <1>;
                pinctrl-names = "atvdemod_agc_pins";
                pinctrl-0 = <&atvdemod_agc_pins>;
                dev_name = "dvb";
                status = "okay";
                fe0_mode = "internal";
-               fe0_tuner = "r842_tuner";
-               fe0_i2c_adap_id = <&i2c1>;
-               fe0_tuner_i2c_addr = <0xf6>;
+               fe0_tuner = <&tuner>;
 
                /*"parallel","serial","disable"*/
                ts2 = "parallel";
index f1a4dff5d9796fe96f349b979d568c5b5b95f464..af69487de54a3908d665aa5f324ff7b2a23ac997 100644 (file)
                cm_en = <1>;/*1:enabel ;0:disable*/
        };
 
+       tuner: tuner {
+               status = "okay";
+               tuner_name = "r842_tuner";
+               tuner_i2c_adap = <&i2c1>;
+               tuner_i2c_addr = <0xf6>;
+               tuner_xtal = <3>;
+                                       /* NO_SHARE_XTAL(0)
+                                        * MASTER_TO_SLAVE_XTAL_IN(1)
+                                        * MASTER_TO_SLAVE_XTAL_OUT(2)
+                                        * SLAVE_XTAL_OUT(3)
+                                        */
+               tuner_xtal_cap = <0>; /* 0 ~ 41 (pf) */
+       };
+
        atv-demod {
                compatible = "amlogic, atv-demod";
                status = "okay";
-               tuner = "r842_tuner";
-               tuner_i2c_ada_id = <&i2c1>;
-               tuner_i2c_addr = <0xf6>;
+               tuner = <&tuner>;
                btsc_sap_mode = <1>;
                pinctrl-names = "atvdemod_agc_pins";
                pinctrl-0 = <&atvdemod_agc_pins>;
                dev_name = "dvb";
                status = "okay";
                fe0_mode = "internal";
-               fe0_tuner = "r842_tuner";
-               fe0_i2c_adap_id = <&i2c1>;
-               fe0_tuner_i2c_addr = <0xf6>;
+               fe0_tuner = <&tuner>;
 
                /*"parallel","serial","disable"*/
                ts2 = "parallel";
index 4543b3d170dc8c771422bb04bb214d4ffb486ce7..c45f5cb3285a6a3684a21199deeb7db18c306ddf 100644 (file)
                cm_en = <1>;/*1:enabel ;0:disable*/
        };
 
+       tuner: tuner {
+               status = "okay";
+               tuner_name = "si2151_tuner";
+               tuner_i2c_adap = <&i2c1>;
+               tuner_i2c_addr = <0x60>;
+               /* tuner_xtal = <0>; */
+               /* tuner_xtal_cap = <0>; */
+       };
+
        atv-demod {
                compatible = "amlogic, atv-demod";
                status = "okay";
-               tuner = "si2151_tuner";
-               tuner_i2c_ada_id = <&i2c1>;
-               tuner_i2c_addr = <0x60>;
+               tuner = <&tuner>;
                btsc_sap_mode = <1>;
                /* pinctrl-names = "atvdemod_agc_pins"; */
                /* pinctrl-0 = <&atvdemod_agc_pins>; */
                dev_name = "dvb";
                status = "okay";
                fe0_mode = "internal";
-               fe0_tuner = "si2151_tuner";
-               fe0_i2c_adap_id = <&i2c1>;
-               fe0_tuner_i2c_addr = <0x60>;
+               fe0_tuner = <&tuner>;
 
                /*"parallel","serial","disable"*/
                ts2 = "parallel";
index cc6b77a8a073bddecee927ab90090733f61d4b79..f8a3f6277d698088e1d91f126dbf087e1ae95ec7 100644 (file)
                cm_en = <1>;/*1:enabel ;0:disable*/
        };
 
+       tuner: tuner {
+               status = "okay";
+               tuner_name = "r842_tuner";
+               tuner_i2c_adap = <&i2c1>;
+               tuner_i2c_addr = <0xf6>;
+               tuner_xtal = <0>;
+                                       /* NO_SHARE_XTAL(0)
+                                        * MASTER_TO_SLAVE_XTAL_IN(1)
+                                        * MASTER_TO_SLAVE_XTAL_OUT(2)
+                                        * SLAVE_XTAL_OUT(3)
+                                        */
+               tuner_xtal_cap = <38>; /* 0 ~ 41 (pf) */
+       };
+
        atv-demod {
                compatible = "amlogic, atv-demod";
                status = "okay";
-               tuner = "r842_tuner";
-               tuner_i2c_ada_id = <&i2c1>;
-               tuner_i2c_addr = <0xf6>;
+               tuner = <&tuner>;
                btsc_sap_mode = <1>;
                pinctrl-names = "atvdemod_agc_pins";
                pinctrl-0 = <&atvdemod_agc_pins>;
                dev_name = "dvb";
                status = "okay";
                fe0_mode = "internal";
-               fe0_tuner = "r842_tuner";
-               fe0_i2c_adap_id = <&i2c1>;
-               fe0_tuner_i2c_addr = <0xf6>;
+               fe0_tuner = <&tuner>;
 
                /*"parallel","serial","disable"*/
                ts2 = "parallel";
index 669df5dbb10ca8edd8f5d84d1fe278f53d155bf1..9365027c5902d785ed2447d5ba81583f19973ca8 100644 (file)
                interrupt-names = "mailbox_2";
        };
 
+       tuner: tuner {
+               status = "okay";
+               tuner_name = "si2151_tuner";
+               tuner_i2c_adap = <&i2c1>;
+               tuner_i2c_addr = <0x60>;
+               /* tuner_xtal = <0>; */
+               /* tuner_xtal_cap = <0>; */
+       };
+
        atv-demod {
                compatible = "amlogic, atv-demod";
                status = "okay";
-               tuner = "si2151_tuner";
-               tuner_i2c_ada_id = <&i2c1>;
-               tuner_i2c_addr = <0x60>;
+               tuner = <&tuner>;
                btsc_sap_mode = <1>;
                /* pinctrl-names="atvdemod_agc_pins"; */
                /* pinctrl-0=<&atvdemod_agc_pins>; */
                dev_name = "dvb";
                status = "okay";
                fe0_mode = "internal";
-               fe0_tuner = "si2151_tuner";
-               fe0_i2c_adap_id = <&i2c1>;
-               fe0_tuner_i2c_addr = <0x60>;
+               fe0_tuner = <&tuner>;
 
                /*"parallel","serial","disable"*/
                ts2 = "parallel";
index 4b1203e78e8fbbb71e112f3a2bcb0254cb2eca7c..feba0be3b401ed2cd4d365e8e868e1d227a790ea 100644 (file)
                interrupt-names = "mailbox_2";
        };
 
+       tuner: tuner {
+               status = "okay";
+               tuner_name = "si2151_tuner";
+               tuner_i2c_adap = <&i2c1>;
+               tuner_i2c_addr = <0x60>;
+               /* tuner_xtal = <0>; */
+               /* tuner_xtal_cap = <0>; */
+       };
+
        atv-demod {
                compatible = "amlogic, atv-demod";
                status = "okay";
-               tuner = "si2151_tuner";
-               tuner_i2c_ada_id = <&i2c1>;
-               tuner_i2c_addr = <0x60>;
+               tuner = <&tuner>;
                btsc_sap_mode = <1>;
                /* pinctrl-names="atvdemod_agc_pins"; */
                /* pinctrl-0=<&atvdemod_agc_pins>; */
                dev_name = "dvb";
                status = "okay";
                fe0_mode = "internal";
-               fe0_tuner = "si2151_tuner";
-               fe0_i2c_adap_id = <&i2c1>;
-               fe0_tuner_i2c_addr = <0x60>;
+               fe0_tuner = <&tuner>;
 
                /*"parallel","serial","disable"*/
                ts2 = "parallel";
index f029ec42d2b4dd2960c331cf8c28f75e85358e5b..690f140ec04baf74f5993726b1b05ee384b00bb1 100644 (file)
                interrupt-names = "mailbox_2";
        };
 
+       tuner: tuner {
+               status = "okay";
+               tuner_name = "mxl661_tuner";
+               tuner_i2c_adap = <&i2c1>;
+               tuner_i2c_addr = <0x60>;
+               /* tuner_xtal = <0>; */
+               /* tuner_xtal_cap = <0>; */
+       };
+
        atv-demod {
                compatible = "amlogic, atv-demod";
                status = "okay";
-               tuner = "mxl661_tuner";
-               tuner_i2c_ada_id = <&i2c1>;
-               tuner_i2c_addr = <0x60>;
+               tuner = <&tuner>;
                btsc_sap_mode = <1>;
                /* pinctrl-names="atvdemod_agc_pins"; */
                /* pinctrl-0=<&atvdemod_agc_pins>; */
                dev_name = "dvb";
                status = "okay";
                fe0_mode = "internal";
-               fe0_tuner = "mxl661_tuner";
-               fe0_i2c_adap_id = <&i2c1>;
-               fe0_tuner_i2c_addr = <0x60>;
+               fe0_tuner = <&tuner>;
                /*"parallel","serial","disable"*/
                ts2 = "parallel";
                ts2_control = <0>;
index 00378df6a9117a7c3da3dab69a711dc3b6519f37..cd69f4808c0fe04eed6f56a1f050ef12a3b0d4da 100644 (file)
                interrupt-names = "mailbox_2";
        };
 
+       tuner: tuner {
+               status = "okay";
+               tuner_name = "mxl661_tuner";
+               tuner_i2c_adap = <&i2c1>;
+               tuner_i2c_addr = <0x60>;
+               /* tuner_xtal = <0>; */
+               /* tuner_xtal_cap = <0>; */
+       };
+
        atv-demod {
                compatible = "amlogic, atv-demod";
                status = "okay";
-               tuner = "mxl661_tuner";
-               tuner_i2c_ada_id = <&i2c1>;
-               tuner_i2c_addr = <0x60>;
+               tuner = <&tuner>;
                btsc_sap_mode = <1>;
                /* pinctrl-names="atvdemod_agc_pins"; */
                /* pinctrl-0=<&atvdemod_agc_pins>; */
                dev_name = "dvb";
                status = "okay";
                fe0_mode = "internal";
-               fe0_tuner = "mxl661_tuner";
-               fe0_i2c_adap_id = <&i2c1>;
-               fe0_tuner_i2c_addr = <0x60>;
+               fe0_tuner = <&tuner>;
                /*"parallel","serial","disable"*/
                ts2 = "parallel";
                ts2_control = <0>;
        pinctrl-0 = <&spi_a_pins>;
        cs-gpios = <&gpio GPIOZ_3 0>;
 };
+
index 6ba8530ced153213fbda5c94d71d07797126499d..08ad64ef4c961754fe0dd1fd599f8cc9571c06d2 100644 (file)
                interrupt-names = "mailbox_2";
        };
 
+       tuner: tuner {
+               status = "okay";
+               tuner_name = "mxl661_tuner";
+               tuner_i2c_adap = <&i2c1>;
+               tuner_i2c_addr = <0x60>;
+               /* tuner_xtal = <0>; */
+               /* tuner_xtal_cap = <0>; */
+       };
+
        atv-demod {
                compatible = "amlogic, atv-demod";
                status = "okay";
-               tuner = "mxl661_tuner";
-               tuner_i2c_ada_id = <&i2c1>;
-               tuner_i2c_addr = <0x60>;
+               tuner = <&tuner>;
                btsc_sap_mode = <1>;
                /* pinctrl-names="atvdemod_agc_pins"; */
                /* pinctrl-0=<&atvdemod_agc_pins>; */
                dev_name = "dvb";
                status = "okay";
                fe0_mode = "internal";
-               fe0_tuner = "mxl661_tuner";
-               fe0_i2c_adap_id = <&i2c1>;
-               fe0_tuner_i2c_addr = <0x60>;
+               fe0_tuner = <&tuner>;
                /*"parallel","serial","disable"*/
                ts2 = "parallel";
                ts2_control = <0>;
index 55d42a94490558a0e4e1456fcf158cb90de58b70..0bc009f60a2ebbc607acce71eff06aca7ebe721d 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/platform_device.h>
 #include <linux/amlogic/cpu_version.h>
 #include <linux/amlogic/media/frame_provider/tvin/tvin.h>
+#include <linux/amlogic/aml_atvdemod.h>
 #include <media/v4l2-common.h>
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>
@@ -39,7 +40,7 @@
 #include "atvauddemod_func.h"
 
 
-#define AMLATVDEMOD_VER "V2.02"
+#define AMLATVDEMOD_VER "V2.03"
 
 struct aml_atvdemod_device *amlatvdemod_devp;
 
@@ -365,53 +366,60 @@ struct class aml_atvdemod_class = {
 static void aml_atvdemod_dt_parse(struct aml_atvdemod_device *pdev)
 {
        struct device_node *node = NULL;
+       struct device_node *node_tuner = NULL;
        struct device_node *node_i2c = NULL;
        unsigned int val = 0;
        const char *str = NULL;
        int ret = 0;
 
        node = pdev->dev->of_node;
-       if (node) {
-               ret = of_property_read_u32(node, "reg_23cf", &val);
-               if (ret)
-                       pr_err("can't find reg_23cf.\n");
-               else
-                       pdev->reg_23cf = val;
+       if (node == NULL) {
+               pr_err("atv demod node == NULL.\n");
+               return;
+       }
 
-               ret = of_property_read_u32(node, "audio_gain_val", &val);
-               if (ret)
-                       pr_err("can't find audio_gain_val.\n");
-               else
-                       set_audio_gain_val(val);
+       ret = of_property_read_u32(node, "reg_23cf", &val);
+       if (ret)
+               pr_err("can't find reg_23cf.\n");
+       else
+               pdev->reg_23cf = val;
 
-               ret = of_property_read_u32(node, "video_gain_val", &val);
-               if (ret)
-                       pr_err("can't find video_gain_val.\n");
-               else
-                       set_video_gain_val(val);
-
-               /* agc pin mux */
-               ret = of_property_read_string(node, "pinctrl-names",
-                               &pdev->pin_name);
-               if (ret) {
-                       pdev->agc_pin = NULL;
-                       pr_err("can't find agc pinmux.\n");
-               } else {
+       ret = of_property_read_u32(node, "audio_gain_val", &val);
+       if (ret)
+               pr_err("can't find audio_gain_val.\n");
+       else
+               set_audio_gain_val(val);
+
+       ret = of_property_read_u32(node, "video_gain_val", &val);
+       if (ret)
+               pr_err("can't find video_gain_val.\n");
+       else
+               set_video_gain_val(val);
+
+       /* agc pin mux */
+       ret = of_property_read_string(node, "pinctrl-names", &pdev->pin_name);
+       if (ret) {
+               pdev->agc_pin = NULL;
+               pr_err("can't find agc pinmux.\n");
+       } else {
 #if 0 /* Get it when you actually use it */
-                       pdev->agc_pin = devm_pinctrl_get_select(
-                               pdev->dev, pdev->pin_name);
+               pdev->agc_pin = devm_pinctrl_get_select(
+                       pdev->dev, pdev->pin_name);
 #endif
-                       pr_err("atvdemod agc pinmux name: %s\n",
-                                       pdev->pin_name);
-               }
+               pr_err("atvdemod agc pinmux name: %s\n",
+                               pdev->pin_name);
+       }
 
-               ret = of_property_read_u32(node, "btsc_sap_mode", &val);
-               if (ret)
-                       pr_err("can't find btsc_sap_mode.\n");
-               else
-                       pdev->btsc_sap_mode = val;
+       ret = of_property_read_u32(node, "btsc_sap_mode", &val);
+       if (ret)
+               pr_err("can't find btsc_sap_mode.\n");
+       else
+               pdev->btsc_sap_mode = val;
 
-               ret = of_property_read_string(node, "tuner", &str);
+       /* get tuner config node */
+       node_tuner = of_parse_phandle(node, "tuner", 0);
+       if (node_tuner) {
+               ret = of_property_read_string(node_tuner, "tuner_name", &str);
                if (ret)
                        pr_err("can't find tuner.\n");
                else {
@@ -426,11 +434,10 @@ static void aml_atvdemod_dt_parse(struct aml_atvdemod_device *pdev)
                        else if (!strncmp(str, "r842_tuner", 10))
                                pdev->tuner_id = AM_TUNER_R842;
                        else
-                               pr_err("can't find tuner: %s.\n", str);
+                               pr_err("nonsupport tuner: %s.\n", str);
                }
 
-               /* Get i2c adapter by i2c node */
-               node_i2c = of_parse_phandle(node, "tuner_i2c_ada_id", 0);
+               node_i2c = of_parse_phandle(node_tuner, "tuner_i2c_adap", 0);
                if (node_i2c) {
                        pdev->i2c_adp = of_find_i2c_adapter_by_node(node_i2c);
                        of_node_put(node_i2c);
@@ -438,18 +445,26 @@ static void aml_atvdemod_dt_parse(struct aml_atvdemod_device *pdev)
                        if (!pdev->i2c_adp)
                                pr_err("can't find tuner_i2c_adap.\n");
                }
-#if 0 /* Get adapter by ID */
-               ret = of_property_read_u32(node, "tuner_i2c_ada_id", &val);
-               if (ret)
-                       pr_err("can't find tuner_i2c_ada_id.\n");
-               else
-                       pdev->i2c_adapter_id = val;
-#endif
-               ret = of_property_read_u32(node, "tuner_i2c_addr", &val);
+
+               ret = of_property_read_u32(node_tuner, "tuner_i2c_addr", &val);
                if (ret)
                        pr_err("can't find tuner_i2c_addr.\n");
                else
                        pdev->i2c_addr = val;
+
+               ret = of_property_read_u32(node_tuner, "tuner_xtal", &val);
+               if (ret)
+                       pr_err("can't find tuner_xtal.\n");
+               else
+                       pdev->tuner_xtal = val;
+
+               ret = of_property_read_u32(node_tuner, "tuner_xtal_cap", &val);
+               if (ret)
+                       pr_err("can't find tuner_xtal_cap.\n");
+               else
+                       pdev->tuner_xtal = val;
+
+               of_node_put(node_tuner);
        }
 }
 
@@ -458,6 +473,7 @@ int aml_attach_demod_tuner(struct aml_atvdemod_device *dev)
        void *p = NULL;
        struct v4l2_frontend *v4l2_fe = &dev->v4l2_fe;
        struct dvb_frontend *fe = &v4l2_fe->fe;
+       struct tuner_config cfg = { 0 };
 
        if (!dev->analog_attached) {
                p = v4l2_attach(aml_atvdemod_attach, fe, v4l2_fe,
@@ -472,27 +488,32 @@ int aml_attach_demod_tuner(struct aml_atvdemod_device *dev)
 
        p = NULL;
 
+       cfg.id = dev->tuner_id;
+       cfg.i2c_addr = dev->i2c_addr;
+       cfg.xtal = dev->tuner_xtal;
+       cfg.xtal_cap = dev->tuner_xtal_cap;
+
        if (!dev->tuner_attached) {
                switch (dev->tuner_id) {
                case AM_TUNER_R840:
                        p = v4l2_attach(r840_attach, fe,
-                                       dev->i2c_adp, dev->i2c_addr);
+                                       dev->i2c_adp, &cfg);
                        break;
                case AM_TUNER_R842:
                        p = v4l2_attach(r842_attach, fe,
-                                       dev->i2c_adp, dev->i2c_addr);
+                                       dev->i2c_adp, &cfg);
                        break;
                case AM_TUNER_SI2151:
                        p = v4l2_attach(si2151_attach, fe,
-                                       dev->i2c_adp, dev->i2c_addr);
+                                       dev->i2c_adp, &cfg);
                        break;
                case AM_TUNER_SI2159:
                        p = v4l2_attach(si2159_attach, fe,
-                                       dev->i2c_adp, dev->i2c_addr);
+                                       dev->i2c_adp, &cfg);
                        break;
                case AM_TUNER_MXL661:
                        p = v4l2_attach(mxl661_attach, fe,
-                                       dev->i2c_adp, dev->i2c_addr);
+                                       dev->i2c_adp, &cfg);
                        break;
                }
 
index fca858ef45d754375c046d73dea4652c7a292c3b..19c5b2555af00130ed54150da318915e1bb10cf1 100644 (file)
@@ -40,6 +40,8 @@ struct aml_atvdemod_device {
        struct device *dev;
 
        unsigned int tuner_id;
+       unsigned int tuner_xtal;
+       unsigned int tuner_xtal_cap;
        unsigned int i2c_addr;
        unsigned int i2c_adapter_id;
        struct i2c_adapter *i2c_adp;
index 38f0b4b8d4fba06d9f3a3bcdf4e982d17990b599..8ba76e746d939a5fb715a2dd3b0e1dae76c9ca66 100644 (file)
@@ -123,7 +123,7 @@ static inline const char *v4l2_std_to_str(v4l2_std_id std)
 extern void aml_fe_get_atvaudio_state(int *state);
 
 /* For attach tuner driver start*/
-enum aml_tuner_type_t {
+enum tuner_type {
        AM_TUNER_SI2176 = 1,
        AM_TUNER_SI2196 = 2,
        AM_TUNER_FQ1216 = 3,
@@ -139,16 +139,25 @@ enum aml_tuner_type_t {
        AM_TUNER_R842 = 13,
 };
 
+/* For configure different tuners */
+/* It can add fields as extensions */
+struct tuner_config {
+       u8 id;
+       u8 i2c_addr;
+       u8 xtal;
+       u8 xtal_cap;
+};
+
 extern struct dvb_frontend *mxl661_attach(struct dvb_frontend *fe,
-               struct i2c_adapter *i2c_adap, u8 i2c_addr);
+               struct i2c_adapter *i2c_adap, struct tuner_config *cfg);
 extern struct dvb_frontend *si2151_attach(struct dvb_frontend *fe,
-               struct i2c_adapter *i2c_adap, u8 i2c_addr);
+               struct i2c_adapter *i2c_adap, struct tuner_config *cfg);
 extern struct dvb_frontend *si2159_attach(struct dvb_frontend *fe,
-               struct i2c_adapter *i2c_adap, u8 i2c_addr);
+               struct i2c_adapter *i2c_adap, struct tuner_config *cfg);
 extern struct dvb_frontend *r840_attach(struct dvb_frontend *fe,
-               struct i2c_adapter *i2c_adap, u8 i2c_addr);
+               struct i2c_adapter *i2c_adap, struct tuner_config *cfg);
 extern struct dvb_frontend *r842_attach(struct dvb_frontend *fe,
-               struct i2c_adapter *i2c_adap, u8 i2c_addr);
+               struct i2c_adapter *i2c_adap, struct tuner_config *cfg);
 /* For attach tuner driver end*/
 
 #endif /* __AML_ATVDEMOD_H__ */