diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2022-11-03 15:53:40 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-11-10 21:36:24 +0000 |
commit | 9f63869a5682d5fa9bc5563577fe3270e7cbf4f2 (patch) | |
tree | dc9147e8a67f00e292e30506cabef286718f2479 /sound/soc/codecs/lpass-wsa-macro.c | |
parent | ASoC: dt-bindings: qcom,lpass: do not hard-code clock-output-names (diff) | |
download | wireguard-linux-9f63869a5682d5fa9bc5563577fe3270e7cbf4f2.tar.xz wireguard-linux-9f63869a5682d5fa9bc5563577fe3270e7cbf4f2.zip |
ASoC: codecs: lpass-wsa-macro: parse clock-output-names
If we have several instances of WSA macro, each one of them should
register clock with unique name, so parse clock-output-names for this.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221103195341.174972-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/lpass-wsa-macro.c')
-rw-r--r-- | sound/soc/codecs/lpass-wsa-macro.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c index 5e0abefe7cce..5cfe96f6e430 100644 --- a/sound/soc/codecs/lpass-wsa-macro.c +++ b/sound/soc/codecs/lpass-wsa-macro.c @@ -4,6 +4,7 @@ #include <linux/module.h> #include <linux/init.h> #include <linux/io.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/clk.h> #include <linux/of_clk.h> @@ -2350,14 +2351,15 @@ static int wsa_macro_register_mclk_output(struct wsa_macro *wsa) { struct device *dev = wsa->dev; const char *parent_clk_name; - const char *clk_name = "mclk"; struct clk_hw *hw; struct clk_init_data init; int ret; parent_clk_name = __clk_get_name(wsa->npl); - init.name = clk_name; + init.name = "mclk"; + of_property_read_string(dev_of_node(dev), "clock-output-names", + &init.name); init.ops = &swclk_gate_ops; init.flags = 0; init.parent_names = &parent_clk_name; |