xref: /linux-6.15/drivers/devfreq/Kconfig (revision ce26c5bb)
1a3c98b8bSMyungJoo Hamconfig ARCH_HAS_DEVFREQ
2a3c98b8bSMyungJoo Ham	bool
3a3c98b8bSMyungJoo Ham	depends on ARCH_HAS_OPP
4a3c98b8bSMyungJoo Ham	help
5a3c98b8bSMyungJoo Ham	  Denotes that the architecture supports DEVFREQ. If the architecture
6a3c98b8bSMyungJoo Ham	  supports multiple OPP entries per device and the frequency of the
7a3c98b8bSMyungJoo Ham	  devices with OPPs may be altered dynamically, the architecture
8a3c98b8bSMyungJoo Ham	  supports DEVFREQ.
9a3c98b8bSMyungJoo Ham
10a3c98b8bSMyungJoo Hammenuconfig PM_DEVFREQ
11a3c98b8bSMyungJoo Ham	bool "Generic Dynamic Voltage and Frequency Scaling (DVFS) support"
12a3c98b8bSMyungJoo Ham	depends on PM_OPP && ARCH_HAS_DEVFREQ
13a3c98b8bSMyungJoo Ham	help
14a3c98b8bSMyungJoo Ham	  With OPP support, a device may have a list of frequencies and
15a3c98b8bSMyungJoo Ham	  voltages available. DEVFREQ, a generic DVFS framework can be
16a3c98b8bSMyungJoo Ham	  registered for a device with OPP support in order to let the
17a3c98b8bSMyungJoo Ham	  governor provided to DEVFREQ choose an operating frequency
18a3c98b8bSMyungJoo Ham	  based on the OPP's list and the policy given with DEVFREQ.
19a3c98b8bSMyungJoo Ham
20a3c98b8bSMyungJoo Ham	  Each device may have its own governor and policy. DEVFREQ can
21a3c98b8bSMyungJoo Ham	  reevaluate the device state periodically and/or based on the
22a3c98b8bSMyungJoo Ham	  OPP list changes (each frequency/voltage pair in OPP may be
23a3c98b8bSMyungJoo Ham	  disabled or enabled).
24a3c98b8bSMyungJoo Ham
25a3c98b8bSMyungJoo Ham	  Like some CPUs with CPUFREQ, a device may have multiple clocks.
26a3c98b8bSMyungJoo Ham	  However, because the clock frequencies of a single device are
27a3c98b8bSMyungJoo Ham	  determined by the single device's state, an instance of DEVFREQ
28a3c98b8bSMyungJoo Ham	  is attached to a single device and returns a "representative"
29a3c98b8bSMyungJoo Ham	  clock frequency from the OPP of the device, which is also attached
30a3c98b8bSMyungJoo Ham	  to a device by 1-to-1. The device registering DEVFREQ takes the
31a3c98b8bSMyungJoo Ham	  responsiblity to "interpret" the frequency listed in OPP and
32a3c98b8bSMyungJoo Ham	  to set its every clock accordingly with the "target" callback
33a3c98b8bSMyungJoo Ham	  given to DEVFREQ.
34a3c98b8bSMyungJoo Ham
35a3c98b8bSMyungJoo Hamif PM_DEVFREQ
36a3c98b8bSMyungJoo Ham
37*ce26c5bbSMyungJoo Hamcomment "DEVFREQ Governors"
38*ce26c5bbSMyungJoo Ham
39*ce26c5bbSMyungJoo Hamconfig DEVFREQ_GOV_SIMPLE_ONDEMAND
40*ce26c5bbSMyungJoo Ham	bool "Simple Ondemand"
41*ce26c5bbSMyungJoo Ham	help
42*ce26c5bbSMyungJoo Ham	  Chooses frequency based on the recent load on the device. Works
43*ce26c5bbSMyungJoo Ham	  similar as ONDEMAND governor of CPUFREQ does. A device with
44*ce26c5bbSMyungJoo Ham	  Simple-Ondemand should be able to provide busy/total counter
45*ce26c5bbSMyungJoo Ham	  values that imply the usage rate. A device may provide tuned
46*ce26c5bbSMyungJoo Ham	  values to the governor with data field at devfreq_add_device().
47*ce26c5bbSMyungJoo Ham
48*ce26c5bbSMyungJoo Hamconfig DEVFREQ_GOV_PERFORMANCE
49*ce26c5bbSMyungJoo Ham	bool "Performance"
50*ce26c5bbSMyungJoo Ham	help
51*ce26c5bbSMyungJoo Ham	  Sets the frequency at the maximum available frequency.
52*ce26c5bbSMyungJoo Ham	  This governor always returns UINT_MAX as frequency so that
53*ce26c5bbSMyungJoo Ham	  the DEVFREQ framework returns the highest frequency available
54*ce26c5bbSMyungJoo Ham	  at any time.
55*ce26c5bbSMyungJoo Ham
56*ce26c5bbSMyungJoo Hamconfig DEVFREQ_GOV_POWERSAVE
57*ce26c5bbSMyungJoo Ham	bool "Powersave"
58*ce26c5bbSMyungJoo Ham	help
59*ce26c5bbSMyungJoo Ham	  Sets the frequency at the minimum available frequency.
60*ce26c5bbSMyungJoo Ham	  This governor always returns 0 as frequency so that
61*ce26c5bbSMyungJoo Ham	  the DEVFREQ framework returns the lowest frequency available
62*ce26c5bbSMyungJoo Ham	  at any time.
63*ce26c5bbSMyungJoo Ham
64*ce26c5bbSMyungJoo Hamconfig DEVFREQ_GOV_USERSPACE
65*ce26c5bbSMyungJoo Ham	bool "Userspace"
66*ce26c5bbSMyungJoo Ham	help
67*ce26c5bbSMyungJoo Ham	  Sets the frequency at the user specified one.
68*ce26c5bbSMyungJoo Ham	  This governor returns the user configured frequency if there
69*ce26c5bbSMyungJoo Ham	  has been an input to /sys/devices/.../power/devfreq_set_freq.
70*ce26c5bbSMyungJoo Ham	  Otherwise, the governor does not change the frequnecy
71*ce26c5bbSMyungJoo Ham	  given at the initialization.
72*ce26c5bbSMyungJoo Ham
73a3c98b8bSMyungJoo Hamcomment "DEVFREQ Drivers"
74a3c98b8bSMyungJoo Ham
75a3c98b8bSMyungJoo Hamendif # PM_DEVFREQ
76