LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   C and power management in 2.6... (https://www.linuxquestions.org/questions/programming-9/c-and-power-management-in-2-6-a-319852/)

Elric of Grans 05-03-2005 05:53 PM

C and power management in 2.6...
 
G'Day,

I understand that power management in 2.6 is normally handled through sysfs by `echo -n standby > /sys/power/state', or something similar to the individual device (or so I understand - I've not yet tried to suspend individual devices yet). I would doubt that is how you would do it in C though: surely there would be an API to make this a little easier. My question is simply what are the 2.6 PM APIs, and where can I find more information on them. I've found plenty on the 2.4 APIs, but I understand they have been depreciated; I'm yet to read anything on 2.6 APIs.

Thanks!

Hko 05-04-2005 11:26 AM

Re: C and power management in 2.6...
 
Quote:

Originally posted by Elric of Grans
I understand that power management in 2.6 is normally handled through sysfs by `echo -n standby > /sys/power/state', or something similar to the individual device (or so I understand - I've not yet tried to suspend individual devices yet). I would doubt that is how you would do it in C though: surely there would be an API to make this a little easier.
Why doubt that?
It's probably the only way, and it shouldn't be too hard to write a string of max. 7 chars to a file in C...

Quote:

My question is simply what are the 2.6 PM APIs, and where can I find more information on them.
cat /usr/sr/src/linux/Documentation/power/* | less


All times are GMT -5. The time now is 09:01 PM.