From: Vivek Gautam <gautam.vivek@samsung.com>
To: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
linux-samsung-soc@vger.kernel.org, gregkh@linuxfoundation.org,
balbi@ti.com, sarah.a.sharp@linux.intel.com,
kgene.kim@samsung.com, dianders@chromium.org,
sylvester.nawrocki@gmail.com, tomasz.figa@gmail.com
Subject: [PATCH 1/4] usb: xhci: Enable runtime pm in xhci-plat
Date: Mon, 28 Jan 2013 17:12:25 +0530 [thread overview]
Message-ID: <1359373348-18320-2-git-send-email-gautam.vivek@samsung.com> (raw)
In-Reply-To: <1359373348-18320-1-git-send-email-gautam.vivek@samsung.com>
By enabling runtime pm in this driver is allows users of xhci-plat to
enter into runtime pm. This is not full runtime pm support (AKA
xhci-plat doesn't actually power anything off when in runtime suspend
mode) but just basic enablement.
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
---
drivers/usb/host/xhci-plat.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index df90fe5..6ad7cfb 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -139,6 +139,10 @@ static int xhci_plat_probe(struct platform_device *pdev)
goto dealloc_usb2_hcd;
}
+ pm_runtime_set_active(&pdev->dev);
+ pm_runtime_enable(&pdev->dev);
+ pm_runtime_forbid(&pdev->dev);
+
/*
* Set the xHCI pointer before xhci_plat_setup() (aka hcd_driver.reset)
* is called by usb_add_hcd().
@@ -149,10 +153,13 @@ static int xhci_plat_probe(struct platform_device *pdev)
if (ret)
goto put_usb3_hcd;
+ pm_runtime_allow(&pdev->dev);
+
return 0;
put_usb3_hcd:
usb_put_hcd(xhci->shared_hcd);
+ pm_runtime_disable(&pdev->dev);
dealloc_usb2_hcd:
usb_remove_hcd(hcd);
@@ -174,6 +181,8 @@ static int xhci_plat_remove(struct platform_device *dev)
struct usb_hcd *hcd = platform_get_drvdata(dev);
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
+ pm_runtime_disable(&dev->dev);
+
usb_remove_hcd(xhci->shared_hcd);
usb_put_hcd(xhci->shared_hcd);
--
1.7.6.5
next prev parent reply other threads:[~2013-01-28 11:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-28 11:42 [PATCH 0/4] usb: dwc3/xhci: Enable runtime power management Vivek Gautam
2013-01-28 11:42 ` Vivek Gautam [this message]
2013-01-28 11:42 ` [PATCH 2/4] USB: dwc3: Adjust runtime pm the dwc3 driver to allow runtime suspend Vivek Gautam
2013-01-28 11:45 ` Felipe Balbi
2013-01-28 13:36 ` Vivek Gautam
2013-02-27 8:06 ` Felipe Balbi
2013-02-27 8:53 ` Vivek Gautam
2013-01-28 11:42 ` [PATCH 3/4] usb: dwc3: exynos: Enable runtime power management Vivek Gautam
2013-01-28 11:47 ` Felipe Balbi
2013-01-28 11:58 ` Vivek Gautam
2013-01-28 12:12 ` Felipe Balbi
2013-01-28 12:27 ` Vivek Gautam
2013-01-28 12:29 ` Felipe Balbi
2013-01-28 11:42 ` [PATCH 4/4] usb: phy: samsung: Enable runtime power management on samsung-usb3 Vivek Gautam
2013-01-28 12:09 ` Felipe Balbi
2013-01-28 13:04 ` Vivek Gautam
2013-01-28 13:07 ` Felipe Balbi
2013-01-28 13:24 ` Vivek Gautam
2013-01-28 13:25 ` Felipe Balbi
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=1359373348-18320-2-git-send-email-gautam.vivek@samsung.com \
--to=gautam.vivek@samsung.com \
--cc=balbi@ti.com \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=kgene.kim@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sarah.a.sharp@linux.intel.com \
--cc=sylvester.nawrocki@gmail.com \
--cc=tomasz.figa@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®