linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ASoC: dt-bindings: qcom,wsa881x: Allow sound-name-prefix
@ 2023-01-13 16:22 Krzysztof Kozlowski
  2023-01-13 16:22 ` [PATCH 2/3] ASoC: dt-bindings: qcom,wcd934x: Describe slim-ifc-dev Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-13 16:22 UTC (permalink / raw)
  To: Srinivas Kandagatla, Banajit Goswami, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Mark Brown,
	Rob Herring, Krzysztof Kozlowski, alsa-devel, linux-arm-msm,
	devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Reference common DAI properties to fix:

  sdm845-db845c.dtb: speaker@0,1: 'sound-name-prefix' does not match any of the regexes: 'pinctrl-[0-9]+'

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/sound/qcom,wsa881x.yaml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/qcom,wsa881x.yaml b/Documentation/devicetree/bindings/sound/qcom,wsa881x.yaml
index d702b489320f..ac03672ebf6d 100644
--- a/Documentation/devicetree/bindings/sound/qcom,wsa881x.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,wsa881x.yaml
@@ -15,6 +15,9 @@ description: |
   Their primary operating mode uses a SoundWire digital audio
   interface. This binding is for SoundWire interface.
 
+allOf:
+  - $ref: dai-common.yaml#
+
 properties:
   compatible:
     const: sdw10217201000
@@ -39,7 +42,7 @@ required:
   - "#thermal-sensor-cells"
   - "#sound-dai-cells"
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
-- 
2.34.1


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

* [PATCH 2/3] ASoC: dt-bindings: qcom,wcd934x: Describe slim-ifc-dev
  2023-01-13 16:22 [PATCH 1/3] ASoC: dt-bindings: qcom,wsa881x: Allow sound-name-prefix Krzysztof Kozlowski
@ 2023-01-13 16:22 ` Krzysztof Kozlowski
  2023-01-17 19:27   ` Rob Herring
  2023-01-13 16:22 ` [PATCH 3/3] ASoC: dt-bindings: qcom,wcd934x: Allow usage as IFD device Krzysztof Kozlowski
  2023-01-17 19:22 ` [PATCH 1/3] ASoC: dt-bindings: qcom,wsa881x: Allow sound-name-prefix Rob Herring
  2 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-13 16:22 UTC (permalink / raw)
  To: Srinivas Kandagatla, Banajit Goswami, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Mark Brown,
	Rob Herring, Krzysztof Kozlowski, alsa-devel, linux-arm-msm,
	devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

The "slim-ifc-dev" property should not be just "true", because it allows
any type.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml b/Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml
index 184e8ccbdd13..39b27126cfc1 100644
--- a/Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml
@@ -28,7 +28,9 @@ properties:
     description: GPIO spec for reset line to use
     maxItems: 1
 
-  slim-ifc-dev: true
+  slim-ifc-dev:
+    description: IFC device interface
+    $ref: /schemas/types.yaml#/definitions/phandle
 
   clocks:
     maxItems: 1
-- 
2.34.1


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

* [PATCH 3/3] ASoC: dt-bindings: qcom,wcd934x: Allow usage as IFD device
  2023-01-13 16:22 [PATCH 1/3] ASoC: dt-bindings: qcom,wsa881x: Allow sound-name-prefix Krzysztof Kozlowski
  2023-01-13 16:22 ` [PATCH 2/3] ASoC: dt-bindings: qcom,wcd934x: Describe slim-ifc-dev Krzysztof Kozlowski
