linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
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>
Subject: Re: Accessing mtd partitions from driver/i2c
Date: Wed, 6 Jun 2018 09:22:50 +0200	[thread overview]
Message-ID: <20180606092250.2d600a89@bbrezillon> (raw)
In-Reply-To: <VI1PR0402MB38545D0A442329D88E4BAF7A97650@VI1PR0402MB3854.eurprd04.prod.outlook.com>

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(), ...).

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.

> Do we have any such framework/use case available in Linux which can be referred.
> 
> Any pointer/clue will be helpful

I don't know what you want to do with the MTD device exactly, so it's
hard to tell.

Regards,

Boris

[1]https://patchwork.ozlabs.org/project/linux-mtd/list/?series=35728

  reply	other threads:[~2018-06-06  7:23 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 [this message]
2018-06-06 13:44   ` Prabhakar Kushwaha
2018-06-06 13:56     ` Boris Brezillon
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=20180606092250.2d600a89@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --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=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).