aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-10-22 19:09:12 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-10-22 19:09:12 -0400
commitae0fb4b72c8db7e6c4ef32bc58a43a759ad414b9 (patch)
tree41f5b9014613d865ca69fe25ceb8fcc05c22b2f1 /drivers/mtd
parent021c870ba4ab4bc9a23d5db4e324f50f26d8ab24 (diff)
PM / QoS: Introduce PM QoS device flags support
Modify the device PM QoS core code to support PM QoS flags requests. First, add a new field of type struct pm_qos_flags called "flags" to struct dev_pm_qos for representing the list of PM QoS flags requests for the given device. Accordingly, add a new "type" field to struct dev_pm_qos_request (along with an enum for representing request types) and a new member called "flr" to its data union for representig flags requests. Second, modify dev_pm_qos_add_request(), dev_pm_qos_update_request(), the internal routine apply_constraint() used by them and their existing callers to cover flags requests as well as latency requests. In particular, dev_pm_qos_add_request() gets a new argument called "type" for specifying the type of a request to be added. Finally, introduce two routines, __dev_pm_qos_flags() and dev_pm_qos_flags(), allowing their callers to check which PM QoS flags have been requested for the given device (the caller is supposed to pass the mask of flags to check as the routine's second argument and examine its return value for the result). Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Jean Pihet <j-pihet@ti.com> Reviewed-by: mark gross <markgross@thegnar.org>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/sh_flctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c
index 4fbfe96e37a..f48ac5d80bb 100644
--- a/drivers/mtd/nand/sh_flctl.c
+++ b/drivers/mtd/nand/sh_flctl.c
@@ -727,7 +727,9 @@ static void flctl_select_chip(struct mtd_info *mtd, int chipnr)
727 727
728 if (!flctl->qos_request) { 728 if (!flctl->qos_request) {
729 ret = dev_pm_qos_add_request(&flctl->pdev->dev, 729 ret = dev_pm_qos_add_request(&flctl->pdev->dev,
730 &flctl->pm_qos, 100); 730 &flctl->pm_qos,
731 DEV_PM_QOS_LATENCY,
732 100);
731 if (ret < 0) 733 if (ret < 0)
732 dev_err(&flctl->pdev->dev, 734 dev_err(&flctl->pdev->dev,
733 "PM QoS request failed: %d\n", ret); 735 "PM QoS request failed: %d\n", ret);