* Re: $MODALIAS and platform_bus ...
2005-06-16 21:54 $MODALIAS and platform_bus David Brownell
@ 2005-06-16 22:07 ` Greg KH
2005-06-16 23:04 ` David Brownell
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2005-06-16 22:07 UTC (permalink / raw)
To: linux-hotplug
On Thu, Jun 16, 2005 at 02:54:22PM -0700, David Brownell wrote:
> Has anyone done anything to make sure platform_bus devices can
> use this new $MODALIAS infrastructure? I was looking at the
> implications for "coldplug" processing, and there's a hole
> where platform device support would go.
I didn't think platform devices had any hotplug or "coldplug" type
support today anyway.
> So given a /sys/devices/platform/$NAME/. there are a few things
> standing in the way of automatically initializing those devices:
>
> - No /sys/devices/platform/$NAME/modalias
> - No MODULE_ALIAS(...) in the driver module
>
> Now the former would seem easy to provide, or even eliminate
> the requirement for it ... the "modalias" will either be $NAME
> or $NAME less a prefix such as ".1" or ".2". Or, it should be
> trivial to have linux/drivers/bus/platform.c create it.
>
> The latter would seem just a bit trickier, since it couldn't
> be driven using linux/scripts/mod/file2alias.c because that
> relies on a non-existent module device table. Drivers could
> explicitly write MODULE_ALIAS if their module name didn't
> already match that convention, but that could be quite a lot
> of drivers to change.
I think just makeing sure the module name matched the $NAME in sysfs,
would allow the modalias stuff to work without changing any drivers.
But odds are, modules support more than one platform device right? If
so, they are going to have to be changed to use MODULE_ALIAS().
thanks,
greg k-h
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: $MODALIAS and platform_bus ...
2005-06-16 21:54 $MODALIAS and platform_bus David Brownell
2005-06-16 22:07 ` Greg KH
@ 2005-06-16 23:04 ` David Brownell
1 sibling, 0 replies; 3+ messages in thread
From: David Brownell @ 2005-06-16 23:04 UTC (permalink / raw)
To: linux-hotplug
On Thursday 16 June 2005 3:07 pm, Greg KH wrote:
> On Thu, Jun 16, 2005 at 02:54:22PM -0700, David Brownell wrote:
> > Has anyone done anything to make sure platform_bus devices can
> > use this new $MODALIAS infrastructure? I was looking at the
> > implications for "coldplug" processing, and there's a hole
> > where platform device support would go.
>
> I didn't think platform devices had any hotplug or "coldplug" type
> support today anyway.
Exactly. I'm still looking at having buildroot populate things
completely ... though this issue is not specific to buildroot.
As a rule, "hotplug" support for platform devices is pointless;
they should get created as part of board-specific setup, shortly
before drivers start to initialize, rather than being dynamically
created later on. So "coldplug" is the most relevant setup mode
for modular platform device drivers, except maybe in initramfs.
(There are also some strange driver modules, basically bad/early
conversions from 2.4 code, which don't just provide the driver
but also create its device node. I call those bugs; and in any
case they can't be hotplugged OR coldplugged.)
> > So given a /sys/devices/platform/$NAME/. there are a few things
> > standing in the way of automatically initializing those devices:
> >
> > - No /sys/devices/platform/$NAME/modalias
> > - No MODULE_ALIAS(...) in the driver module
> >
> > ...
>
> I think just makeing sure the module name matched the $NAME in sysfs,
> would allow the modalias stuff to work without changing any drivers.
Easier said than done ... they don't always do it, and there's also
the issue of "foo.1", "foo.2", "foo.3" and so on.
I'd been thinking about aliasing them in /etc/modprobe.conf ... it'd be
fine for embedded systems, but less good in general. Then the startup
script in /etc/init.d/S00coldplug (that's where buildroot puts them,
no LSB here!) could cd /sys/devices/platform and modprobe each $NAME.
> But odds are, modules support more than one platform device right? If
> so, they are going to have to be changed to use MODULE_ALIAS().
In the SOC example, it varies. There's usually only one USB controller
per type per chip, so for example MODULE_ALIAS("ohci") would let the
OMAP chips "modprobe $NAME" to load "ohci-hcd"; "omap_udc" is OK now.
Likewise MODULE_ALIAS("at91rm9200-ohci") and "at91_udc".
But other controllers work differently, like MMC/SD. $NAME can be
one or both of "mmci-omap.1" and "mmci-omap.2". Does the aliasing
stuff work generically enough that MODULE_ALIAS("mmci-omap.*") could
solve that problem?
- Dave
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 3+ messages in thread