@ 2023-01-13 16:22 ` Krzysztof Kozlowski
  2023-01-17 19:33   ` Rob Herring
  2023-01-17 19:22 ` [PATCH 1/3] ASoC: dt-bindings: qcom,wsa881x: Allow sound-name-prefix Rob Herring
  2 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-13 16:22 UTC (permalink / raw)
  To: Srinivas Kandagatla, Banajit Goswami, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Mark Brown,
	Rob Herring, Krzysztof Kozlowski, alsa-devel, linux-arm-msm,
	devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

The WCD9340 audio codec appears on Slimbus twice: as IFD device without
properties and the actual audio-codec referencing the former via
wcd9340_ifd.  Allow in the binding both versions to fix several warnings
like:

  sdm850-samsung-w737.dtb: ifd@0,0: 'reset-gpios' is a required property
  sdm850-samsung-w737.dtb: ifd@0,0: 'slim-ifc-dev' is a required property
  sdm850-samsung-w737.dtb: ifd@0,0: 'interrupt-controller' is a required property

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

oneOf: interrupts-extended|interrupts is needed to avoid dtschema
limitation.
---
 .../bindings/sound/qcom,wcd934x.yaml          | 58 ++++++++++++++-----
 1 file changed, 43 insertions(+), 15 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml b/Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml
index 39b27126cfc1..ea09590bfa30 100644
--- a/Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml
@@ -149,21 +149,49 @@ patternProperties:
 required:
   - compatible
   - reg
-  - reset-gpios
-  - slim-ifc-dev
-  - interrupts
-  - interrupt-controller
-  - clock-frequency
-  - clock-output-names
-  - qcom,micbias1-microvolt
-  - qcom,micbias2-microvolt
-  - qcom,micbias3-microvolt
-  - qcom,micbias4-microvolt
-  - "#interrupt-cells"
-  - "#clock-cells"
-  - "#sound-dai-cells"
-  - "#address-cells"
-  - "#size-cells"
+
+allOf:
+  - if:
+      required:
+        - slim-ifc-dev
+    then:
+      required:
+        - reset-gpios
+        - slim-ifc-dev
+        - interrupt-controller
+        - clock-frequency
+        - clock-output-names
+        - qcom,micbias1-microvolt
+        - qcom,micbias2-microvolt
+        - qcom,micbias3-microvolt
+        - qcom,micbias4-microvolt
+        - "#interrupt-cells"
+        - "#clock-cells"
+        - "#sound-dai-cells"
+        - "#address-cells"
+        - "#size-cells"
+      oneOf:
+        - required:
+            - interrupts-extended
+        - required:
+            - interrupts
+    else:
+      properties:
+        reset-gpios: false
+        slim-ifc-dev: false
+        interrupts: false
+        interrupt-controller: false
+        clock-frequency: false
+        clock-output-names: false
+        qcom,micbias1-microvolt: false
+        qcom,micbias2-microvolt: false
+        qcom,micbias3-microvolt: false
+        qcom,micbias4-microvolt: false
+        "#interrupt-cells": false
+        "#clock-cells": false
+        "#sound-dai-cells": false
+        "#address-cells": false
+        "#size-cells": false
 
 additionalProperties: false
 
-- 
2.34.1


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

* Re: [PATCH 1/3] ASoC: dt-bindings: qcom,wsa881x: Allow sound-name-prefix
  2023-01-13 16:22 [PATCH 1/3] ASoC: dt-bindings: qcom,wsa881x: Allow sound-name-prefix Krzysztof Kozlowski
  2023-01-13 16:22 ` [PATCH 2/3] ASoC: dt-bindings: qcom,wcd934x: Describe slim-ifc-dev Krzysztof Kozlowski
  2023-01-13 16:22 ` [PATCH 3/3] ASoC: dt-bindings: qcom,wcd934x: Allow usage as IFD device Krzysztof Kozlowski
@ 2023-01-17 19:22 ` Rob Herring
  2 siblings, 0 replies; 9+ messages in thread
From: Rob Herring @ 2023-01-17 19:22 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Srinivas Kandagatla, Liam Girdwood, Rob Herring, alsa-devel,
	linux-arm-msm, Mark Brown, devicetree, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Krzysztof Kozlowski,
	linux-kernel, Banajit Goswami


On Fri, 13 Jan 2023 17:22:12 +0100, Krzysztof Kozlowski wrote:
> Reference common DAI properties to fix:
> 
>   sdm845-db845c.dtb: speaker@0,1: 'sound-name-prefix' does not match any of the regexes: 'pinctrl-[0-9]+'
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  Documentation/devicetree/bindings/sound/qcom,wsa881x.yaml | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 

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

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

