From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"marek.vasut@gmail.com" <marek.vasut@gmail.com>,
Poonam Aggrwal <poonam.aggrwal@nxp.com>,
Ashish Kumar <ashish.kumar@nxp.com>,
Ying Zhang <ying.zhang22455@nxp.com>, Alban Bedel <albeu@free.fr>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Subject: Re: Accessing mtd partitions from driver/i2c
Date: Wed, 6 Jun 2018 15:56:29 +0200 [thread overview]
Message-ID: <20180606155629.2c2a2e45@bbrezillon> (raw)
In-Reply-To: <VI1PR0402MB38542B5CEB150AD440FFA62B97650@VI1PR0402MB3854.eurprd04.prod.outlook.com>
+Alban and Srinivas
On Wed, 6 Jun 2018 13:44:32 +0000
Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> wrote:
> Dear Borris,
>
> > -----Original Message-----
> > From: Boris Brezillon [mailto:boris.brezillon@bootlin.com]
> > Sent: Wednesday, June 6, 2018 12:53 PM
> > To: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
> > Cc: linux-mtd@lists.infradead.org; marek.vasut@gmail.com; Poonam
> > Aggrwal <poonam.aggrwal@nxp.com>; Ashish Kumar
> > <ashish.kumar@nxp.com>; Ying Zhang <ying.zhang22455@nxp.com>
> > Subject: Re: Accessing mtd partitions from driver/i2c
> >
> > Hi Prabhakar,
> >
> > On Wed, 6 Jun 2018 05:02:47 +0000
> > Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> wrote:
> >
> > > Hi All,
> > >
> > > We have a requirement of using(read/write) one mtd partition from
> > > driver/i2c.
> > >
> > > As per my googling mtd->_read, mtd->_write APIs has not been
> > > used
> > anywhere other than driver/mtd layer.
> >
> > It's used by at least one filesystem (JFFS2). And you should not
> > look for mtd-
> > >_xxx() users but mtd_xxx() users. You should never access the mtd
> > >hooks
> > directly but the wrappers that are exposed by the MTD API
> > (mtd_read(), mtd_write(), mtd_erase(), ...).
> >
>
> I can find it's usage in driver/firmware/ folder. Looks like it is
> using nvram.
>
> > BTW, what's your use case? If it's about reading a piece of
> > information from a RO partition, then the work initiated by Alban
> > [1] and exposing some MTD parts are NVMEM providers should be a
> > better match.
>
> Currently, Linux has i2c slave framework. It is reading/writing to
> DDR emulated as EEPROM (drivers/i2c/i2c-slave-eeprom.c). We want
> something similar, where DDR will be replaced by MTD partitions for
> read/write.
Then NVMEM is the solution you're looking for. Alban, Srinivas, can you
agree on something regarding the DT bindings so that we can finally get
this feature merged?
Thanks,
Boris
next prev parent reply other threads:[~2018-06-06 13:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-06 5:02 Accessing mtd partitions from driver/i2c Prabhakar Kushwaha
2018-06-06 7:22 ` Boris Brezillon
2018-06-06 13:44 ` Prabhakar Kushwaha
2018-06-06 13:56 ` Boris Brezillon [this message]
2018-06-07 11:50 ` Prabhakar Kushwaha
2018-06-07 11:59 ` Boris Brezillon
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=20180606155629.2c2a2e45@bbrezillon \
--to=boris.brezillon@bootlin.com \
--cc=albeu@free.fr \
--cc=ashish.kumar@nxp.com \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=poonam.aggrwal@nxp.com \
--cc=prabhakar.kushwaha@nxp.com \
--cc=srinivas.kandagatla@linaro.org \
--cc=ying.zhang22455@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;
as well as URLs for NNTP newsgroup(s).