From: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Stefan Agner <stefan@agner.ch>,
boris.brezillon@bootlin.com, marcel.ziswiler@toradex.com,
richard@nod.at, bpringle@sympatico.ca, marek.vasut@gmail.com,
linux-mtd@lists.infradead.org, cyrille.pitchen@wedev4u.fr,
computersforpeace@gmail.com, dwmw2@infradead.org
Subject: Re: [RFC PATCH v2] mtd: nand: vf610_nfc: make use of ->exec_op()
Date: Thu, 8 Feb 2018 19:23:47 +0100 [thread overview]
Message-ID: <20180208192347.692a2d93@xps13> (raw)
In-Reply-To: <20180208190744.615a25ef@xps13>
> > +}
> >
> > - switch (command) {
> > - case NAND_CMD_SEQIN:
> > - /* Use valid column/page from preread... */
> > - vf610_nfc_addr_cycle(nfc, column, page);
> > - nfc->buf_offset = 0;
> > +static int vf610_nfc_exec_op(struct nand_chip *chip,
> > + const struct nand_operation *op,
> > + bool check_only)
>
> The soul of ->exec_op() is here :) However this implementation looks
> very specific to the kind of tasks you are used to do with one specific
> chip. What if someone wants to support a new command that implies
> several command/address/data cycles interleaved? Maybe one solution
> would be to rework a bit by using a case statement in a for loop. If
> the indentation level is too high, you may use helpers to do small
> tasks like sending a command or addresse cycle. What do you think?
Actually, instead of writing your own implementation, maybe you should
just write the helpers I mentioned above and fill a parser patterns
array to give to the NAND core's parser, simplifying again the
implementation.
Miquèl
--
Miquel Raynal, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
next prev parent reply other threads:[~2018-02-08 18:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-14 22:00 [RFC PATCH v2] mtd: nand: vf610_nfc: make use of ->exec_op() Stefan Agner
2018-01-15 10:06 ` Boris Brezillon
2018-01-15 22:07 ` Boris Brezillon
2018-02-08 18:07 ` Miquel Raynal
2018-02-08 18:23 ` Miquel Raynal [this message]
2018-02-08 21:45 ` Stefan Agner
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=20180208192347.692a2d93@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=boris.brezillon@bootlin.com \
--cc=bpringle@sympatico.ca \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@wedev4u.fr \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marcel.ziswiler@toradex.com \
--cc=marek.vasut@gmail.com \
--cc=richard@nod.at \
--cc=stefan@agner.ch \
/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.