From: Segher Boessenkool <segher@kernel.crashing.org>
To: Jochen Friedrich <jochen@scram.de>
Cc: David Brownell <dbrownell@users.sourceforge.net>,
Gary Jennejohn <garyj@denx.de>,
linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
Pierre Ossman <drzeus-mmc@drzeus.cx>
Subject: Re: [RFC PATCH 2/2] mmc: add OpenFirmware bindings for the mmc_spi driver
Date: Sun, 25 May 2008 01:14:28 +0200 [thread overview]
Message-ID: <be6dcc7a8a3132a40af7dfed9a430876@kernel.crashing.org> (raw)
In-Reply-To: <48382710.9030700@scram.de>
>> The real problem is we don't yet have good method (or place) to apply
>> a translation table from compatible values to modaliases. Ideally,
>> the translations should be part of the drivers themselves, but that
>> causes a chicken and egg problem of needing to load the driver to get
>> access to the table to know if it is the correct driver... Of course,
>> I'm really not very familiar with the whole module autoloading
>> mechanism. Regardless; binding should be based on compatible, not on
>> a hacky and bogus linux,modalias property.
>
> i2c exactly has the same problem. Here the compatible entry is used
> in drivers/of/of_i2c.c and mangled into a name to be used as modalias.
> It's still sort of hackish, but it seems to be a compromise acceptable
> by both OF and i2c folks.
It's perfectly acceptable. The sole purpose of "compatible" is for
a client (i.e., the kernel) to decide what to do with this device;
most often, to decide what driver to use.
It would be nice to have a completely generic thing that matches device
tree nodes to drivers, and it sounds perfectly reasonable to me to go
via modalias for that (i.e., just translate from device tree namespace
to the kernel driver namespace).
As a bonus, it would make driver matching more correct in some places:
currently, whatever driver matches first wins (i.e., which "compatible"
value is tried first), but the ordering of different values in
"compatible"
is supposed to be significant (whatever is mentioned there first should
win).
Segher
next prev parent reply other threads:[~2008-05-24 23:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-23 18:27 [RFC] OpenFirmware bindings for the MMC-over-SPI driver Anton Vorontsov
2008-05-23 18:28 ` [RFC PATCH 1/2] mmc_spi: export probe and remove functions Anton Vorontsov
[not found] ` <20080526141836.72db0623@mjolnir.drzeus.cx>
2008-05-26 12:25 ` Anton Vorontsov
2008-05-26 13:10 ` Anton Vorontsov
[not found] ` <20080601121841.0392b01c@mjolnir.drzeus.cx>
2008-06-02 12:53 ` Anton Vorontsov
2008-05-23 18:28 ` [RFC PATCH 2/2] mmc: add OpenFirmware bindings for the mmc_spi driver Anton Vorontsov
2008-05-24 2:35 ` Stephen Rothwell
2008-05-26 11:58 ` Anton Vorontsov
2008-05-24 5:19 ` Grant Likely
2008-05-24 14:32 ` Jochen Friedrich
2008-05-24 23:14 ` Segher Boessenkool [this message]
2008-05-24 23:06 ` Segher Boessenkool
2008-05-26 11:49 ` Anton Vorontsov
2008-05-26 22:19 ` David Brownell
2008-05-26 23:15 ` Anton Vorontsov
2008-05-24 19:56 ` [RFC] OpenFirmware bindings for the MMC-over-SPI driver David Brownell
2008-05-25 4:47 ` Grant Likely
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=be6dcc7a8a3132a40af7dfed9a430876@kernel.crashing.org \
--to=segher@kernel.crashing.org \
--cc=dbrownell@users.sourceforge.net \
--cc=drzeus-mmc@drzeus.cx \
--cc=g.liakhovetski@gmx.de \
--cc=garyj@denx.de \
--cc=jochen@scram.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
/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).