* Re: [PATCH 2/3] ASoC: dt-bindings: qcom,wcd934x: Describe slim-ifc-dev
  2023-01-13 16:22 ` [PATCH 2/3] ASoC: dt-bindings: qcom,wcd934x: Describe slim-ifc-dev Krzysztof Kozlowski
@ 2023-01-17 19:27   ` Rob Herring
  2023-01-18 11:25     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 9+ messages in thread
From: Rob Herring @ 2023-01-17 19:27 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Srinivas Kandagatla, Banajit Goswami, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Mark Brown,
	Krzysztof Kozlowski, alsa-devel, linux-arm-msm, devicetree,
	linux-kernel

On Fri, Jan 13, 2023 at 05:22:13PM +0100, Krzysztof Kozlowski wrote:
> The "slim-ifc-dev" property should not be just "true", because it allows
> any type.

Yes, but it is common, so it should be in a common schema. Though 
there's only one other binding using it (wcd9335.txt).

> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml b/Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml
> index 184e8ccbdd13..39b27126cfc1 100644
> --- a/Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml
> +++ b/Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml
> @@ -28,7 +28,9 @@ properties:
>      description: GPIO spec for reset line to use
>      maxItems: 1
>  
> -  slim-ifc-dev: true
> +  slim-ifc-dev:
> +    description: IFC device interface
> +    $ref: /schemas/types.yaml#/definitions/phandle
>  
>    clocks:
>      maxItems: 1
> -- 
> 2.34.1
> 

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

* Re: [PATCH 3/3] ASoC: dt-bindings: qcom,wcd934x: Allow usage as IFD device
  2023-01-13 16:22 ` [PATCH 3/3] ASoC: dt-bindings: qcom,wcd934x: Allow usage as IFD device Krzysztof Kozlowski
@ 2023-01-17 19:33   ` Rob Herring
  0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring @ 2023-01-17 19:33 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Andy Gross, Konrad Dybcio, Krzysztof Kozlowski,
	alsa-devel, linux-arm-msm, Srinivas Kandagatla, linux-kernel,
	Bjorn Andersson, devicetree, Liam Girdwood, Banajit Goswami,
	Mark Brown


On Fri, 13 Jan 2023 17:22:14 +0100, Krzysztof Kozlowski wrote:
> The WCD9340 audio codec appears on Slimbus twice: as IFD device without
> properties and the actual audio-codec referencing the former via
> wcd9340_ifd.  Allow in the binding both versions to fix several warnings
> like:
> 
>   sdm850-samsung-w737.dtb: ifd@0,0: 'reset-gpios' is a required property
>   sdm850-samsung-w737.dtb: ifd@0,0: 'slim-ifc-dev' is a required property
>   sdm850-samsung-w737.dtb: ifd@0,0: 'interrupt-controller' is a required property
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ---
> 
> oneOf: interrupts-extended|interrupts is needed to avoid dtschema
> limitation.
> ---
>  .../bindings/sound/qcom,wcd934x.yaml          | 58 ++++++++++++++-----
>  1 file changed, 43 insertions(+), 15 deletions(-)
> 

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

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

* Re: [PATCH 2/3] ASoC: dt-bindings: qcom,wcd934x: Describe slim-ifc-dev
  2023-01-17 19:27   ` Rob Herring
@ 2023-01-18 11:25     ` Krzysztof Kozlowski
  2023-01-18 13:19       ` Rob Herring
  0 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-18 11:25 UTC (permalink / raw)
  To: Rob Herring
  Cc: Srinivas Kandagatla, Banajit Goswami, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Mark Brown,
	Krzysztof Kozlowski, alsa-devel, linux-arm-msm, devicetree,
	linux-kernel

On 17/01/2023 20:27, Rob Herring wrote:
> On Fri, Jan 13, 2023 at 05:22:13PM +0100, Krzysztof Kozlowski wrote:
>> The "slim-ifc-dev" property should not be just "true", because it allows
>> any type.
> 
> Yes, but it is common, so it should be in a common schema. Though 
> there's only one other binding using it (wcd9335.txt).

This is still wcd9335 and wcd934x specific, not really common. Maybe
next Qualcomm codec would also bring it so then we can define common
schema for the codecs. But so far I think it is not really a common
property.

Best regards,
Krzysztof


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

* Re: [PATCH 2/3] ASoC: dt-bindings: qcom,wcd934x: Describe slim-ifc-dev
  2023-01-18 11:25     ` Krzysztof Kozlowski
