summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/lpass-rx-macro.c
diff options
context:
space:
mode:
authorSrinivasa Rao Mandadapu <quic_srivasam@quicinc.com>2022-02-26 23:39:18 +0530
committerMark Brown <broonie@kernel.org>2022-02-28 13:30:37 +0000
commit9e3d83c52844f955aa2975f78cee48bf9f72f5e1 (patch)
treef63b833a6f6b608d9b27dcd0507473ae305179c1 /sound/soc/codecs/lpass-rx-macro.c
parent0f907c3880f82cf9e8884c98aa70dd9e61221dfc (diff)
ASoC: codecs: Add power domains support in digital macro codecs
Add support for enabling required power domains in digital macro codecs. macro and dcodec power domains are being requested as clocks by HLOS in ADSP based architectures and ADSP internally handling as powerdomains. In ADSP bypass case need to handle them as power domains explicitly. Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/1645898959-11231-2-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/lpass-rx-macro.c')
-rw-r--r--sound/soc/codecs/lpass-rx-macro.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c
index 58dc86756804..fc1d2255156b 100644
--- a/sound/soc/codecs/lpass-rx-macro.c
+++ b/sound/soc/codecs/lpass-rx-macro.c
@@ -15,6 +15,8 @@
#include <linux/of_clk.h>
#include <linux/clk-provider.h>
+#include "lpass-macro-common.h"
+
#define CDC_RX_TOP_TOP_CFG0 (0x0000)
#define CDC_RX_TOP_SWR_CTRL (0x0008)
#define CDC_RX_TOP_DEBUG (0x000C)
@@ -607,7 +609,7 @@ struct rx_macro {
int is_softclip_on;
int is_aux_hpf_on;
int softclip_clk_users;
-
+ struct lpass_macro *pds;
struct regmap *regmap;
struct clk *mclk;
struct clk *npl;
@@ -3555,6 +3557,10 @@ static int rx_macro_probe(struct platform_device *pdev)
if (IS_ERR(rx->fsgen))
return PTR_ERR(rx->fsgen);
+ rx->pds = lpass_macro_pds_init(dev);
+ if (IS_ERR(rx->pds))
+ return PTR_ERR(rx->pds);
+
base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
@@ -3635,6 +3641,8 @@ static int rx_macro_remove(struct platform_device *pdev)
clk_disable_unprepare(rx->macro);
clk_disable_unprepare(rx->dcodec);
+ lpass_macro_pds_exit(rx->pds);
+
return 0;
}