linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Best practice for loading platform modules
@ 2009-04-29 18:05 Chris Hallinan
  2009-04-29 18:11 ` Greg KH
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Chris Hallinan @ 2009-04-29 18:05 UTC (permalink / raw)
  To: linux-hotplug

I have an OMAP3 board, and want usb (host mode) configured as a
loadable module.  Using a generic rule such as this:
RUN+="/sbin/modprobe -b $env{MODALIAS}"

ends up passing "platform:musb_hdrc" to modprobe, which obviously
fails.  Here is what the kernel is passing to udevd, which in turn is
passed to modprobe.  Notice the "platform:" prefix prepended to the
module name:

ACTION="add"
DEVPATH="/devices/platform/musb_hdrc"
DRIVER="musb_hdrc"
HOME="/"
MODALIAS="platform:musb_hdrc"
<snip...>
SEQNUM="1302"
SHLVL="1"
SUBSYSTEM="platform"

All of the platform drivers are passed with the "platform:" prefix, so
the problem applies of these drivers that I wish to load as modules.

The way I see it with my limited understanding of udev (I am not a
kernel developer) I have a few choices.

1) Write an explicit udev rule passing the literal "musb_hdrc" to modprobe
2) Use a startup script to load the module instead of letting udev do
it (not my first choice)
3) Provide a wrapper for modprobe to strip "platform:" from the string
it is passed.

There are probably other options.

It's more likely I'm missing some understanding and there is a
"proper" way to write this rule which I haven't figured out.

Any advice/comment will be much appreciated.

Regards,

Chris Hallinan


--
Life is like Linux - it never stands still.

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

end of thread, other threads:[~2009-04-30  0:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-29 18:05 Best practice for loading platform modules Chris Hallinan
2009-04-29 18:11 ` Greg KH
2009-04-29 18:12 ` Greg KH
2009-04-29 18:31 ` Chris Hallinan
2009-04-29 18:44 ` Greg KH
2009-04-29 19:15 ` Chris Hallinan
2009-04-29 19:25 ` Greg KH
2009-04-29 19:33 ` Kay Sievers
2009-04-29 19:35 ` Chris Hallinan
2009-04-29 19:46 ` Kay Sievers
2009-04-29 19:53 ` Chris Hallinan
2009-04-29 20:18 ` Greg KH
2009-04-30  0:48 ` Chris Hallinan

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