@ 2023-01-18 13:19       ` Rob Herring
  2023-01-18 13:26         ` Krzysztof Kozlowski
  0 siblings, 1 reply; 9+ messages in thread
From: Rob Herring @ 2023-01-18 13:19 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Srinivas Kandagatla, Banajit Goswami, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Mark Brown,
	Krzysztof Kozlowski, alsa-devel, linux-arm-msm, devicetree,
	linux-kernel

On Wed, Jan 18, 2023 at 5:25 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 17/01/2023 20:27, Rob Herring wrote:
> > On Fri, Jan 13, 2023 at 05:22:13PM +0100, Krzysztof Kozlowski wrote:
> >> The "slim-ifc-dev" property should not be just "true", because it allows
> >> any type.
> >
> > Yes, but it is common, so it should be in a common schema. Though
> > there's only one other binding using it (wcd9335.txt).
>
> This is still wcd9335 and wcd934x specific, not really common. Maybe
> next Qualcomm codec would also bring it so then we can define common
> schema for the codecs. But so far I think it is not really a common
> property.

By common, I only mean used by more than 1 binding. That's already the
case, there's just not a schema for the 2nd one. In any case, can
address that later.

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

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

* Re: [PATCH 2/3] ASoC: dt-bindings: qcom,wcd934x: Describe slim-ifc-dev
  2023-01-18 13:19       ` Rob Herring
@ 2023-01-18 13:26         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-18 13:26 UTC (permalink / raw)
  To: Rob Herring
  Cc: Srinivas Kandagatla, Banajit Goswami, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Liam Girdwood, Mark Brown,
	Krzysztof Kozlowski, alsa-devel, linux-arm-msm, devicetree,
	linux-kernel

On 18/01/2023 14:19, Rob Herring wrote:
> On Wed, Jan 18, 2023 at 5:25 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 17/01/2023 20:27, Rob Herring wrote:
>>> On Fri, Jan 13, 2023 at 05:22:13PM +0100, Krzysztof Kozlowski wrote:
>>>> The "slim-ifc-dev" property should not be just "true", because it allows
>>>> any type.
>>>
>>> Yes, but it is common, so it should be in a common schema. Though
>>> there's only one other binding using it (wcd9335.txt).
>>
>> This is still wcd9335 and wcd934x specific, not really common. Maybe
>> next Qualcomm codec would also bring it so then we can define common
>> schema for the codecs. But so far I think it is not really a common
>> property.
> 
> By common, I only mean used by more than 1 binding. That's already the
> case, there's just not a schema for the 2nd one. In any case, can
> address that later.
> 
> Acked-by: Rob Herring <robh@kernel.org>

Sure!

Best regards,
Krzysztof


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

end of thread, other threads:[~2023-01-18 13:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 16:22 [PATCH 1/3] ASoC: dt-bindings: qcom,wsa881x: Allow sound-name-prefix Krzysztof Kozlowski
2023-01-13 16:22 ` [PATCH 2/3] ASoC: dt-bindings: qcom,wcd934x: Describe slim-ifc-dev Krzysztof Kozlowski
2023-01-17 19:27   ` Rob Herring
2023-01-18 11:25     ` Krzysztof Kozlowski
2023-01-18 13:19       ` Rob Herring
2023-01-18 13:26         ` Krzysztof Kozlowski
2023-01-13 16:22 ` [PATCH 3/3] ASoC: dt-bindings: qcom,wcd934x: Allow usage as IFD device Krzysztof Kozlowski
2023-01-17 19:33   ` Rob Herring
2023-01-17 19:22 ` [PATCH 1/3] ASoC: dt-bindings: qcom,wsa881x: Allow sound-name-prefix Rob Herring

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).