Welcome to the PM tree....
What I would have liked, but it looks like our current design is not
going that way, would have been a tree structure for the PM notifiers
from the beginning. And instead of having various kind of callbacks
(like PCI suspend/resume/whatever, others for USB, FW, etc..), we
can just have a PM notifier node for each device and have notifiers
handle calling their childs.
That also allow bus "controllers" (in general) to broadcast specific
messages to their childs for things that don't fit in the D0..D3
scheme.
For PCI, instead of having the PCI layer itself having one node and
call the tree, I'd rather see it having one node per pci_dev, and
layout them according to the PCI tree by default. I can see (and
already know of) cases where the PM tree is _not_ the PCI tree
(because power/reset lines are wired to various ASICs on a motherboard),
and having this PM tree structure separate allow the arch to
influence it if necessary.
It's simple (a notifier node is a lightweight structure, only one
callback function is implemented, only a few messages are usually
needed to be handled in a given node).
Ben.
-
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/