LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-03-2005, 05:53 PM   #1
Elric of Grans
Member
 
Registered: May 2005
Posts: 46

Rep: Reputation: 15
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!
 
Old 05-04-2005, 11:26 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Power Management UmneyDurak Fedora 0 09-22-2005 02:27 PM
power management linuxmandrake Linux - Software 0 08-02-2005 04:32 PM
Enabling power save/power management/cpu freq scaling features for a Debian system zero79 Debian 0 12-19-2004 01:17 PM
Power Management(sysfs) /sys/power/state mavrick613 Linux - General 0 05-24-2004 03:04 PM
power management spyderusa11 Linux - Newbie 1 06-20-2003 10:39 PM


All times are GMT -5. The time now is 11:49 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration