|
@@ -427,6 +427,34 @@ int devfreq_remove_device(struct devfreq *devfreq)
|
|
|
}
|
|
|
EXPORT_SYMBOL(devfreq_remove_device);
|
|
|
|
|
|
+/**
|
|
|
+ * devfreq_suspend_device() - Suspend devfreq of a device.
|
|
|
+ * @devfreq: the devfreq instance to be suspended
|
|
|
+ */
|
|
|
+int devfreq_suspend_device(struct devfreq *devfreq)
|
|
|
+{
|
|
|
+ if (!devfreq)
|
|
|
+ return -EINVAL;
|
|
|
+
|
|
|
+ return devfreq->governor->event_handler(devfreq,
|
|
|
+ DEVFREQ_GOV_SUSPEND, NULL);
|
|
|
+}
|
|
|
+EXPORT_SYMBOL(devfreq_suspend_device);
|
|
|
+
|
|
|
+/**
|
|
|
+ * devfreq_resume_device() - Resume devfreq of a device.
|
|
|
+ * @devfreq: the devfreq instance to be resumed
|
|
|
+ */
|
|
|
+int devfreq_resume_device(struct devfreq *devfreq)
|
|
|
+{
|
|
|
+ if (!devfreq)
|
|
|
+ return -EINVAL;
|
|
|
+
|
|
|
+ return devfreq->governor->event_handler(devfreq,
|
|
|
+ DEVFREQ_GOV_RESUME, NULL);
|
|
|
+}
|
|
|
+EXPORT_SYMBOL(devfreq_resume_device);
|
|
|
+
|
|
|
static ssize_t show_governor(struct device *dev,
|
|
|
struct device_attribute *attr, char *buf)
|
|
|
{
|