summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehardwaredevices.h
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-04-13 15:00:45 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-04-13 15:00:45 -0500
commitf146da840f4b74e87fd1bd20958a521abb92a9b8 (patch)
tree2146fed499313650b3a90b3adb636c9b27178fba /tdecore/tdehardwaredevices.h
parent0194f444344d973a905edf3917533e89fb6d2244 (diff)
downloadtdelibs-f146da840f4b74e87fd1bd20958a521abb92a9b8.tar.gz
tdelibs-f146da840f4b74e87fd1bd20958a521abb92a9b8.zip
Add CPU governor detection and setting capability
Diffstat (limited to 'tdecore/tdehardwaredevices.h')
-rw-r--r--tdecore/tdehardwaredevices.h38
1 files changed, 30 insertions, 8 deletions
diff --git a/tdecore/tdehardwaredevices.h b/tdecore/tdehardwaredevices.h
index c230474a1..a91538896 100644
--- a/tdecore/tdehardwaredevices.h
+++ b/tdecore/tdehardwaredevices.h
@@ -754,55 +754,76 @@ class TDECORE_EXPORT TDECPUDevice : public TDEGenericDevice
*/
TQStringList &availableFrequencies();
+ /**
+ * @return a TQStringList with all available governor policies, if available
+ */
+ TQStringList &availableGovernors();
+
+ /**
+ * @return TRUE if permissions allow the CPU governor to be set, FALSE if not
+ */
+ bool canSetGovernor();
+
+ /**
+ * @param gv a TQString with the new CPU governor policy name
+ */
+ void setGovernor(TQString gv);
+
protected:
/**
- * @param a double with the current CPU frequency in MHz, if available
+ * @param fr a double with the current CPU frequency in MHz, if available
* @internal
*/
void internalSetFrequency(double fr);
/**
- * @param a double with the minimum CPU frequency in MHz, if available
+ * @param fr a double with the minimum CPU frequency in MHz, if available
* @internal
*/
void internalSetMinFrequency(double fr);
/**
- * @param a double with the maximum CPU frequency in MHz, if available
+ * @param fr a double with the maximum CPU frequency in MHz, if available
* @internal
*/
void internalSetMaxFrequency(double fr);
/**
- * @param a double with the transition latency in ns, if available
+ * @param tl a double with the transition latency in ns, if available
* @internal
*/
void internalSetTransitionLatency(double tl);
/**
- * @param a TQString with the current CPU governor policy, if available
+ * @param gr a TQString with the current CPU governor policy, if available
* @internal
*/
void internalSetGovernor(TQString gr);
/**
- * @param a TQString with the current CPU scaling driver, if available
+ * @param dr a TQString with the current CPU scaling driver, if available
* @internal
*/
void internalSetScalingDriver(TQString dr);
/**
- * @param a TQStringList with the IDs of all processors that are dependent on the frequency/power settings of this one, if available
+ * @param dp a TQStringList with the IDs of all processors that are dependent on the frequency/power settings of this one, if available
* @internal
*/
void internalSetDependentProcessors(TQStringList dp);
/**
- * @param a TQStringList with all valid scaling frequencies in Hz, if available
+ * @param af a TQStringList with all valid scaling frequencies in Hz, if available
* @internal
*/
void internalSetAvailableFrequencies(TQStringList af);
+ /**
+ * @param gp a TQStringList with all available governor policies, if available
+ * @internal
+ */
+ void internalSetAvailableGovernors(TQStringList gp);
+
private:
double m_frequency;
double m_minfrequency;
@@ -812,6 +833,7 @@ class TDECORE_EXPORT TDECPUDevice : public TDEGenericDevice
TQString m_scalingdriver;
TQStringList m_tiedprocs;
TQStringList m_frequencies;
+ TQStringList m_governers;
friend class TDEHardwareDevices;
};