* [PATCH RESEND 1/1]usb: host: xhci-plat: forbid runtime pm conditionally
@ 2021-01-08 9:45 Peter Chen
0 siblings, 0 replies; only message in thread
From: Peter Chen @ 2021-01-08 9:45 UTC (permalink / raw)
To: mathias.nyman; +Cc: linux-usb, gregkh, linux-imx, Peter Chen
Some users may want to enable runtime pm by default, using the quirk
to judge it.
Reviewed-by: Jun Li <jun.li@nxp.com>
Reviewed-by: Ran Wang <ran.wang_1@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
drivers/usb/host/xhci-plat.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 3ff84a489ce5..00f98243f6cf 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -355,7 +355,8 @@ static int xhci_plat_probe(struct platform_device *pdev)
* Prevent runtime pm from being on as default, users should enable
* runtime pm using power/control in sysfs.
*/
- pm_runtime_forbid(&pdev->dev);
+ if (!(xhci->quirks & XHCI_DEFAULT_PM_RUNTIME_ALLOW))
+ pm_runtime_forbid(&pdev->dev);
return 0;
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-08 9:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-08 9:45 [PATCH RESEND 1/1]usb: host: xhci-plat: forbid runtime pm conditionally Peter Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).