public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>,
	David Wolfe <david.wolfe@nxp.com>, Han Xu <han.xu@nxp.com>,
	linux-mtd@lists.infradead.org, Frank Li <frank.li@nxp.com>,
	cyrille.pitchen@wedev4u.fr
Subject: Re: [PATCH v4] mtd: fsl-quadspi: Distinguish the mtd device names
Date: Thu, 11 Jan 2018 17:40:12 +0100	[thread overview]
Message-ID: <20180111174012.67e2681a@bbrezillon> (raw)
In-Reply-To: <CAOMZO5AChZVrGMSdGFW5ZyKOOx23f_WJjchmdE=hUj0PmAMZgw@mail.gmail.com>

On Thu, 11 Jan 2018 13:59:44 -0200
Fabio Estevam <festevam@gmail.com> wrote:

> Hi Boris,
> 
> On Thu, Jan 11, 2018 at 1:48 PM, Boris Brezillon
> <boris.brezillon@free-electrons.com> wrote:
> 
> > Still missing the DT doc update. You can do it in a separate patch, but
> > please make it part of the same series.  
> 
> The dt-binding update part is not very clear to me.
> 
> Currently on the imx6sx-sdb.dts we have:
> 
> &qspi2 {
>     pinctrl-names = "default";
>     pinctrl-0 = <&pinctrl_qspi2>;
>     status = "okay";
> 
>     flash0: n25q256a@0 {
>         #address-cells = <1>;
>         #size-cells = <1>;
>         compatible = "micron,n25q256a", "jedec,spi-nor";
>         spi-max-frequency = <29000000>;
>         reg = <0>;
>     };
> 
>     flash1: n25q256a@1 {
>         #address-cells = <1>;
>         #size-cells = <1>;
>         compatible = "micron,n25q256a", "jedec,spi-nor";
>         spi-max-frequency = <29000000>;
>         reg = <1>;
>     };
> };
> 
> 
> The reg requirement is already present as part of
> Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt.
> 
> Are you proposing that I add a comment to
> Documentation/devicetree/bindings/mtd/fsl-quadspi.txt saying that the
> Flash sub-nodes must contain a reg property?

Nope, I wasn't sure whether reg was mandatory or not since it was not
used by the driver before your patch. This being said, that'd be good to
update the example you have in the bindings do to fully describe a
flash device.

Anyway, if all existing DTs have a reg defined, even those where only
one flash device is described, then your patch might break mtdparts
users. And if this is not the case, and the reg property is really
mandatory, then that means those dts are not compliant with the DT
bindings and have to be patched :-). So, the solution of testing the
presence of a reg property to choose the naming scheme is probably not
appropriate.

  reply	other threads:[~2018-01-11 16:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11 15:44 [PATCH v4] mtd: fsl-quadspi: Distinguish the mtd device names Fabio Estevam
2018-01-11 15:48 ` Boris Brezillon
2018-01-11 15:59   ` Fabio Estevam
2018-01-11 16:40     ` Boris Brezillon [this message]
2018-01-11 16:58       ` Fabio Estevam
2018-01-11 20:15         ` Boris Brezillon
2018-01-13 19:40           ` Fabio Estevam

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=20180111174012.67e2681a@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=cyrille.pitchen@wedev4u.fr \
    --cc=david.wolfe@nxp.com \
    --cc=fabio.estevam@nxp.com \
    --cc=festevam@gmail.com \
    --cc=frank.li@nxp.com \
    --cc=han.xu@nxp.com \
    --cc=linux-mtd@lists.infradead.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