* Committed Clemens Zeidler's Intel speedstep driver. Thanks a lot, Clemens!

This is a very welcome addition.
* There are a few issues, and maybe questionable decisions (like the dependence
  on ACPI), but I see no reason why it shouldn't be added in its current form
  already.
* Unfortunately, I could not test it yet, though, as the CPU of my laptop is
  not supported; will see if I can find a supported hardware, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28903 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2009-01-14 21:08:37 +00:00
parent 7a6bda7716
commit 40890e97b3
20 changed files with 3959 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
#ifndef POWER_MANAGMENT_H
#define POWER_MANAGMENT_H
#include <Drivers.h>
// io controls
enum {
// ioctl response with kMagicFreqID
IDENTIFY_DEVICE = B_DEVICE_OP_CODES_END + 20001,
// CPU Frequence:
// get a list of freq_info, the list is terminated with a element with
// frequency = 0
GET_CPU_FREQ_STATES = B_DEVICE_OP_CODES_END + 20005,
// get and set a freq_info
GET_CURENT_CPU_FREQ_STATE,
SET_CPU_FREQ_STATE,
// start watching for frequency changes, ioctl blocks until the frequency
// has changed
WATCH_CPU_FREQ,
// stop all watching ioctl, ioctl return B_ERROR
STOP_WATCHING_CPU_FREQ
};
// CPU Frequence:
// magic id returned by IDENTIFY_DEVICE
const uint32 kMagicFreqID = 48921;
#define MAX_CPU_FREQUENCY_STATES 10
typedef struct {
uint16 frequency; // [Mhz]
uint16 volts;
uint16 id;
int power;
} freq_info;
#endif