[PATCH 1/2] ASoC: dt-bindings: qcom, lpass: do not hard-code clock-output-names
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
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;
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;
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
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
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
participants (3)
-
Krzysztof Kozlowski
-
Mark Brown
-
Rob Herring