public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* device states supported by current drivers
@ 2003-08-11  1:28 Bharata B Rao
       [not found] ` <3F36F140.6010701-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Bharata B Rao @ 2003-08-11  1:28 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hello,

After looking into the acpi code and the new driver model code in 2.6 
test kernels, I understand that to put the device to different low power 
states in ACPI, it is necessary to first convert the device driver into 
the new driver model. Could someone please let me know if I get this 
correct ?

Are there any device drivers in 2.4/2.6 kernels which actually support 
different low power states as defined by ACPI ? The reason I ask is I 
can't really see any device actually implementing the new driver model 
suspend routine which is used by ACPI.

Regards,
Bharata.




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: device states supported by current drivers
       [not found] ` <3F36F140.6010701-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2003-08-11  7:26   ` Knut Neumann
       [not found]     ` <1060586777.12397.3.camel-s1IKGncK6J2OERECOqmV57dB6IYNvbhm87tLKu7D3g4@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Knut Neumann @ 2003-08-11  7:26 UTC (permalink / raw)
  To: rao.bharata-Sze3O3UU22JBDgjK7y7TUQ
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Am Mo, 2003-08-11 um 03.28 schrieb Bharata B Rao:
> Hello,
> 
> After looking into the acpi code and the new driver model code in 2.6 
> test kernels, I understand that to put the device to different low power 
> states in ACPI, it is necessary to first convert the device driver into 
> the new driver model. Could someone please let me know if I get this 
> correct ?
> 
> Are there any device drivers in 2.4/2.6 kernels which actually support 
> different low power states as defined by ACPI ? The reason I ask is I 
> can't really see any device actually implementing the new driver model 
> suspend routine which is used by ACPI.

What about the e100 driver? See drivers/net/e100/e100_main.c

-Knut



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: device states supported by current drivers
       [not found]     ` <1060586777.12397.3.camel-s1IKGncK6J2OERECOqmV57dB6IYNvbhm87tLKu7D3g4@public.gmane.org>
@ 2003-08-11  8:59       ` Bharata B Rao
       [not found]         ` <3F375AE9.1080202-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Bharata B Rao @ 2003-08-11  8:59 UTC (permalink / raw)
  To: Knut Neumann; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Knut Neumann wrote:
> Am Mo, 2003-08-11 um 03.28 schrieb Bharata B Rao:
>>
>>Are there any device drivers in 2.4/2.6 kernels which actually support 
>>different low power states as defined by ACPI ? The reason I ask is I 
>>can't really see any device actually implementing the new driver model 
>>suspend routine which is used by ACPI.
> 
> 
> What about the e100 driver? See drivers/net/e100/e100_main.c
> 

Ok, I can see that now. Thanks.

Two more dumb questions (sorry for asking them here in devel list)

1. When a particular sleep state (S1 - S5) is entered via 
/proc/acpi/sleep, the devices are put to one of the D states (D0 - D3)
 From the code (device_suspend, e100_suspend, pci_set_power_state), it 
looks like the sleep states (Sx) are directly translated to device 
states (Dx) when it comes to device suspend. i,e., when I say enter S2, 
it will lead to device entering to D2. Is this how it should be ?

2. Is there no interface exported by ACPI to control the devices 
independently. i,e., can't I just control the power state of a device 
from user space ? Currently I can see it only happens via 
/proc/acpi/sleep, which is for controlling the entire system sleep state.

Regards,
Bharata.



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: device states supported by current drivers
       [not found]         ` <3F375AE9.1080202-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2003-08-11 11:40           ` Knut Neumann
  2003-08-11 15:39           ` Patrick Mochel
  2003-08-12 22:58           ` Pavel Machek
  2 siblings, 0 replies; 8+ messages in thread
From: Knut Neumann @ 2003-08-11 11:40 UTC (permalink / raw)
  To: rao.bharata-Sze3O3UU22JBDgjK7y7TUQ
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Am Mo, 2003-08-11 um 10.59 schrieb Bharata B Rao:
> 1. When a particular sleep state (S1 - S5) is entered via 
> /proc/acpi/sleep, the devices are put to one of the D states (D0 - D3)
>  From the code (device_suspend, e100_suspend, pci_set_power_state), it 
> looks like the sleep states (Sx) are directly translated to device 
> states (Dx) when it comes to device suspend. i,e., when I say enter S2, 
> it will lead to device entering to D2. Is this how it should be ?

Hmm..would have thought so at first. But a quick look at the ACPI spec
shows that its possible to define highest power D-states (p. 204) for
each S-states per device. It mentions as well that the Sx-Dx mapping is
derived from the devices power resource declarations.

> 2. Is there no interface exported by ACPI to control the devices 
> independently. i,e., can't I just control the power state of a device 
> from user space ? Currently I can see it only happens via 
> /proc/acpi/sleep, which is for controlling the entire system sleep state.

AFAI understand this is supposed to be done via sysfs. 

-Knut



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: device states supported by current drivers
       [not found]         ` <3F375AE9.1080202-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  2003-08-11 11:40           ` Knut Neumann
@ 2003-08-11 15:39           ` Patrick Mochel
  2003-08-12 22:58           ` Pavel Machek
  2 siblings, 0 replies; 8+ messages in thread
From: Patrick Mochel @ 2003-08-11 15:39 UTC (permalink / raw)
  To: Bharata B Rao; +Cc: Knut Neumann, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f


> Ok, I can see that now. Thanks.
> 
> Two more dumb questions (sorry for asking them here in devel list)

Actually, these don't belong on the acpi list at all. You should be asking 
them on the linux-kernel list, as they are driver model questions. :)

> 1. When a particular sleep state (S1 - S5) is entered via 
> /proc/acpi/sleep, the devices are put to one of the D states (D0 - D3)
>  From the code (device_suspend, e100_suspend, pci_set_power_state), it 
> looks like the sleep states (Sx) are directly translated to device 
> states (Dx) when it comes to device suspend. i,e., when I say enter S2, 
> it will lead to device entering to D2. Is this how it should be ?

S2 is not supported on any platform that I've ever seen. But, if it ever 
is, the spec says that devices may enter a low power state, but not 
necesarily D3 (which is what is recommended for S3). By coincidence, the 
states translate directly, but this is not the case on other platforms. 

> 2. Is there no interface exported by ACPI to control the devices 
> independently. i,e., can't I just control the power state of a device 
> from user space ? Currently I can see it only happens via 
> /proc/acpi/sleep, which is for controlling the entire system sleep state.

For now, each device exports a 'power' file in their sysfs directory. The 
interface is pretty bad, and I'm working on a better one as we speak..


	-pat



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: device states supported by current drivers
       [not found]         ` <3F375AE9.1080202-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  2003-08-11 11:40           ` Knut Neumann
  2003-08-11 15:39           ` Patrick Mochel
