Loading Documentation/devicetree/bindings/sound/rt5677.txt +9 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,14 @@ Optional properties: - realtek,pow-ldo2-gpio : The GPIO that controls the CODEC's POW_LDO2 pin. - realtek,in1-differential - realtek,in2-differential - realtek,lout1-differential - realtek,lout2-differential - realtek,lout3-differential Boolean. Indicate MIC1/2 input and LOUT1/2/3 outputs are differential, rather than single-ended. Pins on the device (for linking into audio routes): * IN1P Loading Loading @@ -47,4 +55,5 @@ rt5677 { realtek,pow-ldo2-gpio = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>; realtek,in1-differential = "true"; }; include/sound/rt5677.h +4 −1 Original line number Diff line number Diff line Loading @@ -19,9 +19,12 @@ enum rt5677_dmic2_clk { struct rt5677_platform_data { /* IN1 IN2 can optionally be differential */ /* IN1/IN2/LOUT1/LOUT2/LOUT3 can optionally be differential */ bool in1_diff; bool in2_diff; bool lout1_diff; bool lout2_diff; bool lout3_diff; /* DMIC2 clock source selection */ enum rt5677_dmic2_clk dmic2_clk_pin; }; Loading sound/soc/codecs/rt5677.c +23 −0 Original line number Diff line number Diff line Loading @@ -3569,6 +3569,17 @@ MODULE_DEVICE_TABLE(i2c, rt5677_i2c_id); static int rt5677_parse_dt(struct rt5677_priv *rt5677, struct device_node *np) { rt5677->pdata.in1_diff = of_property_read_bool(np, "realtek,in1-differential"); rt5677->pdata.in2_diff = of_property_read_bool(np, "realtek,in2-differential"); rt5677->pdata.lout1_diff = of_property_read_bool(np, "realtek,lout1-differential"); rt5677->pdata.lout2_diff = of_property_read_bool(np, "realtek,lout2-differential"); rt5677->pdata.lout3_diff = of_property_read_bool(np, "realtek,lout3-differential"); rt5677->pow_ldo2 = of_get_named_gpio(np, "realtek,pow-ldo2-gpio", 0); Loading Loading @@ -3660,6 +3671,18 @@ static int rt5677_i2c_probe(struct i2c_client *i2c, regmap_update_bits(rt5677->regmap, RT5677_IN1, RT5677_IN_DF2, RT5677_IN_DF2); if (rt5677->pdata.lout1_diff) regmap_update_bits(rt5677->regmap, RT5677_LOUT1, RT5677_LOUT1_L_DF, RT5677_LOUT1_L_DF); if (rt5677->pdata.lout2_diff) regmap_update_bits(rt5677->regmap, RT5677_LOUT1, RT5677_LOUT2_L_DF, RT5677_LOUT2_L_DF); if (rt5677->pdata.lout3_diff) regmap_update_bits(rt5677->regmap, RT5677_LOUT1, RT5677_LOUT3_L_DF, RT5677_LOUT3_L_DF); if (rt5677->pdata.dmic2_clk_pin == RT5677_DMIC_CLK2) { regmap_update_bits(rt5677->regmap, RT5677_GEN_CTRL2, RT5677_GPIO5_FUNC_MASK, Loading Loading
Documentation/devicetree/bindings/sound/rt5677.txt +9 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,14 @@ Optional properties: - realtek,pow-ldo2-gpio : The GPIO that controls the CODEC's POW_LDO2 pin. - realtek,in1-differential - realtek,in2-differential - realtek,lout1-differential - realtek,lout2-differential - realtek,lout3-differential Boolean. Indicate MIC1/2 input and LOUT1/2/3 outputs are differential, rather than single-ended. Pins on the device (for linking into audio routes): * IN1P Loading Loading @@ -47,4 +55,5 @@ rt5677 { realtek,pow-ldo2-gpio = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>; realtek,in1-differential = "true"; };
include/sound/rt5677.h +4 −1 Original line number Diff line number Diff line Loading @@ -19,9 +19,12 @@ enum rt5677_dmic2_clk { struct rt5677_platform_data { /* IN1 IN2 can optionally be differential */ /* IN1/IN2/LOUT1/LOUT2/LOUT3 can optionally be differential */ bool in1_diff; bool in2_diff; bool lout1_diff; bool lout2_diff; bool lout3_diff; /* DMIC2 clock source selection */ enum rt5677_dmic2_clk dmic2_clk_pin; }; Loading
sound/soc/codecs/rt5677.c +23 −0 Original line number Diff line number Diff line Loading @@ -3569,6 +3569,17 @@ MODULE_DEVICE_TABLE(i2c, rt5677_i2c_id); static int rt5677_parse_dt(struct rt5677_priv *rt5677, struct device_node *np) { rt5677->pdata.in1_diff = of_property_read_bool(np, "realtek,in1-differential"); rt5677->pdata.in2_diff = of_property_read_bool(np, "realtek,in2-differential"); rt5677->pdata.lout1_diff = of_property_read_bool(np, "realtek,lout1-differential"); rt5677->pdata.lout2_diff = of_property_read_bool(np, "realtek,lout2-differential"); rt5677->pdata.lout3_diff = of_property_read_bool(np, "realtek,lout3-differential"); rt5677->pow_ldo2 = of_get_named_gpio(np, "realtek,pow-ldo2-gpio", 0); Loading Loading @@ -3660,6 +3671,18 @@ static int rt5677_i2c_probe(struct i2c_client *i2c, regmap_update_bits(rt5677->regmap, RT5677_IN1, RT5677_IN_DF2, RT5677_IN_DF2); if (rt5677->pdata.lout1_diff) regmap_update_bits(rt5677->regmap, RT5677_LOUT1, RT5677_LOUT1_L_DF, RT5677_LOUT1_L_DF); if (rt5677->pdata.lout2_diff) regmap_update_bits(rt5677->regmap, RT5677_LOUT1, RT5677_LOUT2_L_DF, RT5677_LOUT2_L_DF); if (rt5677->pdata.lout3_diff) regmap_update_bits(rt5677->regmap, RT5677_LOUT1, RT5677_LOUT3_L_DF, RT5677_LOUT3_L_DF); if (rt5677->pdata.dmic2_clk_pin == RT5677_DMIC_CLK2) { regmap_update_bits(rt5677->regmap, RT5677_GEN_CTRL2, RT5677_GPIO5_FUNC_MASK, Loading