diff options
author | Robin Gong <yibin.gong@nxp.com> | 2016-12-21 19:30:06 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | 0b2d22aec381161ea7fd4358e9cd418456845c30 (patch) | |
tree | ed8ee3d07228bab8326f7449bd2683b6a0354e2b /drivers/regulator | |
parent | 352d3a31baa6edcbc4474e3617cdb3c16180013f (diff) |
MLK-13636-2 regulator: pf1550-regulator-rmpsg: enable pm_qos to prevent low power idle
CLKE bit of MU_CR may bring VLS state mess in M4 side, so use pm_qos instead
to prevent i.mx7ulp A7 core enter STOP mode during pf1550 send command by rpmsg
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/pf1550-regulator-rpmsg.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/regulator/pf1550-regulator-rpmsg.c b/drivers/regulator/pf1550-regulator-rpmsg.c index 0bebc7e57c82..a26442ec0dbc 100644 --- a/drivers/regulator/pf1550-regulator-rpmsg.c +++ b/drivers/regulator/pf1550-regulator-rpmsg.c @@ -22,6 +22,7 @@ #include <linux/module.h> #include <linux/of.h> #include <linux/platform_device.h> +#include <linux/pm_qos.h> #include <linux/regulator/driver.h> #include <linux/regulator/machine.h> #include <linux/regulator/of_regulator.h> @@ -66,6 +67,7 @@ struct pf1550_regulator_info { struct device *dev; struct pf1550_regulator_rpmsg *msg; struct completion cmd_complete; + struct pm_qos_request pm_qos_req; struct regulator_desc *regulators; }; @@ -97,8 +99,13 @@ static int pf1550_send_message(struct pf1550_regulator_rpmsg *msg, return -EINVAL; } + pm_qos_add_request(&info->pm_qos_req, PM_QOS_CPU_DMA_LATENCY, 0); + err = rpmsg_send(info->rpdev->ept, (void *)msg, sizeof(struct pf1550_regulator_rpmsg)); + + pm_qos_remove_request(&info->pm_qos_req); + if (err) { dev_err(&info->rpdev->dev, "rpmsg_send failed: %d\n", err); return err; |