linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] ARM: amba: defining module aliases for AMBA driver autoloading
@ 2011-09-30 16:56 Dave Martin
  2011-09-30 16:56 ` [RFC PATCH 1/3] ARM: amba: pass a suitable modalias to udev Dave Martin
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Dave Martin @ 2011-09-30 16:56 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-10-03 12:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-30 16:56 [RFC PATCH 0/3] ARM: amba: defining module aliases for AMBA driver autoloading Dave Martin
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

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