diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-04-13 15:00:45 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-04-13 15:00:45 -0500 |
commit | f146da840f4b74e87fd1bd20958a521abb92a9b8 (patch) | |
tree | 2146fed499313650b3a90b3adb636c9b27178fba /tdecore/tdehardwaredevices.h | |
parent | 0194f444344d973a905edf3917533e89fb6d2244 (diff) | |
download | tdelibs-f146da840f4b74e87fd1bd20958a521abb92a9b8.tar.gz tdelibs-f146da840f4b74e87fd1bd20958a521abb92a9b8.zip |
Add CPU governor detection and setting capability
Diffstat (limited to 'tdecore/tdehardwaredevices.h')
-rw-r--r-- | tdecore/tdehardwaredevices.h | 38 |
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; }; |