aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/devfreq/governor.h
diff options
context:
space:
mode:
authorDmitry Osipenko <digetx@gmail.com>2019-11-05 00:56:14 +0300
committerChanwoo Choi <cw00.choi@samsung.com>2019-11-06 12:04:01 +0900
commit5c0f6c79595760c9e366c3517314051af530e3e6 (patch)
tree47f8943363f826ff6882136883d0aa13aafe2cef /drivers/devfreq/governor.h
parentPM / devfreq: tegra30: Use kHz units for dependency threshold (diff)
downloadlinux-dev-5c0f6c79595760c9e366c3517314051af530e3e6.tar.xz
linux-dev-5c0f6c79595760c9e366c3517314051af530e3e6.zip
PM / devfreq: Add new interrupt_driven flag for governors
Currently interrupt-driven governors (like NVIDIA Tegra30 ACTMON governor) are used to set polling_ms=0 in order to avoid periodic polling of device status by devfreq core. This means that polling interval can't be changed by userspace for such governors. The new governor flag allows interrupt-driven governors to convey that devfreq core shouldn't perform polling of device status and thus generic devfreq polling interval could be supported by these governors now. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/devfreq/governor.h')
-rw-r--r--drivers/devfreq/governor.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/devfreq/governor.h b/drivers/devfreq/governor.h
index bbe5ff9fcecf..dc7533ccc3db 100644
--- a/drivers/devfreq/governor.h
+++ b/drivers/devfreq/governor.h
@@ -31,6 +31,8 @@
* @name: Governor's name
* @immutable: Immutable flag for governor. If the value is 1,
* this govenror is never changeable to other governor.
+ * @interrupt_driven: Devfreq core won't schedule polling work for this
+ * governor if value is set to 1.
* @get_target_freq: Returns desired operating frequency for the device.
* Basically, get_target_freq will run
* devfreq_dev_profile.get_dev_status() to get the
@@ -49,6 +51,7 @@ struct devfreq_governor {
const char name[DEVFREQ_NAME_LEN];
const unsigned int immutable;
+ const unsigned int interrupt_driven;
int (*get_target_freq)(struct devfreq *this, unsigned long *freq);
int (*event_handler)(struct devfreq *devfreq,
unsigned int event, void *data);