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

Commit 973f60a4 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "wil6210: Enable run-time PM for all power management states"

parents 22f42cd2 b7f1bce3
Loading
Loading
Loading
Loading
+2 −8
Original line number Original line Diff line number Diff line
@@ -33,10 +33,8 @@ module_param(ftm_mode, bool, 0444);
MODULE_PARM_DESC(ftm_mode, " Set factory test mode, default - false");
MODULE_PARM_DESC(ftm_mode, " Set factory test mode, default - false");


#ifdef CONFIG_PM
#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int wil6210_pm_notify(struct notifier_block *notify_block,
static int wil6210_pm_notify(struct notifier_block *notify_block,
			     unsigned long mode, void *unused);
			     unsigned long mode, void *unused);
#endif /* CONFIG_PM_SLEEP */
#endif /* CONFIG_PM */
#endif /* CONFIG_PM */


static
static
@@ -354,7 +352,6 @@ static int wil_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
	}
	}


#ifdef CONFIG_PM
#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
	wil->pm_notify.notifier_call = wil6210_pm_notify;
	wil->pm_notify.notifier_call = wil6210_pm_notify;
	rc = register_pm_notifier(&wil->pm_notify);
	rc = register_pm_notifier(&wil->pm_notify);
	if (rc)
	if (rc)
@@ -362,7 +359,6 @@ static int wil_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
		 * be prevented in a later phase if needed
		 * be prevented in a later phase if needed
		 */
		 */
		wil_err(wil, "register_pm_notifier failed: %d\n", rc);
		wil_err(wil, "register_pm_notifier failed: %d\n", rc);
#endif /* CONFIG_PM_SLEEP */
#endif /* CONFIG_PM */
#endif /* CONFIG_PM */


	wil6210_debugfs_init(wil);
	wil6210_debugfs_init(wil);
@@ -397,9 +393,7 @@ static void wil_pcie_remove(struct pci_dev *pdev)
	wil_dbg_misc(wil, "pcie_remove\n");
	wil_dbg_misc(wil, "pcie_remove\n");


#ifdef CONFIG_PM
#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
	unregister_pm_notifier(&wil->pm_notify);
	unregister_pm_notifier(&wil->pm_notify);
#endif /* CONFIG_PM_SLEEP */
#endif /* CONFIG_PM */
#endif /* CONFIG_PM */


	wil_pm_runtime_forbid(wil);
	wil_pm_runtime_forbid(wil);
@@ -428,7 +422,6 @@ static const struct pci_device_id wil6210_pcie_ids[] = {
MODULE_DEVICE_TABLE(pci, wil6210_pcie_ids);
MODULE_DEVICE_TABLE(pci, wil6210_pcie_ids);


#ifdef CONFIG_PM
#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP


static int wil6210_suspend(struct device *dev, bool is_runtime)
static int wil6210_suspend(struct device *dev, bool is_runtime)
{
{
@@ -546,7 +539,6 @@ static int wil6210_pm_resume(struct device *dev)
{
{
	return wil6210_resume(dev, false);
	return wil6210_resume(dev, false);
}
}
#endif /* CONFIG_PM_SLEEP */


static int wil6210_pm_runtime_idle(struct device *dev)
static int wil6210_pm_runtime_idle(struct device *dev)
{
{
@@ -578,10 +570,12 @@ static int wil6210_pm_runtime_suspend(struct device *dev)
#endif /* CONFIG_PM */
#endif /* CONFIG_PM */


static const struct dev_pm_ops wil6210_pm_ops = {
static const struct dev_pm_ops wil6210_pm_ops = {
#ifdef CONFIG_PM
	SET_SYSTEM_SLEEP_PM_OPS(wil6210_pm_suspend, wil6210_pm_resume)
	SET_SYSTEM_SLEEP_PM_OPS(wil6210_pm_suspend, wil6210_pm_resume)
	SET_RUNTIME_PM_OPS(wil6210_pm_runtime_suspend,
	SET_RUNTIME_PM_OPS(wil6210_pm_runtime_suspend,
			   wil6210_pm_runtime_resume,
			   wil6210_pm_runtime_resume,
			   wil6210_pm_runtime_idle)
			   wil6210_pm_runtime_idle)
#endif /* CONFIG_PM */
};
};


static struct pci_driver wil6210_driver = {
static struct pci_driver wil6210_driver = {
+0 −2
Original line number Original line Diff line number Diff line
@@ -798,9 +798,7 @@ struct wil6210_priv {
	int fw_calib_result;
	int fw_calib_result;


#ifdef CONFIG_PM
#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
	struct notifier_block pm_notify;
	struct notifier_block pm_notify;
#endif /* CONFIG_PM_SLEEP */
#endif /* CONFIG_PM */
#endif /* CONFIG_PM */


	bool suspend_resp_rcvd;
	bool suspend_resp_rcvd;