linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: dt-bindings: qcom,lpass: do not hard-code clock-output-names
@ 2022-11-03 19:53 Krzysztof Kozlowski
  2022-11-03 19:53 ` [PATCH 2/2] ASoC: codecs: lpass-wsa-macro: parse clock-output-names Krzysztof Kozlowski
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-03 19:53 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Srinivas Kandagatla,
	Banajit Goswami, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Jaroslav Kysela, Takashi Iwai,
	linux-arm-msm, alsa-devel, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

The purpose of clock-output-names is to customize desired clock name,
not use one, same name.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/sound/qcom,lpass-rx-macro.yaml         | 3 +--
 .../devicetree/bindings/sound/qcom,lpass-tx-macro.yaml         | 3 +--
 .../devicetree/bindings/sound/qcom,lpass-va-macro.yaml         | 3 +--
 .../devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml        | 3 +--
 4 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml
index 1de11e7f33bb..14016671f32b 100644
--- a/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml
@@ -43,8 +43,7 @@ properties:
           - const: fsgen
 
   clock-output-names:
-    items:
-      - const: mclk
+    maxItems: 1
 
   power-domains:
     maxItems: 2
diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml
index de8297b358e8..e647ba392a0f 100644
--- a/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml
@@ -43,8 +43,7 @@ properties:
           - const: fsgen
 
   clock-output-names:
-    items:
-      - const: mclk
+    maxItems: 1
 
   power-domains:
     maxItems: 2
diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
index 9f473c08cb2e..c36caf90b837 100644
--- a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
@@ -39,8 +39,7 @@ properties:
           - const: mclk
 
   clock-output-names:
-    items:
-      - const: fsgen
+    maxItems: 1
 
   power-domains:
     maxItems: 2
diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml
index 4959ad658eac..155c7344412a 100644
--- a/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml
@@ -38,8 +38,7 @@ properties:
       - const: fsgen
 
   clock-output-names:
-    items:
-      - const: mclk
+    maxItems: 1
 
   qcom,dmic-sample-rate:
     description: dmic sample rate
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] ASoC: codecs: lpass-wsa-macro: parse clock-output-names
  2022-11-03 19:53 [PATCH 1/2] ASoC: dt-bindings: qcom,lpass: do not hard-code clock-output-names Krzysztof Kozlowski
@ 2022-11-03 19:53 ` Krzysztof Kozlowski
  2022-11-03 19:53 ` [PATCH 2/2] ASoC: codecs: wsa-macro: " Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-03 19:53 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Srinivas Kandagatla,
	Banajit Goswami, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Jaroslav Kysela, Takashi Iwai,
	linux-arm-msm, alsa-devel, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

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>
---
 sound/soc/codecs/lpass-wsa-macro.c | 6 ++++--
 1 file 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;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] ASoC: codecs: wsa-macro: parse clock-output-names
  2022-11-03 19:53 [PATCH 1/2] ASoC: dt-bindings: qcom,lpass: do not hard-code clock-output-names Krzysztof Kozlowski
  2022-11-03 19:53 ` [PATCH 2/2] ASoC: codecs: lpass-wsa-macro: parse clock-output-names Krzysztof Kozlowski
