From: Li Shaohua <shaohua.li@intel.com>
To: Greg KH <greg@kroah.com>
Cc: ACPI-DEV <acpi-devel@lists.sourceforge.net>,
lkml <linux-kernel@vger.kernel.org>,
Len Brown <len.brown@intel.com>,
Patrick Mochel <mochel@digitalimplant.org>
Subject: Re: [PATCH/RFC 1/4]device core changes
Date: Tue, 09 Nov 2004 08:50:18 +0800 [thread overview]
Message-ID: <1099961418.15294.11.camel@sli10-desk.sh.intel.com> (raw)
In-Reply-To: <20041108225810.GB16197@kroah.com>
On Tue, 2004-11-09 at 06:58, Greg KH wrote:
> On Mon, Nov 08, 2004 at 12:11:11PM +0800, Li Shaohua wrote:
> > Hi,
> > This is the device core change required. Add .platform_bind method for
> > bus_type, so platform can do addition things when add a new device. A
> > case is ACPI, we want to utilize some ACPI methods for physical devices.
> > 1. Why doesn't use 'platform_notify'?
> > Current device core has a 'platform_notify' mechanism, but it's not
> > sufficient for this. Only sepcific bus type know how to parse dev.bus_id
> > and know how to encode specific device's address into ACPI _ADR syntax.
>
> I don't see why platform_notify is not sufficient. This is the exact
> reason it was added to the code.
As I said in the email, we need know the bus type to decode and encode
address. If you use platform_notify, you must do something like this:
switch (dev->bus)
{
case pci_bus_type:
bind PCI devices with ACPI devices
break;
case ide_bus_type:
bind IDE devices with ACPI devices
break;
....
}
But note this method requires all bus types are build-in. If a bus type
is in a loadable module (such as IDE bus), the method will failed. I
searched current tree, only ARM implemented 'platform_notify', but ARM
only cares PCI bus, ACPI cares about all bus types.
>
> > 2. Why adds new 'handle' in 'struct device'?
> > 'Platform_data' is the best candidate, but a search shows some drivers
> > have used it. We can remove 'handle' after the drivers changes their
> > behavior.
>
> No, fix the drivers. Don't add something that you are going to remove
> later.
Ok, I'll try to fix them.
Thanks,
Shaohua
next prev parent reply other threads:[~2004-11-09 1:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-08 4:11 Li Shaohua
2004-11-08 22:58 ` Greg KH
2004-11-09 0:50 ` Li Shaohua [this message]
2004-11-09 3:35 ` Li Shaohua
2004-11-09 4:58 ` Greg KH
2004-11-09 9:03 ` Li Shaohua
2004-11-10 1:24 ` Greg KH
2004-11-10 1:45 ` Li Shaohua
2004-11-10 4:28 ` Russell King
2004-11-11 7:03 ` Li Shaohua
2004-11-11 8:44 ` Russell King
2004-11-11 8:46 ` Li Shaohua
2004-11-12 0:30 ` Greg KH
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=1099961418.15294.11.camel@sli10-desk.sh.intel.com \
--to=shaohua.li@intel.com \
--cc=acpi-devel@lists.sourceforge.net \
--cc=greg@kroah.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@digitalimplant.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®