From: dave.martin@linaro.org (Dave Martin)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 0/3] ARM: amba: defining module aliases for AMBA driver autoloading
Date: Fri, 30 Sep 2011 17:56:39 +0100 [thread overview]
Message-ID: <1317401802-24362-1-git-send-email-dave.martin@linaro.org> (raw)
There's no special reason why AMBA device drivers should not be
auto-loadable via udev, but udev currently has no way to map AMBA
device IDs to drivers.
As part of the effort to help enable the building of multiple
platforms into a single kernel image in the future, it's desirable
to be able to build any non-critical platform-specific drivers as
modules.
A straightforward solution is to use modaliases to allow udev to
identify the correct driver module to load.
This series adds the needed MODALIAS uevent property when sending
events concerning amba bus devices, and adds appropriate
MODULE_ALIAS() declarations to a couple of modules.
Briefly tested on Versatile Express.
Any comments and feedback are welcome.
Issues:
* Do new module alises need to be globally agreed/registered
somewhere?
* Because a driver's ID table is in match-and-mask format whereas
udev uses string pattern matching, we effectively have to
maintain two ID tables per driver, containing the same
information in different formats. The patch to mmci.c gives an
example.
I predict that maintenance of those duplicated tables will be
somewhat painful and error-prone. However, the necessary
transformations, while simple, are beyond the scope of the C
preprocessor.
In order to avoid this duplication of information, an extra
(but simple) bit of build-time infrastructure would be needed.
I think this effort would be worth it -- does anyone have
strong views on this?
Dave Martin (3):
ARM: amba: pass a suitable modalias to udev
ARM: sound/arm/aaci.c: Define amba module alias
ARM: drivers/mmc/host/mmci.c: Define amba module alias
drivers/amba/bus.c | 9 ++++++++-
drivers/mmc/host/mmci.c | 8 ++++++++
sound/arm/aaci.c | 2 ++
3 files changed, 18 insertions(+), 1 deletions(-)
--
1.7.4.1
next reply other threads:[~2011-09-30 16:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-30 16:56 Dave Martin [this message]
2011-09-30 16:56 ` [RFC PATCH 1/3] ARM: amba: pass a suitable modalias to udev Dave Martin
2011-09-30 16:56 ` [RFC PATCH 2/3] ARM: sound/arm/aaci.c: Define amba module alias Dave Martin
2011-09-30 16:56 ` [RFC PATCH 3/3] ARM: drivers/mmc/host/mmci.c: " Dave Martin
2011-10-01 16:46 ` [RFC PATCH 0/3] ARM: amba: defining module aliases for AMBA driver autoloading Russell King - ARM Linux
2011-10-03 12:19 ` Dave Martin
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=1317401802-24362-1-git-send-email-dave.martin@linaro.org \
--to=dave.martin@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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).