Re: Platform device id
- From: Henrique de Moraes Holschuh <hmh@xxxxxxxxxx>
- Date: Mon, 10 Sep 2007 19:52:05 -0300
On Sat, 08 Sep 2007, Jean Delvare wrote:
This more general than just the platform bus. It's how the Linux 2.6
device driver model is designed.
No issues about that. It is just that the platform bus sucks a bit if you
need to "abuse it" (no wonder!) to hang various different devices that are
provided *or* driven by the same module.
There are alternatives to the way hdaps and thinkpad_acpi instantiate
their devices:
* These drivers use DMI to find out whether they run on supported
hardware. The same detection code could be moved to a separate driver
Actually, DMI is a hint for autoloading, only. They do probe the
hardware/firmware for the needed functionality to know for sure.
(possibly the same one for all DMI-detected devices) and that separate
driver would instantiate the devices as needed. Then the usual
hotplug/coldplug rules apply.
That could work, yes.
* Detection could be moved to user-space entirely, then we would only
need a way to instantiate these specific devices from user-space. This
exists in other areas (scsi, network) for quite some times already so
it shouldn't be too difficult.
Don't like that one, sorry. Detection often needs the kind of access to
hardware that is better off contained in the kernel.
2. The fact that a module that has a number of different devices has to
register itself a number of times as a driver, if it wants to name the
devices something different...
Sounds like you have a design issue here to start with. Supporting
several significantly different devices in the same module is not
something that we do usually.
I will see what I can do about breaking it up in various modules. But this
can be unoptimal. If I took it too seriously, thinkpad-acpi would break into
at least five different modules, if not more, and at least one or two
modules would need to be there for the common code. There has to be a
middle ground somewhere, I think.
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: Platform device id
- From: Jean Delvare
- Re: Platform device id
- References:
- Platform device id
- From: Jean Delvare
- Re: Platform device id
- From: Dmitry Torokhov
- Re: Platform device id
- From: David Brownell
- Re: Platform device id
- From: Henrique de Moraes Holschuh
- Re: Platform device id
- From: David Brownell
- Re: Platform device id
- From: Henrique de Moraes Holschuh
- Re: Platform device id
- From: David Brownell
- Re: Platform device id
- From: Henrique de Moraes Holschuh
- Re: Platform device id
- From: Jean Delvare
- Platform device id
- Prev by Date: Re: [RFC] kbuild - introduce vdir to make life easier for x86_64
- Next by Date: Re: [Hdaps-devel] [PATCH 2.6.23-rc2] hwmon: HP Mobile Data Protection System 3D ACPI driver (resend)
- Previous by thread: Re: Platform device id
- Next by thread: Re: Platform device id
- Index(es):
Relevant Pages
|