From: Greg KH <greg@kroah.com>
To: Li Shaohua <shaohua.li@intel.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: Mon, 8 Nov 2004 20:58:43 -0800 [thread overview]
Message-ID: <20041109045843.GA4849@kroah.com> (raw)
In-Reply-To: <1099971341.15294.48.camel@sli10-desk.sh.intel.com>
On Tue, Nov 09, 2004 at 11:35:41AM +0800, Li Shaohua wrote:
> On Tue, 2004-11-09 at 08:50, Li Shaohua wrote:
> > 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.
> > >
> Oops, it's my bad. we can identify the bus type from bus_type->name, but
> it looks like a little ugly. Why the bus_type hasn't a flag to identify
> which bus it is?
Because if you have a struct bus * you _have_ to know what type it is.
> Anyway, thanks Greg. I will add as you said.
Hm, hopefully Pat will chime in about what would be best for this, as he
created the platform_notify interface.
thanks,
greg k-h
next prev parent reply other threads:[~2004-11-09 4:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-08 4:11 [PATCH/RFC 1/4]device core changes Li Shaohua
2004-11-08 22:58 ` Greg KH
2004-11-09 0:50 ` Li Shaohua
2004-11-09 3:35 ` Li Shaohua
2004-11-09 4:58 ` Greg KH [this message]
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=20041109045843.GA4849@kroah.com \
--to=greg@kroah.com \
--cc=acpi-devel@lists.sourceforge.net \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@digitalimplant.org \
--cc=shaohua.li@intel.com \
/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