]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/cpufreq/intel_pstate.c
cpufreq: intel_pstate: Operation mode control from sysfs
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 5 Jan 2017 01:53:12 +0000 (02:53 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 3 Feb 2017 23:05:31 +0000 (00:05 +0100)
commitfb1fe1041c04ee5ba362cf239e83a7c559beb0f3
tree96b859d52c8d1a11d2a2b8a9d12b02fd2390d9a0
parent0c30b65b3c8e5b8c72f39497aa8c61a662b6bcc0
cpufreq: intel_pstate: Operation mode control from sysfs

Make it possible to change the operation mode of intel_pstate with
the help of a new sysfs attribute called "status".

There are three possible configurations that can be selected using
this attribute:

 "off"     - The driver is not in use at this time.
 "active"  - The driver works as a P-state governor (default).
 "passive" - The driver works as a regular cpufreq one and collaborates
             with the generic cpufreq governors (it sets P-states as
             requested by those governors).  [This is the same mode
             the driver can be started in by passing intel_pstate=passive
             in the kernel command line.]

The current setting is returned by reads from this attribute.  Writing
one of the above strings to it changes the operation mode as indicated
by that string, if possible.

If HW-managed P-states (HWP) feature is enabled, it is not possible
to change the driver's operation mode and attempts to write to this
attribute will fail.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Documentation/cpu-freq/intel-pstate.txt
drivers/cpufreq/intel_pstate.c