diff options
author | Yuanyuan Liu <yuanliu@codeaurora.org> | 2017-06-07 17:39:54 -0700 |
---|---|---|
committer | Yuanyuan Liu <yuanliu@codeaurora.org> | 2017-06-08 10:49:09 -0700 |
commit | e9a0e8404cf7c8ce474f5b5efcbf16a7be7940c1 (patch) | |
tree | e838b376ecc058b9bbf2117f92d7cc54a266655e /drivers | |
parent | eb28d0da158f7bfe2f94b3d1cb003fb7abda0c15 (diff) |
icnss: Enable platform device to be a wakeup source
Currently platform device is not enabled as a wakeup source, so
notifying the PM core for a wakeup event action will be no-op.
Hence enable it during driver probe.
CRs-Fixed: 2058010
Change-Id: Iefe5bcd4b498a9f02fca001ebcf8ad484f443217
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/soc/qcom/icnss.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/soc/qcom/icnss.c b/drivers/soc/qcom/icnss.c index 43d954a0f7c7..73c19eaab4a3 100644 --- a/drivers/soc/qcom/icnss.c +++ b/drivers/soc/qcom/icnss.c @@ -4276,6 +4276,11 @@ static int icnss_probe(struct platform_device *pdev) icnss_debugfs_create(priv); + ret = device_init_wakeup(&priv->pdev->dev, true); + if (ret) + icnss_pr_err("Failed to init platform device wakeup source, err = %d\n", + ret); + penv = priv; icnss_pr_info("Platform driver probed successfully\n"); @@ -4296,6 +4301,8 @@ static int icnss_remove(struct platform_device *pdev) { icnss_pr_info("Removing driver: state: 0x%lx\n", penv->state); + device_init_wakeup(&penv->pdev->dev, false); + icnss_debugfs_destroy(penv); icnss_modem_ssr_unregister_notifier(penv); |