diff mbox series

[v4,2/2] ASoC: dt-bindings: simple-audio-mux: add mux-names property

Message ID 87ed8halde.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State Superseded
Headers show
Series ASoC: simple-audio-mux: add state-labels | expand

Commit Message

Kuninori Morimoto June 28, 2024, 1:47 a.m. UTC
simple-audio-mux is designed to be used generally, thus "Input 1" or
"Input 2" are used to selecting MUX input. This numbered inputs would
work, but might be not user friendly in some case, for example in case
of system hardware design has some clear labels.
Adds new "state-labels" property and enable to select MUX by own state
names.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../devicetree/bindings/sound/simple-audio-mux.yaml         | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Krzysztof Kozlowski June 28, 2024, 8:25 a.m. UTC | #1
On 28/06/2024 03:47, Kuninori Morimoto wrote:
> simple-audio-mux is designed to be used generally, thus "Input 1" or
> "Input 2" are used to selecting MUX input. This numbered inputs would
> work, but might be not user friendly in some case, for example in case
> of system hardware design has some clear labels.
> Adds new "state-labels" property and enable to select MUX by own state
> names.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  .../devicetree/bindings/sound/simple-audio-mux.yaml         | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml b/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml
> index 9f319caf3db7..3b38a0753282 100644
> --- a/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml
> +++ b/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml
> @@ -24,6 +24,11 @@ properties:
>      description: |
>        GPIOs used to select the input line.
>  
> +  state-labels:
> +    description: |

Do not need '|' unless you need to preserve formatting.

> +      State of input line. default is "Input 1", "Input 2"
> +    $ref: /schemas/types.yaml#/definitions/string-array

If I understood correctly the driver, you have only one GPIO and only
two states, right? If so, then "maxItems: 2".

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml b/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml
index 9f319caf3db7..3b38a0753282 100644
--- a/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml
+++ b/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml
@@ -24,6 +24,11 @@  properties:
     description: |
       GPIOs used to select the input line.
 
+  state-labels:
+    description: |
+      State of input line. default is "Input 1", "Input 2"
+    $ref: /schemas/types.yaml#/definitions/string-array
+
   sound-name-prefix: true
 
 required:
@@ -37,4 +42,5 @@  examples:
     mux {
         compatible = "simple-audio-mux";
         mux-gpios = <&gpio 3 0>;
+        state-labels = "Label_A", "Label_B";
     };