devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Heiko Stuebner <heiko@sntech.de>
Cc: Rob Herring <robh@kernel.org>,
	linux-rockchip@lists.infradead.org, alsa-devel@alsa-project.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: dt-bindings: rockchip: i2s-tdm: fix rockchip, cru requirement
Date: Fri, 15 Oct 2021 18:44:56 +0100	[thread overview]
Message-ID: <8553b0cd-95e4-c3db-c75a-d3b28e99f131@arm.com> (raw)
In-Reply-To: <20211015143115.1445707-1-frattaroli.nicolas@gmail.com>

On 2021-10-15 15:31, Nicolas Frattaroli wrote:
> The behaviour described in the bindings is exactly the opposite
> of what it should be, so this patch fixes the description and
> adjusts the if conditions for adding rockchip,cru to required.
> 
> Fixes: 510f1c133aed ("ASoC: dt-bindings: rockchip: add i2s-tdm bindings")
> Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
> ---
>   .../devicetree/bindings/sound/rockchip,i2s-tdm.yaml   | 11 ++++++++---
>   1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml b/Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml
> index ce3e18b50230..93f5221e9381 100644
> --- a/Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml
> +++ b/Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml
> @@ -86,7 +86,7 @@ properties:
>       $ref: /schemas/types.yaml#/definitions/phandle
>       description:
>         The phandle of the cru.
> -      Required if neither trcm-sync-tx-only nor trcm-sync-rx-only are specified.
> +      Required if either trcm-sync-tx-only or trcm-sync-rx-only are specified.
>   
>     rockchip,grf:
>       $ref: /schemas/types.yaml#/definitions/phandle
> @@ -147,8 +147,13 @@ required:
>   allOf:
>     - if:
>         properties:
> -        rockchip,trcm-sync-tx-only: false
> -        rockchip,trcm-sync-rx-only: false
> +        rockchip,trcm-sync-tx-only: true
> +    then:
> +      required:
> +        - rockchip,cru
> +  - if:
> +      properties:
> +        rockchip,trcm-sync-rx-only: true

FWIW, isn't this just a long-winded way to say

   if:
     anyOf:
       - properties:
           rockchip,trcm-sync-tx-only: true
       - properties:
           rockchip,trcm-sync-rx-only: true

which itself could still be more concisely

   if:
     not:
       properties:
         rockchip,trcm-sync-tx-only: false
         rockchip,trcm-sync-rx-only: false

?

Robin.

>       then:
>         required:
>           - rockchip,cru
> 

  reply	other threads:[~2021-10-15 17:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15 14:31 [PATCH] ASoC: dt-bindings: rockchip: i2s-tdm: fix rockchip,cru requirement Nicolas Frattaroli
2021-10-15 17:44 ` Robin Murphy [this message]
2021-10-15 21:33   ` [PATCH] ASoC: dt-bindings: rockchip: i2s-tdm: fix rockchip, cru requirement Nicolas Frattaroli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8553b0cd-95e4-c3db-c75a-d3b28e99f131@arm.com \
    --to=robin.murphy@arm.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frattaroli.nicolas@gmail.com \
    --cc=heiko@sntech.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).