summaryrefslogtreecommitdiff
path: root/drivers/devfreq
diff options
context:
space:
mode:
authorSaravana Kannan <skannan@codeaurora.org>2014-08-07 20:04:45 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:03:54 -0700
commit6be4cb0755b900fac5322b9ab8b32e6c7c504e8d (patch)
tree225bd4437c915873cdba60ff9a6d52bf73c23f4b /drivers/devfreq
parentd30f7c66071c860b8adbff7c24f5f5c69e0402de (diff)
PM / devfreq: devbw: Add suspend/resume APIs
Absence of traffic is guaranteed when the device sitting behind a devbw device is suspended. In such cases, it is a waste of power to make non-zero bandwidth votes or to scale the devbw device. So, provide APIs to suspend/resume the devbw device as needed. Change-Id: Id58072aec7a9710eb917f248d9b9bd08d3a1ec6a Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
Diffstat (limited to 'drivers/devfreq')
-rw-r--r--drivers/devfreq/devfreq_devbw.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/devfreq/devfreq_devbw.c b/drivers/devfreq/devfreq_devbw.c
index 091238f253e1..b6b87fc29255 100644
--- a/drivers/devfreq/devfreq_devbw.c
+++ b/drivers/devfreq/devfreq_devbw.c
@@ -214,11 +214,6 @@ int devfreq_add_devbw(struct device *dev)
return 0;
}
-static int devfreq_devbw_probe(struct platform_device *pdev)
-{
- return devfreq_add_devbw(&pdev->dev);
-}
-
int devfreq_remove_devbw(struct device *dev)
{
struct dev_data *d = dev_get_drvdata(dev);
@@ -227,6 +222,23 @@ int devfreq_remove_devbw(struct device *dev)
return 0;
}
+int devfreq_suspend_devbw(struct device *dev)
+{
+ struct dev_data *d = dev_get_drvdata(dev);
+ return devfreq_suspend_device(d->df);
+}
+
+int devfreq_resume_devbw(struct device *dev)
+{
+ struct dev_data *d = dev_get_drvdata(dev);
+ return devfreq_resume_device(d->df);
+}
+
+static int devfreq_devbw_probe(struct platform_device *pdev)
+{
+ return devfreq_add_devbw(&pdev->dev);
+}
+
static int devfreq_devbw_remove(struct platform_device *pdev)
{
return devfreq_remove_devbw(&pdev->dev);