@ 2022-11-03 19:53 ` Krzysztof Kozlowski
  2022-11-03 20:10   ` Krzysztof Kozlowski
  2022-11-07 20:08 ` [PATCH 1/2] ASoC: dt-bindings: qcom,lpass: do not hard-code clock-output-names Rob Herring
  2022-11-11 15:42 ` Mark Brown
  3 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-03 19:53 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Srinivas Kandagatla,
	Banajit Goswami, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Jaroslav Kysela, Takashi Iwai,
	linux-arm-msm, alsa-devel, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

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>
---
 sound/soc/codecs/lpass-wsa-macro.c | 6 ++++--
 1 file 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;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] ASoC: codecs: wsa-macro: parse clock-output-names
  2022-11-03 19:53 ` [PATCH 2/2] ASoC: codecs: wsa-macro: " Krzysztof Kozlowski
@ 2022-11-03 20:10   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-03 20:10 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Srinivas Kandagatla,
	Banajit Goswami, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Jaroslav Kysela, Takashi Iwai,
	linux-arm-msm, alsa-devel, devicetree, linux-kernel

On 03/11/2022 15:53, Krzysztof Kozlowski wrote:
> 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>
> ---

This one patch is a duplicate, please skip. Apologies for the mess.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] ASoC: dt-bindings: qcom,lpass: do not hard-code clock-output-names
  2022-11-03 19:53 [PATCH 1/2] ASoC: dt-bindings: qcom,lpass: do not hard-code clock-output-names Krzysztof Kozlowski
  2022-11-03 19:53 ` [PATCH 2/2] ASoC: codecs: lpass-wsa-macro: parse clock-output-names Krzysztof Kozlowski
  2022-11-03 19:53 ` [PATCH 2/2] ASoC: codecs: wsa-macro: " Krzysztof Kozlowski
@ 2022-11-07 20:08 ` Rob Herring
  2022-11-11 15:42 ` Mark Brown
  3 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2022-11-07 20:08 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Srinivas Kandagatla, Mark Brown, Krzysztof Kozlowski, alsa-devel,
	linux-arm-msm, linux-kernel, Takashi Iwai, Jaroslav Kysela,
	Konrad Dybcio, Bjorn Andersson, devicetree, Banajit Goswami,
	Rob Herring, Liam Girdwood, Andy Gross


On Thu, 03 Nov 2022 15:53:39 -0400, Krzysztof Kozlowski wrote:
> The purpose of clock-output-names is to customize desired clock name,
> not use one, same name.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../devicetree/bindings/sound/qcom,lpass-rx-macro.yaml         | 3 +--
>  .../devicetree/bindings/sound/qcom,lpass-tx-macro.yaml         | 3 +--
>  .../devicetree/bindings/sound/qcom,lpass-va-macro.yaml         | 3 +--
>  .../devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml        | 3 +--
>  4 files changed, 4 insertions(+), 8 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] ASoC: dt-bindings: qcom,lpass: do not hard-code clock-output-names
  2022-11-03 19:53 [PATCH 1/2] ASoC: dt-bindings: qcom,lpass: do not hard-code clock-output-names Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2022-11-07 20:08 ` [PATCH 1/2] ASoC: dt-bindings: qcom,lpass: do not hard-code clock-output-names Rob Herring
@ 2022-11-11 15:42 ` Mark Brown
  3 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2022-11-11 15:42 UTC (permalink / raw)
  To: Rob Herring, Jaroslav Kysela, Andy Gross, Srinivas Kandagatla,
	Liam Girdwood, devicetree, Krzysztof Kozlowski, alsa-devel,
	linux-arm-msm, Takashi Iwai, Krzysztof Kozlowski,
	Banajit Goswami, Konrad Dybcio, linux-kernel, Bjorn Andersson

On Thu, 3 Nov 2022 15:53:39 -0400, Krzysztof Kozlowski wrote:
> The purpose of clock-output-names is to customize desired clock name,
> not use one, same name.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: dt-bindings: qcom,lpass: do not hard-code clock-output-names
      commit: bcdc73e167b68cb494977cdb2b92f05ab6455fc2
[2/2] ASoC: codecs: lpass-wsa-macro: parse clock-output-names
      commit: 9f63869a5682d5fa9bc5563577fe3270e7cbf4f2

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-11-11 15:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-03 19:53 [PATCH 1/2] ASoC: dt-bindings: qcom,lpass: do not hard-code clock-output-names Krzysztof Kozlowski
2022-11-03 19:53 ` [PATCH 2/2] ASoC: codecs: lpass-wsa-macro: parse clock-output-names Krzysztof Kozlowski
2022-11-03 19:53 ` [PATCH 2/2] ASoC: codecs: wsa-macro: " Krzysztof Kozlowski
2022-11-03 20:10   ` Krzysztof Kozlowski
2022-11-07 20:08 ` [PATCH 1/2] ASoC: dt-bindings: qcom,lpass: do not hard-code clock-output-names Rob Herring
2022-11-11 15:42 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).