Best practice for loading platform modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux