All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vaibhav Gupta <vaibhavgupta40@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Kishon Vijay Abraham <kishon@ti.com>,
	Sekhar Nori <nsekhar@ti.com>, Lokesh Vutla <lokeshvutla@ti.com>,
	Praneeth Bajjuri <praneeth@ti.com>,
	Gowtham Tammana <g-tammana@ti.com>,
	linux-crypto@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Peter Ujfalusi <peter.ujfalusi@ti.com>,
	Vaibhav Gupta <v_gupta@ti.com>
Subject: Re: [PATCH v1 1/3] dt-bindings: crypto: ti,sa2ul: Add new compatible for AM64
Date: Wed, 17 Mar 2021 09:46:32 +0530	[thread overview]
Message-ID: <YFGCoMk7Kemrwizc@gmail.com> (raw)
In-Reply-To: <20210316220558.GA3754419@robh.at.kernel.org>

On Tue, Mar 16, 2021 at 04:05:58PM -0600, Rob Herring wrote:
> On Tue, Mar 09, 2021 at 01:50:03AM +0530, Vaibhav Gupta wrote:
> > From: Peter Ujfalusi <peter.ujfalusi@ti.com>
> > 
> > Add the AM64 version of sa2ul to the compatible list.
> > 
> > [v_gupta@ti.com: Conditional dma-coherent requirement, clocks]
> > Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> > Signed-off-by: Vaibhav Gupta <v_gupta@ti.com>
> > ---
> >  .../devicetree/bindings/crypto/ti,sa2ul.yaml  | 40 +++++++++++++++----
> >  1 file changed, 33 insertions(+), 7 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml b/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml
> > index 1d48ac712b23..6eb9acd564c2 100644
> > --- a/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml
> > +++ b/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml
> > @@ -14,6 +14,7 @@ properties:
> >      enum:
> >        - ti,j721e-sa2ul
> >        - ti,am654-sa2ul
> > +      - ti,am64-sa2ul
> >  
> >    reg:
> >      maxItems: 1
> > @@ -45,19 +46,44 @@ properties:
> >      description:
> >        Address translation for the possible RNG child node for SA2UL
> >  
> > +  clocks:
> > +    items:
> > +      - description: Clock used by PKA
> > +      - description: Main Input Clock
> > +      - description: Clock used by rng
> > +
> > +  clock-names:
> > +    items:
> > +      - const: pka_in_clk
> > +      - const: x1_clk
> > +      - const: x2_clk
> > +
> >  patternProperties:
> >    "^rng@[a-f0-9]+$":
> >      type: object
> >      description:
> >        Child RNG node for SA2UL
> >  
> > -required:
> > -  - compatible
> > -  - reg
> > -  - power-domains
> > -  - dmas
> > -  - dma-names
> > -  - dma-coherent
> > +if:
> > +  properties:
> > +    compatible:
> > +      const: ti,am64-sa2ul
> > +then:
> > +  required:
> > +    - compatible
> > +    - reg
> > +    - power-domains
> > +    - dmas
> > +    - dma-names
> > +
> > +else:
> > +  required:
> > +    - compatible
> > +    - reg
> > +    - power-domains
> > +    - dmas
> > +    - dma-names
> > +    - dma-coherent
> 
> The only difference is 'dma-coherent'. You can simplify the if/then to 
> just that.
Hello Rob,

I agree with your point. But with that case we will have to modify/append the
'required' list. Something like:

	if !(properties.compatible == 'ti,am64-sa2ul')
		required += dma-coherent

I even tried to use anchors but that didn't help. I didn't find it even in
examples. Any hint how to achieve that?

Thanks,
Vaibhav

  reply	other threads:[~2021-03-17  4:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08 20:20 [PATCH v1 0/3] Update dt-bindings and sa2ul driver for AM64x SoCs Vaibhav Gupta
2021-03-08 20:20 ` [PATCH v1 1/3] dt-bindings: crypto: ti,sa2ul: Add new compatible for AM64 Vaibhav Gupta
2021-03-16 22:05   ` Rob Herring
2021-03-17  4:16     ` Vaibhav Gupta [this message]
2021-04-13  9:15     ` [PATCH v2 0/3] Update dt-bindings and sa2ul driver for AM64x SoCs Vaibhav Gupta
2021-04-13  9:15       ` [PATCH v2 1/3] dt-bindings: crypto: ti,sa2ul: Add new compatible for AM64 Vaibhav Gupta
2021-04-13 16:30         ` Rob Herring
2021-04-13  9:15       ` [PATCH v2 2/3] crypto: sa2ul: Support for per channel coherency Vaibhav Gupta
2021-04-13  9:15       ` [PATCH v2 3/3] crypto: sa2ul: Add support for AM64 Vaibhav Gupta
2021-04-22  7:45       ` [PATCH v2 0/3] Update dt-bindings and sa2ul driver for AM64x SoCs Herbert Xu
2021-03-08 20:20 ` [PATCH v1 2/3] crypto: sa2ul: Support for per channel coherency Vaibhav Gupta
2021-03-08 20:20 ` [PATCH v1 3/3] crypto: sa2ul: Add support for AM64 Vaibhav Gupta

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=YFGCoMk7Kemrwizc@gmail.com \
    --to=vaibhavgupta40@gmail.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=g-tammana@ti.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=kishon@ti.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lokeshvutla@ti.com \
    --cc=nsekhar@ti.com \
    --cc=peter.ujfalusi@ti.com \
    --cc=praneeth@ti.com \
    --cc=robh@kernel.org \
    --cc=v_gupta@ti.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.