@ 2003-08-12 22:58           ` Pavel Machek
       [not found]             ` <20030812225808.GB1417-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
  2 siblings, 1 reply; 8+ messages in thread
From: Pavel Machek @ 2003-08-12 22:58 UTC (permalink / raw)
  To: Bharata B Rao; +Cc: Knut Neumann, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hi!

> >Am Mo, 2003-08-11 um 03.28 schrieb Bharata B Rao:
> >>
> >>Are there any device drivers in 2.4/2.6 kernels which actually support 
> >>different low power states as defined by ACPI ? The reason I ask is I 
> >>can't really see any device actually implementing the new driver model 
> >>suspend routine which is used by ACPI.
> >
> >
> >What about the e100 driver? See drivers/net/e100/e100_main.c
> >
> 
> Ok, I can see that now. Thanks.
> 
> Two more dumb questions (sorry for asking them here in devel list)
> 
> 1. When a particular sleep state (S1 - S5) is entered via 
> /proc/acpi/sleep, the devices are put to one of the D states (D0 - D3)
> From the code (device_suspend, e100_suspend, pci_set_power_state), it 
> looks like the sleep states (Sx) are directly translated to device 
> states (Dx) when it comes to device suspend. i,e., when I say enter S2, 
> it will lead to device entering to D2. Is this how it should be ?

I believe suspend() function parameters are expected to tell you *S*
state we are entering. I do not see code that enables drivers to enter
D0 vs. D1 vs. D2 vs D3. I guess it is not there.

								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: device states supported by current drivers
       [not found]             ` <20030812225808.GB1417-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
@ 2003-08-13 17:07               ` Patrick Mochel
  0 siblings, 0 replies; 8+ messages in thread
From: Patrick Mochel @ 2003-08-13 17:07 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Bharata B Rao, Knut Neumann,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f


> I believe suspend() function parameters are expected to tell you *S*
> state we are entering. I do not see code that enables drivers to enter
> D0 vs. D1 vs. D2 vs D3. I guess it is not there.


Devices get passed the D state to enter; they should not care about the S 
state we're entering, especially since it's irrelevant on anything but an 
ACPI-enabled platform. See the other email I posted about how they map to 
each other.


	-pat



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: device states supported by current drivers
@ 2003-08-15  2:01 Yu, Luming
  0 siblings, 0 replies; 8+ messages in thread
From: Yu, Luming @ 2003-08-15  2:01 UTC (permalink / raw)
  To: Patrick Mochel, Pavel Machek
  Cc: Bharata B Rao, Knut Neumann,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

I'm sorry, I cannot find them,  Would you please point  out where they are.
Thanks 
Luming

>> I believe suspend() function parameters are expected to tell you *S*
>> state we are entering. I do not see code that enables drivers to enter
>> D0 vs. D1 vs. D2 vs D3. I guess it is not there.
>
>
>Devices get passed the D state to enter; they should not care about the S 
>state we're entering, especially since it's irrelevant on anything but an 
>ACPI-enabled platform. See the other email I posted about how they map to 
>each other.
>
>
>	-pat



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Acpi-devel mailing list
Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/acpi-devel


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-08-15  2:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-11  1:28 device states supported by current drivers Bharata B Rao
     [not found] ` <3F36F140.6010701-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2003-08-11  7:26   ` Knut Neumann
     [not found]     ` <1060586777.12397.3.camel-s1IKGncK6J2OERECOqmV57dB6IYNvbhm87tLKu7D3g4@public.gmane.org>
2003-08-11  8:59       ` Bharata B Rao
     [not found]         ` <3F375AE9.1080202-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2003-08-11 11:40           ` Knut Neumann
2003-08-11 15:39           ` Patrick Mochel
2003-08-12 22:58           ` Pavel Machek
     [not found]             ` <20030812225808.GB1417-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2003-08-13 17:07               ` Patrick Mochel
  -- strict thread matches above, loose matches on Subject: below --
2003-08-15  2:01 Yu, Luming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox