ASoC: wcd9xxx: Add gpio control for micbias-supply for SXR1120

SXR1120 has additional gpio for micbias supply to be
enabled. Add control for this gpio and enable it.

Change-Id: Ica4ea9765db9bd48a1f8eb010d82d2687c8abbb9
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
This commit is contained in:
Vatsal Bucha
2018-09-27 16:20:30 +05:30
parent 58ff6ed45b
commit 8148b998ed
3 changed files with 19 additions and 1 deletions

View File

@@ -365,6 +365,19 @@ struct wcd9xxx_pdata *wcd9xxx_populate_dt_data(struct device *dev)
}
}
pdata->has_micb_supply_en_gpio = of_property_read_bool(dev->of_node,
"qcom,has-micbias-supply-en-gpio");
if (pdata->has_micb_supply_en_gpio) {
pdata->micb_en_ctl = of_parse_phandle(dev->of_node,
"qcom,micbias-supply-en-gpio-node", 0);
if (!pdata->micb_en_ctl) {
dev_err(dev, "%s No entry for %s property in node %s\n",
__func__, "qcom,micbias-supply-en-gpio-node",
dev->of_node->full_name);
goto err_parse_dt_prop;
}
}
if (!(wcd9xxx_read_of_property_u32(dev, "qcom,cdc-mclk-clk-rate",
&prop_val)))
pdata->mclk_rate = prop_val;