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 Wed, Nov 13, 2024 at 02:52:38PM -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 ++++ > 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 why not direct ref Documentation/devicetree/bindings/sound/audio-graph.yaml and define these again here. Frank > > required: > - compatible > -- > 2.34.1 >
On 11/13/2024 10:11 PM, Frank Li wrote: > On Wed, Nov 13, 2024 at 02:52:38PM -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 ++++ >> 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 > why not direct ref Documentation/devicetree/bindings/sound/audio-graph.yaml > and define these again here. We don't actually want all the properties from 'audio-graph.yaml' (for the moment at least). Also ref-ing 'audio-graph.yaml' will make the 'dais' property required, which is not targeted in this patch. Maybe Kuninori Morimoto can comment more on this. > > Frank > >> required: >> - compatible >> -- >> 2.34.1 >>
Hi > >> 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 > > > why not direct ref Documentation/devicetree/bindings/sound/audio-graph.yaml > > and define these again here. > > We don't actually want all the properties from 'audio-graph.yaml' > (for the moment at least). Also ref-ing 'audio-graph.yaml' will make the > 'dais' property required, which is not targeted in this patch. > Maybe Kuninori Morimoto can comment more on this. I'm not a DT yaml expert, but audio-graph.yaml is for audio-graph-card and its custom card. unfortunately audio-graph-card2 is using different style, so ref audio-graph.yaml on audio-graph-card2 is impossible, or makes yaml more complex. Thank you for your help !! Best regards --- Kuninori Morimoto
© 2016 - 2026 Red Hat, Inc.