diff options
author | Sudheer Papothi <spapothi@codeaurora.org> | 2016-05-19 20:29:13 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-08-04 11:05:31 -0700 |
commit | c5ee57ee2b2f368bd68e2caaf6718125a31927ae (patch) | |
tree | 434d6cdb01a98161c960691817f860a4189c84a4 /drivers/mfd | |
parent | 4966222ae1dd171c035b695e93db331f86d9a8a0 (diff) |
drivers: mfd: wcd9xxx: Add support to configure dmic clock
DMIC clock on ECPP(Echo Cancellation Ping-Pong) path can be set to
lower clock rate to avoid power consumption. Change configures the
DMIC clock rate on ECPP path based on device tree settings.
CRs-fixed: 1022917
Change-Id: I03e1a7f5ef3cf1b1907c03a3d38965ce3a611bc4
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/wcd9xxx-utils.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/mfd/wcd9xxx-utils.c b/drivers/mfd/wcd9xxx-utils.c index 22d61d96a11d..38286831a02c 100644 --- a/drivers/mfd/wcd9xxx-utils.c +++ b/drivers/mfd/wcd9xxx-utils.c @@ -298,6 +298,7 @@ struct wcd9xxx_pdata *wcd9xxx_populate_dt_data(struct device *dev) struct wcd9xxx_pdata *pdata; u32 dmic_sample_rate = WCD9XXX_DMIC_SAMPLE_RATE_UNDEFINED; u32 mad_dmic_sample_rate = WCD9XXX_DMIC_SAMPLE_RATE_UNDEFINED; + u32 ecpp_dmic_sample_rate = WCD9XXX_DMIC_SAMPLE_RATE_UNDEFINED; u32 dmic_clk_drive = WCD9XXX_DMIC_CLK_DRIVE_UNDEFINED; u32 prop_val; @@ -358,6 +359,15 @@ struct wcd9xxx_pdata *wcd9xxx_populate_dt_data(struct device *dev) pdata->mclk_rate, "mad_dmic_rate"); + if (!(wcd9xxx_read_of_property_u32(dev, "qcom,cdc-ecpp-dmic-rate", + &prop_val))) + ecpp_dmic_sample_rate = prop_val; + + pdata->ecpp_dmic_sample_rate = wcd9xxx_validate_dmic_sample_rate(dev, + ecpp_dmic_sample_rate, + pdata->mclk_rate, + "ecpp_dmic_rate"); + if (!(of_property_read_u32(dev->of_node, "qcom,cdc-dmic-clk-drv-strength", &prop_val))) |