diff mbox series

[1/2] dt-bindings: add simple-audio-mux binding

Message ID 20201205001508.346439-1-alexandre.belloni@bootlin.com
State Accepted
Commit f17a7db22b8ff1688f30bb66aeeaa8cc088e5230
Headers show
Series [1/2] dt-bindings: add simple-audio-mux binding | expand

Commit Message

Alexandre Belloni Dec. 5, 2020, 12:15 a.m. UTC
Add devicetree documentation for simple audio multiplexers

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
Cc: Rob Herring <robh+dt@kernel.org>

 .../bindings/sound/simple-audio-mux.yaml      | 41 +++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/simple-audio-mux.yaml

Comments

Mark Brown Dec. 9, 2020, 8:27 p.m. UTC | #1
On Sat, 5 Dec 2020 01:15:07 +0100, Alexandre Belloni wrote:
> Add devicetree documentation for simple audio multiplexers


Applied to

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

Thanks!

[1/2] dt-bindings: add simple-audio-mux binding
      commit: f17a7db22b8ff1688f30bb66aeeaa8cc088e5230
[2/2] ASoC: add simple-mux
      commit: 342fbb7578d1741ff646d7b08e14e8753267b9fa

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
Rob Herring (Arm) Dec. 10, 2020, 2:05 a.m. UTC | #2
On Sat, Dec 05, 2020 at 01:15:07AM +0100, Alexandre Belloni wrote:
> Add devicetree documentation for simple audio multiplexers

> 

> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

> ---

> Cc: Rob Herring <robh+dt@kernel.org>

> 

>  .../bindings/sound/simple-audio-mux.yaml      | 41 +++++++++++++++++++

>  1 file changed, 41 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/sound/simple-audio-mux.yaml

> 

> diff --git a/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml b/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml

> new file mode 100644

> index 000000000000..5986d1fcbb54

> --- /dev/null

> +++ b/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml

> @@ -0,0 +1,41 @@

> +# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)

> +%YAML 1.2

> +---

> +$id: http://devicetree.org/schemas/sound/simple-audio-mux.yaml#

> +$schema: http://devicetree.org/meta-schemas/core.yaml#

> +

> +title: Simple Audio Multiplexer

> +

> +maintainers:

> +  - Alexandre Belloni <aleandre.belloni@bootlin.com>


typo

> +

> +description: |

> +  Simple audio multiplexers are driven using gpios, allowing to select which of

> +  their input line is connected to the output line.


What's wrong with the generic mux binding and driver(s)?

> +

> +properties:

> +  compatible:

> +    const: simple-audio-mux

> +

> +  mux-gpios:

> +    description: |

> +      GPIOs used to select the input line.

> +

> +  sound-name-prefix:

> +    $ref: /schemas/types.yaml#/definitions/string

> +    description:

> +      Used as prefix for sink/source names of the component. Must be a

> +      unique string among multiple instances of the same component.

> +

> +required:

> +  - compatible

> +  - mux-gpios

> +

> +additionalProperties: false

> +

> +examples:

> +  - |

> +    mux {

> +        compatible = "simple-audio-mux";

> +        mux-gpios = <&gpio 3 0>;

> +    };

> -- 

> 2.28.0

>
Alexandre Belloni Dec. 11, 2020, 8:27 p.m. UTC | #3
On 09/12/2020 20:05:45-0600, Rob Herring wrote:
> What's wrong with the generic mux binding and driver(s)?

> 


The main issue is that the driver doesn't expose audio routes and so
DAPM can't do its job properly. Also, it is more convenient to have the
control part of the ALSA sound card which is not possible with gpio-mux.

You could argue that we can have simple-audio-mux use the mux subsystem
but we still need a new binding and driver anyway, just as we have
io-channel-mux or i2c-mux. I'm not sure this would be useful but I can
be convinced otherwise.

> > +

> > +properties:

> > +  compatible:

> > +    const: simple-audio-mux

> > +

> > +  mux-gpios:

> > +    description: |

> > +      GPIOs used to select the input line.

> > +

> > +  sound-name-prefix:

> > +    $ref: /schemas/types.yaml#/definitions/string

> > +    description:

> > +      Used as prefix for sink/source names of the component. Must be a

> > +      unique string among multiple instances of the same component.

> > +

> > +required:

> > +  - compatible

> > +  - mux-gpios

> > +

> > +additionalProperties: false

> > +

> > +examples:

> > +  - |

> > +    mux {

> > +        compatible = "simple-audio-mux";

> > +        mux-gpios = <&gpio 3 0>;

> > +    };

> > -- 

> > 2.28.0

> > 


-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml b/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml
new file mode 100644
index 000000000000..5986d1fcbb54
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml
@@ -0,0 +1,41 @@ 
+# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/simple-audio-mux.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Simple Audio Multiplexer
+
+maintainers:
+  - Alexandre Belloni <aleandre.belloni@bootlin.com>
+
+description: |
+  Simple audio multiplexers are driven using gpios, allowing to select which of
+  their input line is connected to the output line.
+
+properties:
+  compatible:
+    const: simple-audio-mux
+
+  mux-gpios:
+    description: |
+      GPIOs used to select the input line.
+
+  sound-name-prefix:
+    $ref: /schemas/types.yaml#/definitions/string
+    description:
+      Used as prefix for sink/source names of the component. Must be a
+      unique string among multiple instances of the same component.
+
+required:
+  - compatible
+  - mux-gpios
+
+additionalProperties: false
+
+examples:
+  - |
+    mux {
+        compatible = "simple-audio-mux";
+        mux-gpios = <&gpio 3 0>;
+    };