diff options
author | Ingo Molnar <mingo@kernel.org> | 2023-10-03 09:32:25 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2023-10-03 09:32:25 +0200 |
commit | de80193308f43d3ae52cd3561e8ba77cd1437311 (patch) | |
tree | 3960ff42c407370dfd8c114e5b828bdece9cf425 /drivers/usb/cdns3/core.c | |
parent | 54aee5f15b83437f23b2b2469bcf21bdd9823916 (diff) | |
parent | 8a749fd1a8720d4619c91c8b6e7528c0a355c0aa (diff) |
Merge tag 'v6.6-rc4' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/usb/cdns3/core.c')
-rw-r--r-- | drivers/usb/cdns3/core.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c index dbcdf3b24b47..33548771a0d3 100644 --- a/drivers/usb/cdns3/core.c +++ b/drivers/usb/cdns3/core.c @@ -14,6 +14,7 @@ #include <linux/dma-mapping.h> #include <linux/module.h> #include <linux/kernel.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/interrupt.h> #include <linux/io.h> @@ -522,9 +523,8 @@ int cdns_suspend(struct cdns *cdns) } EXPORT_SYMBOL_GPL(cdns_suspend); -int cdns_resume(struct cdns *cdns, u8 set_active) +int cdns_resume(struct cdns *cdns) { - struct device *dev = cdns->dev; enum usb_role real_role; bool role_changed = false; int ret = 0; @@ -556,15 +556,23 @@ int cdns_resume(struct cdns *cdns, u8 set_active) if (cdns->roles[cdns->role]->resume) cdns->roles[cdns->role]->resume(cdns, cdns_power_is_lost(cdns)); + return 0; +} +EXPORT_SYMBOL_GPL(cdns_resume); + +void cdns_set_active(struct cdns *cdns, u8 set_active) +{ + struct device *dev = cdns->dev; + if (set_active) { pm_runtime_disable(dev); pm_runtime_set_active(dev); pm_runtime_enable(dev); } - return 0; + return; } -EXPORT_SYMBOL_GPL(cdns_resume); +EXPORT_SYMBOL_GPL(cdns_set_active); #endif /* CONFIG_PM_SLEEP */ MODULE_AUTHOR("Peter Chen <peter.chen@nxp.com>"); |