Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f696a797 authored by Yue Ma's avatar Yue Ma
Browse files

cnss2: 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.

Change-Id: I396e51e1a411f06eb7f6c07c60919bb6c5716fe5
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent 9ca28587
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2151,6 +2151,11 @@ static int cnss_probe(struct platform_device *plat_dev)

	register_pm_notifier(&cnss_pm_notifier);

	ret = device_init_wakeup(&plat_dev->dev, true);
	if (ret)
		cnss_pr_err("Failed to init platform device wakeup source, err = %d\n",
			    ret);

	cnss_pr_info("Platform driver probed successfully.\n");

	return 0;
@@ -2182,6 +2187,7 @@ static int cnss_remove(struct platform_device *plat_dev)
{
	struct cnss_plat_data *plat_priv = platform_get_drvdata(plat_dev);

	device_init_wakeup(&plat_dev->dev, false);
	unregister_pm_notifier(&cnss_pm_notifier);
	del_timer(&plat_priv->fw_boot_timer);
	cnss_debugfs_destroy(plat_priv);