From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Introduce the 'widgets' property, allowing the creation of widgets from
4 template widgets: Microphone, Line, Headphone, and Speaker. Also
introduce the 'hp-det-gpios' property, which allows using headphone
detection using the specified GPIO.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
---
.../devicetree/bindings/sound/audio-graph-card2.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml b/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml
index f943f90d8b15..94588353f852 100644
--- a/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml
+++ b/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml
@@ -37,6 +37,10 @@ properties:
codec2codec:
type: object
description: Codec to Codec node
+ hp-det-gpios:
+ $ref: audio-graph.yaml#/properties/hp-det-gpios
+ widgets:
+ $ref: audio-graph.yaml#/properties/widgets
required:
- compatible
--
2.34.1
On Mon, Dec 16, 2024 at 09:50:37AM -0500, Laurentiu Mihalcea wrote: > From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com> > > Introduce the 'widgets' property, allowing the creation of widgets from > 4 template widgets: Microphone, Line, Headphone, and Speaker. Also > introduce the 'hp-det-gpios' property, which allows using headphone > detection using the specified GPIO. > > Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com> > --- > .../devicetree/bindings/sound/audio-graph-card2.yaml | 4 ++++ I have impression you are duplicating audio graph properties instead of referencing proper schema, but considering that the bindings audio-graph-card and audio-graph-card2 differ only by number "2" without any description, not sure what is correct here. Best regards, Krzysztof
On 12/17/2024 9:07 AM, Krzysztof Kozlowski wrote: > On Mon, Dec 16, 2024 at 09:50:37AM -0500, Laurentiu Mihalcea wrote: >> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com> >> >> Introduce the 'widgets' property, allowing the creation of widgets from >> 4 template widgets: Microphone, Line, Headphone, and Speaker. Also >> introduce the 'hp-det-gpios' property, which allows using headphone >> detection using the specified GPIO. >> >> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com> >> --- >> .../devicetree/bindings/sound/audio-graph-card2.yaml | 4 ++++ > I have impression you are duplicating audio graph properties instead of > referencing proper schema, but considering that the bindings > audio-graph-card and audio-graph-card2 differ only by number "2" without > any description, not sure what is correct here. Please correct me if I'm wrong here. As things stand now and based on Kuninori Morimoto's comment on this (https://lore.kernel.org/lkml/87cyhw8lg5.wl-kuninori.morimoto.gx@renesas.com/) I'd say we can't (or, rather, shouldn't) directly reference audio-graph.yaml here. Now, I wonder if the "proper" solution here would be to take the common properties of audio-graph.yaml and audio-graph-card2.yaml and create a new binding that can be referenced by both aforementioned bindings? Would that make things even more confusing (we'd probably end up with audio-graph.yaml, audio-graph-card.yaml, audio-graph-card2.yaml, and audio-graph-common.yaml)? Should this be addressed as part of this series?
On 08/01/2025 13:19, Laurentiu Mihalcea wrote: > > > > On 12/17/2024 9:07 AM, Krzysztof Kozlowski wrote: >> On Mon, Dec 16, 2024 at 09:50:37AM -0500, Laurentiu Mihalcea wrote: >>> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com> >>> >>> Introduce the 'widgets' property, allowing the creation of widgets from >>> 4 template widgets: Microphone, Line, Headphone, and Speaker. Also >>> introduce the 'hp-det-gpios' property, which allows using headphone >>> detection using the specified GPIO. >>> >>> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com> >>> --- >>> .../devicetree/bindings/sound/audio-graph-card2.yaml | 4 ++++ >> I have impression you are duplicating audio graph properties instead of >> referencing proper schema, but considering that the bindings >> audio-graph-card and audio-graph-card2 differ only by number "2" without >> any description, not sure what is correct here. > > Please correct me if I'm wrong here. > > As things stand now and based on Kuninori Morimoto's comment on this > (https://lore.kernel.org/lkml/87cyhw8lg5.wl-kuninori.morimoto.gx@renesas.com/) I'd say we can't > (or, rather, shouldn't) directly reference audio-graph.yaml here. Thanks Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > Now, I wonder if the "proper" solution here would be to take the common properties > of audio-graph.yaml and audio-graph-card2.yaml and create a new binding that can be > referenced by both aforementioned bindings? Would that make things even more confusing > (we'd probably end up with audio-graph.yaml, audio-graph-card.yaml, audio-graph-card2.yaml, > and audio-graph-common.yaml)? Should this be addressed as part of this series? Really not sure. Common bindings are often good choice but I already struggle with grasping the differences between both audio-graph-cards, so more of it might not help. Best regards, Krzysztof
© 2016 - 2025 Red Hat, Inc.