Re: [ACPI] RE: PATCH/RFC: driver model/pmcore wakeup hooks (1/4)

From: David Brownell
Date: Wed Oct 20 2004 - 12:18:35 EST


On Tuesday 19 October 2004 20:51, Dmitry Torokhov wrote:
> On Tuesday 19 October 2004 04:11 am, Li, Shaohua wrote:
> > A final solution is device core adds an ACPI layer. That is we can link
> > ACPI device and physical device. This way, the PCI device can know which
> > ACPI is linked with it, so the PCI API can use specific ACPI method.

The driver model core has platform_notify hooks for device add/remove,
and ACPI should kick in that way ... they might well need tweaks though.


> > You are right, we currently haven't a method to reach the goal. To match
> > a physical device and ACPI device, we need to know the ACPI device's
> > _ADR and bus.
> > I have a toy to link the PCI device and ACPI device, and some PCI
> > function can use _SxD method and _PSx method to get some information for
> > suspend/resume.
> >
>
> The only caveat is that PCI core should not depend on ACPI because it is not
> available on all platforms, not all world is x86.

RIght! Maybe something like:

int pci_enable_wake(pci_dev, on_or_off) {
...
if (dev->platform_data)
platform_enable_wake(dev, on_or_off)
...
}

That'd call an acpi_enable_wake(). I guess OpenBoot would
do its thing, and embedded boards could do all kinds of stuff.

- Dave
-
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/