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 21:15:43 +0100 [thread overview]
Message-ID: <20180111211543.561ea46d@bbrezillon> (raw)
In-Reply-To: <CAOMZO5Aerkb2r0y2aC8sZJcEgpJzoNgR5_MU=2t_uq7jTzNo9g@mail.gmail.com>
On Thu, 11 Jan 2018 14:58:39 -0200
Fabio Estevam <festevam@gmail.com> wrote:
> On Thu, Jan 11, 2018 at 2:40 PM, Boris Brezillon
> <boris.brezillon@free-electrons.com> wrote:
>
> > 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.
>
> Ok, I can update fsl-quadspi.txt to include an example for describing
> the flash devices.
>
> > Anyway, if all existing DTs have a reg defined, even those where only
>
> As far as I can see all DTs that use fsl-quadspi have a reg property
> in the SPI flash sub-nodes:
>
> arch/arm/boot/dts/imx6ul-14x14-evk.dts
> arch/arm/boot/dts/imx6sx-sdb.dts
> arch/arm/boot/dts/ls1021a-moxa-uc-8410a.dts
> arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts
>
> > 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.
>
> Any ideas on how we can properly solve this?
Nothing that I really like, sorry. One solution would be to use
dev_name(&pdev->dev) when only one flash device is declared and use
dev_name(&pdev->dev)-reg_val otherwise. Or you could leave the logic
unchanged and force users to specify a label property when they have
more than one device. The last solution would be to actually break
mtdparts users so that you can start using a sane naming scheme.
next prev parent reply other threads:[~2018-01-11 20:15 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
2018-01-11 16:58 ` Fabio Estevam
2018-01-11 20:15 ` Boris Brezillon [this message]
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=20180111211543.561ea46d@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 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.