public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Yao Yuan <yao.yuan@nxp.com>
Cc: "mark.rutland@arm.com" <mark.rutland@arm.com>,
	"pawel.moll@arm.com" <pawel.moll@arm.com>,
	"galak@codeaurora.org" <galak@codeaurora.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH v2 1/4] Documentation: fsl-quadspi: Add fsl,ls2080a-dspi compatible string
Date: Wed, 20 Jan 2016 09:16:20 -0600	[thread overview]
Message-ID: <20160120151620.GA11231@rob-hp-laptop> (raw)
In-Reply-To: <AM2PR04MB07222950482F090A9448115E89C00@AM2PR04MB0722.eurprd04.prod.outlook.com>

On Mon, Jan 18, 2016 at 06:43:18AM +0000, Yao Yuan wrote:
> On Wed, Jan 13, 2016 at 06:13 AM, Rob Herring wrote:
> > On Mon, Jan 11, 2016 at 10:36 PM, Yao Yuan <yao.yuan@nxp.com> wrote:
> > > On Thu, Dec 31, 2015 at 10:35PM, Yao Yuan <yao.yuan@nxp.com> wrote:
> > >> On Wed, Dec 30, 2015 at 11:20 PM, Rob Herring wrote:
> > >> > On Tue, Dec 29, 2015 at 9:17 PM, Yao Yuan <yao.yuan@nxp.com> wrote:
> > >> > > Hi Rob,
> > >> > >
> > >> > > Thanks for your review.
> > >> > > So you mean that I should add the commit message for why I add
> > >> > > this new
> > >> > compatible?
> > >> >
> > >> > Please don't top post on the lists.
> > >> >
> > >> > No, the binding doc should explain what are valid combinations of
> > >> > compatible strings and the order when the dts can have multiple
> > >> > strings. For example, is this valid:
> > >> >
> > >> > compatible = "fsl,vf610-dspi", "fsl,ls2080a-dspi";
> > >> >
> > >> > In other words, I should be able to check a dts file against what
> > >> > the binding doc says.
> > >> >
> > >> > Rob
> > >>
> > >> OK, I got it.
> > >> The "fsl,vf610-dspi", "fsl,ls1021a-v1.0-dspi", "fsl,ls2085a-dspi" is
> > >> valid and used in driver.
> > >> But "fsl,ls2080a-dspi" is just used for platform flag.
> > >> Could you help to give an example that how can I explain it in Documents?
> > >> Or should I not write this compatible in Document.
> > >>
> > >> I find that many compatible strings like this (not valid just a
> > >> platform flag) for other driver are not record in document.
> > 
> > Well, things sneak in without getting documented. Also, lots of PPC bindings
> > predate our documentation requirement.
> > 
> > >>
> > >> Thanks.
> > >>
> > >> Yuan Yao
> > >
> > > Hi Rob,
> > > How about like this:
> > > diff --git a/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
> > > b/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
> > > index 00c587b..7a9a523 100644
> > > --- a/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
> > > +++ b/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
> > > @@ -4,6 +4,8 @@ Required properties:
> > >    - compatible : Should be "fsl,vf610-qspi", "fsl,imx6sx-qspi",
> > >                  "fsl,imx7d-qspi", "fsl,imx6ul-qspi",
> > >                  "fsl,ls1021-qspi"
> > > +       Invalid compatible just for SOC flag:
> > > +               "fsl,ls2080a-qspi"
> > 
> > This doesn't make sense to me. Typically, we see something like:
> > 
> > Should be one of:
> >   "vendor,soc1-device"
> >   "vendor,soc2-device"
> > Followed by "vendor,soc0-device"
> > 
> > Sometime the last entry is a generic string. Here soc0 is the first SOC with the
> > block. Later SOCs have "the same" block, but new compatible strings in addition
> > in case any changes or errata are found that the driver needs to deal with.
> > 
> 
> Hi Rob,
> 
> Thanks for your suggestion,
> So how about like this:
> --- a/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
> +++ b/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
> @@ -2,7 +2,10 @@
> 
>  Required properties:
>    - compatible : Should be "fsl,vf610-qspi", "fsl,imx6sx-qspi",
> -                "fsl,imx7d-qspi", "fsl,imx6ul-qspi"
> +                "fsl,imx7d-qspi", "fsl,imx6ul-qspi",
> +                "fsl,ls1021a-qspi",
> +                Or
> +                "fsl,ls2080a-qspi" followed by "fsl,ls1021a-qspi",

That looks fine.

> But if we add addition information in binging documents, once any changes or errata are found that the driver needs to deal (such as "vendor,soc1-device"), the binging document should also be update. 
> Because at that time the driver should also match "vendor,soc1-device"
> So at that time we can't say "vendor,soc1-device"should followed by "vendor,soc0-device"

>From day 1 of SOC1 you should have both compatible strings. Initially 
the driver can match on SOC0. When you find some errata or other 
difference, then you modify the driver and match on SOC1. No DTS change 
needed.
 
> It seems the only benefit that may keep the dts no changes.

That is the goal and why we require specific compatible strings even if 
not needed at the time.

Rob

      reply	other threads:[~2016-01-20 15:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-24 11:01 [PATCH v2 1/4] Documentation: fsl-quadspi: Add fsl,ls2080a-dspi compatible string Yuan Yao
2015-12-24 11:01 ` [PATCH v2 2/4] Documentation: fsl-quadspi: Add fsl, ls2080a-qspi " Yuan Yao
2015-12-29 18:34   ` Rob Herring
2015-12-24 11:01 ` [PATCH v2 3/4] dts/ls2080a: update the DTS for QSPI and DSPI support Yuan Yao
2015-12-24 11:01 ` [PATCH 4/4] Documentation: fsl-quadspi: Add optional properties Yuan Yao
2015-12-29 18:34   ` Rob Herring
2015-12-29 18:35 ` [PATCH v2 1/4] Documentation: fsl-quadspi: Add fsl,ls2080a-dspi compatible string Rob Herring
2015-12-30  3:17   ` Yao Yuan
2015-12-30 15:19     ` Rob Herring
2015-12-31  2:35       ` Yao Yuan
2016-01-12  4:36       ` Yao Yuan
2016-01-12 22:13         ` Rob Herring
2016-01-18  6:43           ` Yao Yuan
2016-01-20 15:16             ` Rob Herring [this message]

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=20160120151620.GA11231@rob-hp-laptop \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=yao.yuan@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox