diff mbox series

ASoC: dt-bindings: microchip,sama7g5-pdmc: Simplify "microchip,mic-pos" constraints

Message ID 20230621231044.3816914-1-robh@kernel.org
State Accepted
Commit b2c28785b125acb28a681462510297410cbbabd7
Headers show
Series ASoC: dt-bindings: microchip,sama7g5-pdmc: Simplify "microchip,mic-pos" constraints | expand

Commit Message

Rob Herring (Arm) June 21, 2023, 11:10 p.m. UTC
"enum" values should be integers or strings, not arrays (though json-schema
does allow arrays, we do not). In this case, all possible combinations are
allowed anyways, so there's little point in expressing as an array.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 .../devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

Claudiu Beznea June 22, 2023, 11:04 a.m. UTC | #1
On 22.06.2023 02:10, Rob Herring wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> "enum" values should be integers or strings, not arrays (though json-schema
> does allow arrays, we do not). In this case, all possible combinations are
> allowed anyways, so there's little point in expressing as an array.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>

Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>


> ---
>  .../devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml b/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml
> index 9b40268537cb..9aa65c975c4e 100644
> --- a/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml
> +++ b/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml
> @@ -56,13 +56,9 @@ properties:
>      items:
>        items:
>          - description: value for DS line
> +          enum: [0, 1]
>          - description: value for sampling edge
> -      anyOf:
> -        - enum:
> -            - [0, 0]
> -            - [0, 1]
> -            - [1, 0]
> -            - [1, 1]
> +          enum: [0, 1]
>      minItems: 1
>      maxItems: 4
>      uniqueItems: true
> --
> 2.40.1
>
Mark Brown June 22, 2023, 10:33 p.m. UTC | #2
On Wed, 21 Jun 2023 17:10:44 -0600, Rob Herring wrote:
> "enum" values should be integers or strings, not arrays (though json-schema
> does allow arrays, we do not). In this case, all possible combinations are
> allowed anyways, so there's little point in expressing as an array.
> 
> 

Applied to

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

Thanks!

[1/1] ASoC: dt-bindings: microchip,sama7g5-pdmc: Simplify "microchip,mic-pos" constraints
      commit: b2c28785b125acb28a681462510297410cbbabd7

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
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml b/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml
index 9b40268537cb..9aa65c975c4e 100644
--- a/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml
+++ b/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml
@@ -56,13 +56,9 @@  properties:
     items:
       items:
         - description: value for DS line
+          enum: [0, 1]
         - description: value for sampling edge
-      anyOf:
-        - enum:
-            - [0, 0]
-            - [0, 1]
-            - [1, 0]
-            - [1, 1]
+          enum: [0, 1]
     minItems: 1
     maxItems: 4
     uniqueItems: true