lkml.org 
[lkml]   [2004]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: [ACPI] [PATCH/RFC 0/4]Bind physical devices with ACPI devices
Date
From

>On Mon, Nov 08, 2004 at 10:46:30PM +0800, Yu, Luming wrote:
>> >All we need is an acpi_get_gendev_handle that takes a
>struct device and
>> >returns the acpi_handle for it. Now, maybe that'd be best
>> >done by placing
>> >a pointer in the struct device, but I bet it'd be just as
>good to walk
>> >the namespace looking for the corresponding device.
>>
>> It will fail if you just simply walk namespace to find out
>> the corresponding acpi object, because there are NO
>> hardware id or compatible id can be passed in.
>> Please check function acpi_bus_match.
>
>It doesn't need the HID or CID. Look at Shaohua's patches --
>they don't
>use HID or CID either.
>
Yes, I made a mistake, please forget that point.

But another statement I made should be valid.
That is how to use geographical address to
locate corresponding acpi object.

For example, ACPI define IDE as the following:

Device (IDE0){ /* primary controller */
Name (_ADR, 0)
Method (_GTM )
...
Device(PRIM) /* primary adapter */
Name (_ADR, 0)
Method(_GTM)
...
Device(MSTR) /* master channel */
Name (_ADR,0)
Method(_GTF)

We need not only able to locate acpi object IDE0
but also we need to locate object PRIM underneath
IDE0, and MSTR underneath PRIM. Thus, IDE driver
can fully take advantage from ACPI, in terms of
configuration and power management.

Maybe we need to invent a method called
map_device_addr_to_acpi_handle to be generic solution.

Thanks,
Luming






-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.044 / U:3.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site