]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
ASoC: Codec: parse jd source and dmic data pin
authorSameer Pujar <spujar@nvidia.com>
Sat, 9 Jan 2016 07:48:58 +0000 (13:18 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Tue, 12 Jan 2016 16:55:16 +0000 (08:55 -0800)
The codec allows dmic capture to happen from different
gpio pins. As per the board design dmic capture should
happen from RT5659_DMIC1_DATA_GPIO5 and jack detection
can happen from RT5659_JD3 source.

Bug 200148270

Change-Id: I866d62d454b20a5596922f2941792ccecb517cae
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: http://git-master/r/930774
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
sound/soc/codecs/rt5659.c

index 3e6c33db25d8dfded50b6195c693a31746736030..a52b0f50c8af40fc747210ed4673509ae632defa 100644 (file)
@@ -3882,10 +3882,12 @@ static int rt5659_parse_dt(struct rt5659_priv *rt5659, struct device_node *np)
        rt5659->pdata.in4_diff = of_property_read_bool(np,
                                        "realtek,in4-differential");
 
-       of_property_read_u32(np, "realtek,dmic1_data_pin",
+       of_property_read_u32(np, "realtek,dmic1-data-pin",
                &rt5659->pdata.dmic1_data_pin);
-       of_property_read_u32(np, "realtek,dmic2_data_pin",
+       of_property_read_u32(np, "realtek,dmic2-data-pin",
                &rt5659->pdata.dmic2_data_pin);
+       of_property_read_u32(np, "realtek,jd-src",
+               &rt5659->pdata.jd_src);
 
        return 0;
 }
@@ -4132,9 +4134,6 @@ static int rt5659_i2c_probe(struct i2c_client *i2c,
                return -ENODEV;
        }
 
-       /* FIXME - pass this info from device tree */
-       rt5659->pdata.dmic1_data_pin = RT5659_DMIC1_DATA_GPIO5;
-
        regmap_write(rt5659->regmap, RT5659_RESET, 0);
 
        rt5659_calibrate(rt5659);
@@ -4254,9 +4253,6 @@ static int rt5659_i2c_probe(struct i2c_client *i2c,
                        RT5659_DMIC_1_DP_IN2N | RT5659_DMIC_2_DP_IN2P);
        }
 
-       /*FIXME pass this info from device tree*/
-       rt5659->pdata.jd_src = RT5659_JD3;
-
        switch (rt5659->pdata.jd_src) {
        case RT5659_JD3:
                regmap_write(rt5659->regmap, RT5659_EJD_CTRL_1, 0xa880);