From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
Marek Vasut <marek.vasut@gmail.com>,
Richard Weinberger <richard@nod.at>,
Cyrille Pitchen <cyrille.pitchen@atmel.com>,
linux-mtd@lists.infradead.org, kernel@pengutronix.de,
Sascha Hauer <s.hauer@pengutronix.de>,
Moritz Fischer <moritz.fischer@ettus.com>
Subject: Re: [PATCH] mtd: Add partition device node to mtd partition devices
Date: Thu, 9 Feb 2017 21:41:38 +0100 [thread overview]
Message-ID: <20170209214138.004d482f@bbrezillon> (raw)
In-Reply-To: <20170209201404.fsokiexnj7xvukyd@pengutronix.de>
On Thu, 9 Feb 2017 21:14:04 +0100
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> Hello Boris,
>
> On Thu, Feb 09, 2017 at 08:59:22PM +0100, Boris Brezillon wrote:
> > On Thu, 9 Feb 2017 20:39:40 +0100
> > Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> >
> > > On Thu, Feb 09, 2017 at 04:34:58PM +0100, Boris Brezillon wrote:
> > > > +Moritz
> > > >
> > > > On Thu, 9 Feb 2017 11:50:24 +0100
> > > > Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> > > >
> > > > > From: Sascha Hauer <s.hauer@pengutronix.de>
> > > > >
> > > > > The user visible change here is that mtd partitions get an of_node link
> > > > > in sysfs.
> > > >
> > > > The same patch has already been posted last year [1].
> > > > Brian, can we take one of these?
> > > >
> > > > [1]https://patchwork.ozlabs.org/patch/625978/
> > >
> > > Moritz' patch is more lame, it even updates the documentation (ok, one
> > > point for Moriz :-) Other than that the only difference is "node" vs.
> > > "of_node" (half a point for Sascha) and the position of the assignment
> > > in mtdpart.c has a different position (another half point for Sascha).
> > >
> > > If that would be liked to be seen I can volunteer to create a patch
> > > picking the best from both sources.
> >
> > Sure, you can also add my ack (which I already put on Moritz patch).
> > BTW, is the of_node link in sysfs the only motivation for this change?
> > I know Moritz had bigger plans (nvmem blocks on top of MTD devices), and
> > I also considered advanced stuff (like per-partition ECC config) which
> > required having a valid ->of_node on slave MTD devices.
>
> The motivation for Sascha to create this patch and now me to mainline
> it, is that we specify some non-volatile state space in dts (to store
> for example hardware revision, serial number and mac addresses). See
> http://barebox.org/doc/latest/devicetree/bindings/barebox/barebox,state.html
> for some details.
>
> For the userspace part we read the dtb, something like
>
> state {
> compatible = "barebox,state";
> backend = &mtdstatepartition;
> ...
> }
>
> , and with the symlink introduced by the patch under discussion it gets
> much simpler to find the device file (in /dev) that contains our state
> data.
Okay. Looks like an advanced nvmem [1] implementation. Anyway, having
the of_node populated for MTD partition devs sounds reasonable, no
matter the reason you need that for.
[1]http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/nvmem/nvmem.txt
next prev parent reply other threads:[~2017-02-09 20:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-09 10:50 [PATCH] mtd: Add partition device node to mtd partition devices Uwe Kleine-König
2017-02-09 15:34 ` Boris Brezillon
2017-02-09 19:39 ` Uwe Kleine-König
2017-02-09 19:59 ` Boris Brezillon
2017-02-09 20:14 ` Uwe Kleine-König
2017-02-09 20:41 ` Boris Brezillon [this message]
2017-02-10 3:19 ` Brian Norris
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=20170209214138.004d482f@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@atmel.com \
--cc=dwmw2@infradead.org \
--cc=kernel@pengutronix.de \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=moritz.fischer@ettus.com \
--cc=richard@nod.at \
--cc=s.hauer@pengutronix.de \
--cc=u.kleine-koenig@pengutronix.de \
/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).