From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <david-b@pacbell.net>,
linux-kernel@vger.kernel.org, gregkh@suse.de,
dmitry.torokhov@gmail.com
Subject: Re: Platform device id
Date: Mon, 10 Sep 2007 19:52:05 -0300 [thread overview]
Message-ID: <20070910225205.GB1408@khazad-dum.debian.net> (raw)
In-Reply-To: <20070908105534.2e8e7d8a@hyperion.delvare>
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
next prev parent reply other threads:[~2007-09-10 22:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-07 13:35 Jean Delvare
2007-09-07 14:58 ` Dmitry Torokhov
2007-09-07 16:36 ` Jean Delvare
2007-09-07 16:41 ` David Brownell
2007-09-07 21:00 ` Henrique de Moraes Holschuh
2007-09-07 21:41 ` David Brownell
2007-09-07 22:04 ` Henrique de Moraes Holschuh
2007-09-08 0:18 ` David Brownell
2007-09-08 3:50 ` Henrique de Moraes Holschuh
2007-09-08 8:55 ` Jean Delvare
2007-09-10 22:52 ` Henrique de Moraes Holschuh [this message]
2007-09-11 7:43 ` Jean Delvare
2007-09-11 13:44 ` Henrique de Moraes Holschuh
2007-09-11 14:05 ` Jean Delvare
2007-09-07 20:56 ` Henrique de Moraes Holschuh
2007-09-08 8:40 ` Jean Delvare
2007-09-10 22:45 ` Henrique de Moraes Holschuh
2007-09-08 13:30 ` Greg KH
2007-09-09 10:54 ` [PATCH] Make platform_device.id an int Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070910225205.GB1408@khazad-dum.debian.net \
--to=hmh@hmh.eng.br \
--cc=david-b@pacbell.net \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@suse.de \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®