Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Vorontsov <cbouatmailru@gmail.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Joakim Tjernlund <joakim.tjernlund@transmode.se>,
	kumar.gala@freescale.com, David Brownell <david-b@pacbell.net>,
	linux-mtd@lists.infradead.org,
	spi-devel-general@lists.sourceforge.net,
	"linuxppc-dev@ozlabs.org Mingkai Hu" <Mingkai.hu@freescale.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [spi-devel-general] [PATCH v2 3/6] mtd: m25p80: add support to parse the SPI flash's partitions
Date: Tue, 10 Aug 2010 20:01:57 +0400	[thread overview]
Message-ID: <20100810160157.GA24553@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <AANLkTinYYTj+dR6ckPoShHKZTUmENEA1O-DYP9mjnWrs@mail.gmail.com>

On Tue, Aug 10, 2010 at 08:56:42AM -0600, Grant Likely wrote:
[...] 
> The suggestion has been raised to use something like bus notifiers to
> get a hook onto the device registration before the driver is probed so
> that the platform_data can be translated in an separate chuck of code,
> but down that path lies insanity.  There are all kinds of ordering
> issues (like making sure the translation code is called before the
> driver probe code), and it is a lot of complexity for what is really a
> simple thing.

There's another option: platform data handlers (they could be
chained, in case if we want to use several methods of obtaining
platform data, i.e. "try raw data, then ACPI, then OF").

See include/linux/spi/mmc_spi.h (mmc_spi_get_pdata)
and drivers/mmc/host/of_mmc_spi.c.

I think we might implement some library to make these handlers
more generic, but even the simple implementation as in mmc_spi
case proves that it is possible to separate OF/ACPI/DMI/whatever
handling from the generic code.

-- 
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2

  reply	other threads:[~2010-08-10 16:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTik9cy+at2n28U+Mut4RD6_cJ9uRZzjf+H86d-rp@mail.gmail.com>
     [not found] ` <796604.30863.qm@web180307.mail.gq1.yahoo.com>
     [not found]   ` <AANLkTi=FGf9gbWDkO4qs01Z+qkip+Zm11=Jc4wHu3G8b@mail.gmail.com>
     [not found]     ` <OF0D24DC16.E1FE65D2-ONC125777B.002E544A-C125777B.002EA7C2@transmode.se>
2010-08-10 14:56       ` [spi-devel-general] [PATCH v2 3/6] mtd: m25p80: add support to parse the SPI flash's partitions Grant Likely
2010-08-10 16:01         ` Anton Vorontsov [this message]
2010-09-02  8:57           ` Hu Mingkai-B21284
2010-08-10 17:23         ` Joakim Tjernlund
2010-08-10 18:27           ` Grant Likely
2010-09-02  8:46             ` Hu Mingkai-B21284

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=20100810160157.GA24553@oksana.dev.rtsoft.ru \
    --to=cbouatmailru@gmail.com \
    --cc=Mingkai.hu@freescale.com \
    --cc=david-b@pacbell.net \
    --cc=dwmw2@infradead.org \
    --cc=grant.likely@secretlab.ca \
    --cc=joakim.tjernlund@transmode.se \
    --cc=kumar.gala@freescale.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    /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