summaryrefslogtreecommitdiff
path: root/drivers/rpmsg
diff options
context:
space:
mode:
authorAnson Huang <anson.huang@nxp.com>2019-03-23 11:56:47 +0800
committerLi Jun <jun.li@nxp.com>2019-03-23 13:21:33 +0800
commitb6da70252b3296f819310f2465e2a6e79e90efa7 (patch)
treecd92898904a9fa4dcd335b9380f33b34e43003dc /drivers/rpmsg
parent25745530ffeae986b220078aac0e6c24e8bdb98e (diff)
MLK-21244 rpmsg: imx: move pm ops to noirq phrase
Some rpmsg user may require rpmsg resume before the user start handle its irq, e.g the typec controller use a GPIO as irq and use rpmsg to get event status, so move imx rpmsg power management ops to noirq phrase. Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com> Tested-by: Clark Wang <xiaoning.wang@nxp.com> Signed-off-by: Anson Huang <anson.huang@nxp.com> Signed-off-by: Li Jun <jun.li@nxp.com>
Diffstat (limited to 'drivers/rpmsg')
-rw-r--r--drivers/rpmsg/imx_rpmsg.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/rpmsg/imx_rpmsg.c b/drivers/rpmsg/imx_rpmsg.c
index 9dfb49881a31..8d2f2dde40eb 100644
--- a/drivers/rpmsg/imx_rpmsg.c
+++ b/drivers/rpmsg/imx_rpmsg.c
@@ -772,7 +772,7 @@ vdev_err_out:
}
#ifdef CONFIG_PM_SLEEP
-static int imx_rpmsg_suspend(struct device *dev)
+static int imx_rpmsg_noirq_suspend(struct device *dev)
{
struct imx_rpmsg_vproc *rpdev = dev_get_drvdata(dev);
@@ -782,7 +782,7 @@ static int imx_rpmsg_suspend(struct device *dev)
return 0;
}
-static int imx_rpmsg_resume(struct device *dev)
+static int imx_rpmsg_noirq_resume(struct device *dev)
{
struct imx_rpmsg_vproc *rpdev = dev_get_drvdata(dev);
int ret;
@@ -799,7 +799,10 @@ static int imx_rpmsg_resume(struct device *dev)
}
#endif
-static SIMPLE_DEV_PM_OPS(imx_rpmsg_pm_ops, imx_rpmsg_suspend, imx_rpmsg_resume);
+static const struct dev_pm_ops imx_rpmsg_pm_ops = {
+ SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(imx_rpmsg_noirq_suspend,
+ imx_rpmsg_noirq_resume)
+};
static struct platform_driver imx_rpmsg_driver = {
.driver = {