diff options
author | Vinod Koul <vkoul@kernel.org> | 2020-01-13 14:10:01 +0530 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2020-02-10 22:59:02 +0000 |
commit | 9477a76866f44fd1994511b981272fe3b6e10bcd (patch) | |
tree | 990e5d98de821ae5fcdab108c750388757b4dd2b | |
parent | 20f14cfca552a65b85fc71b1186881bc55474b1f (diff) |
usb: xhci: export few functions
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>
Signed-off-by: John Stultz <john.stultz@linaro.org>
-rw-r--r-- | drivers/usb/host/xhci-pci.c | 18 | ||||
-rw-r--r-- | drivers/usb/host/xhci-pci.h | 18 |
2 files changed, 29 insertions, 7 deletions
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 4917c5b033fa..d8af38c82e7f 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 @@ put_runtime_pm: 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); @@ -531,6 +534,7 @@ static void xhci_pci_shutdown(struct usb_hcd *hcd) if (xhci->quirks & XHCI_SPURIOUS_WAKEUP) pci_set_power_state(pdev, PCI_D3hot); } +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 |