From: Vinod Koul <vkoul@kernel.org>
To: Mathias Nyman <mathias.nyman@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-arm-msm@vger.kernel.org,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Vinod Koul <vkoul@kernel.org>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
Christian Lamparter <chunkeey@googlemail.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v6 1/5] usb: xhci: export few functions
Date: Mon, 13 Jan 2020 14:10:01 +0530 [thread overview]
Message-ID: <20200113084005.849071-2-vkoul@kernel.org> (raw)
In-Reply-To: <20200113084005.849071-1-vkoul@kernel.org>
Export the xhci_pci_setup(), xhci_pci_probe() xhci_pci_remove(),
xhci_pci_suspend() and xhci_pci_resume() functions as they would be used
by renesas-xhci driver.
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
drivers/usb/host/xhci-pci.c | 18 +++++++++++-------
drivers/usb/host/xhci-pci.h | 18 ++++++++++++++++++
2 files changed, 29 insertions(+), 7 deletions(-)
create mode 100644 drivers/usb/host/xhci-pci.h
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index a0025d23b257..5115871b50af 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -15,6 +15,7 @@
#include "xhci.h"
#include "xhci-trace.h"
+#include "xhci-pci.h"
#define SSIC_PORT_NUM 2
#define SSIC_PORT_CFG2 0x880c
@@ -60,8 +61,6 @@ static const char hcd_name[] = "xhci_hcd";
static struct hc_driver __read_mostly xhci_pci_hc_driver;
-static int xhci_pci_setup(struct usb_hcd *hcd);
-
static const struct xhci_driver_overrides xhci_pci_overrides __initconst = {
.reset = xhci_pci_setup,
};
@@ -282,7 +281,7 @@ static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { }
#endif /* CONFIG_ACPI */
/* called during probe() after chip reset completes */
-static int xhci_pci_setup(struct usb_hcd *hcd)
+int xhci_pci_setup(struct usb_hcd *hcd)
{
struct xhci_hcd *xhci;
struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
@@ -307,12 +306,13 @@ static int xhci_pci_setup(struct usb_hcd *hcd)
/* Find any debug ports */
return xhci_pci_reinit(xhci, pdev);
}
+EXPORT_SYMBOL_GPL(xhci_pci_setup);
/*
* We need to register our own PCI probe function (instead of the USB core's
* function) in order to create a second roothub under xHCI.
*/
-static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
+int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
{
int retval;
struct xhci_hcd *xhci;
@@ -378,8 +378,9 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
pm_runtime_put_noidle(&dev->dev);
return retval;
}
+EXPORT_SYMBOL_GPL(xhci_pci_probe);
-static void xhci_pci_remove(struct pci_dev *dev)
+void xhci_pci_remove(struct pci_dev *dev)
{
struct xhci_hcd *xhci;
@@ -401,6 +402,7 @@ static void xhci_pci_remove(struct pci_dev *dev)
usb_hcd_pci_remove(dev);
}
+EXPORT_SYMBOL_GPL(xhci_pci_remove);
#ifdef CONFIG_PM
/*
@@ -457,7 +459,7 @@ static void xhci_pme_quirk(struct usb_hcd *hcd)
readl(reg);
}
-static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
+int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
{
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
@@ -482,8 +484,9 @@ static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
return ret;
}
+EXPORT_SYMBOL_GPL(xhci_pci_suspend);
-static int xhci_pci_resume(struct usb_hcd *hcd, bool hibernated)
+int xhci_pci_resume(struct usb_hcd *hcd, bool hibernated)
{
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
@@ -519,6 +522,7 @@ static int xhci_pci_resume(struct usb_hcd *hcd, bool hibernated)
retval = xhci_resume(xhci, hibernated);
return retval;
}
+EXPORT_SYMBOL_GPL(xhci_pci_resume);
#endif /* CONFIG_PM */
/*-------------------------------------------------------------------------*/
diff --git a/drivers/usb/host/xhci-pci.h b/drivers/usb/host/xhci-pci.h
new file mode 100644
index 000000000000..587f71dc5e35
--- /dev/null
+++ b/drivers/usb/host/xhci-pci.h
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/* Copyright (C) 2008 Intel Corp. */
+
+#ifndef XHCI_PCI_H
+#define XHCI_PCI_H
+
+int xhci_pci_setup(struct usb_hcd *hcd);
+
+int xhci_pci_probe(struct pci_dev *pdev,
+ const struct pci_device_id *id);
+
+void xhci_pci_remove(struct pci_dev *dev);
+
+int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup);
+
+int xhci_pci_resume(struct usb_hcd *hcd, bool hibernated);
+
+#endif
--
2.24.1
next prev parent reply other threads:[~2020-01-13 8:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-13 8:40 [PATCH v6 0/5] usb: xhci: Add support for Renesas USB controllers Vinod Koul
2020-01-13 8:40 ` Vinod Koul [this message]
2020-01-13 8:40 ` [PATCH v6 2/5] usb: renesas-xhci: Add the renesas xhci driver Vinod Koul
2020-01-13 8:40 ` [PATCH v6 3/5] usb: renesas-xhci: Add ROM loader for uPD720201 Vinod Koul
2020-01-13 8:40 ` [PATCH v6 4/5] usb: renesas-xhci: allow multiple firmware versions Vinod Koul
2020-01-13 8:40 ` [PATCH v6 5/5] usb: xhci: provide a debugfs hook for erasing rom Vinod Koul
2020-01-13 20:09 ` [PATCH v6 0/5] usb: xhci: Add support for Renesas USB controllers John Stultz
2020-01-13 20:33 ` Christian Lamparter
2020-01-21 6:46 ` Vinod Koul
2020-01-21 20:26 ` Christian Lamparter
2020-01-24 21:38 ` Christian Lamparter
2020-01-25 5:32 ` Vinod Koul
2020-01-30 17:07 ` Mathias Nyman
2020-01-31 8:40 ` Vinod Koul
2020-02-04 16:33 ` Mathias Nyman
2020-03-12 6:56 ` Vinod Koul
2020-01-31 15:47 ` Alan Stern
2020-03-10 11:55 ` Vinod Koul
2020-01-26 0:11 ` Andreas Böhler
2020-01-26 13:07 ` Christian Lamparter
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=20200113084005.849071-2-vkoul@kernel.org \
--to=vkoul@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=chunkeey@googlemail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=yoshihiro.shimoda.uh@renesas.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;
as well as URLs for NNTP newsgroup(s).