Subject: Re: PNP power management API for drivers
To: Jared D. McNeill <jmcneill@invisible.ca>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 10/16/2007 11:19:01
On Oct 16, 2007, at 11:03 AM, Jared D. McNeill wrote:

> On Tue, 16 Oct 2007, Jason Thorpe wrote:
>> On Oct 5, 2007, at 6:56 PM, Matt Thomas wrote:
>>
>>> void pnp_domain_join(device_t domain, device_t self)
>>
>> Is it really appropriate to represent the power domain as a  
>> device_t?  I'm beginning to thing that representing all of these  
>> control structures as devices is wrong-headed.
>
> Maybe I'm missing the point, but what exactly does a power domain  
> provide? The purpose of PNP power management is that device class  
> policies will handle device power automatically.. ie MI audio  
> automatically powers on/off the host audio controller and codecs on  
> an as-needed basis.

...and how does it power it on?  On some devices (SoCs, especially),  
the power may be controlled by something completely unrelated to the  
device (within the scope of the device driver, at least).

To power on a device, you need to make a request to the power domain  
that device resides in.  In some cases, it might be PCI-style "go to  
D0".  In some cases, it might be "call to board-specific ASIC that  
powers on 5 devices that are located in the same area of the board".

-- thorpej