All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Chen <peter.chen@nxp.com>
To: mathias.nyman@intel.com
Cc: linux-usb@vger.kernel.org, gregkh@linuxfoundation.org,
	linux-imx@nxp.com, jun.li@nxp.com,
	Peter Chen <peter.chen@nxp.com>
Subject: [PATCH 2/2] usb: host: xhci-plat: forbid runtime pm conditionally
Date: Thu, 22 Oct 2020 11:01:33 +0800	[thread overview]
Message-ID: <20201022030133.19528-2-peter.chen@nxp.com> (raw)
In-Reply-To: <20201022030133.19528-1-peter.chen@nxp.com>

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 aa2d35f98200..effb4f0586ae 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -351,7 +351,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


  reply	other threads:[~2020-10-22  3:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22  3:01 [PATCH 1/2] usb: host: add XHCI_CDNS_HOST flag Peter Chen
2020-10-22  3:01 ` Peter Chen [this message]
2020-10-22  6:48 ` Roger Quadros
2020-10-22  7:17   ` Peter Chen
2020-10-26 15:02 ` Mathias Nyman
2020-10-27  1:50   ` Peter Chen
2020-10-27  8:33     ` Mathias Nyman
2020-10-27  9:50       ` Peter Chen
2020-10-28  7:02         ` Peter Chen
2020-10-30 23:14           ` Peter Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201022030133.19528-2-peter.chen@nxp.com \
    --to=peter.chen@nxp.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jun.li@nxp.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.