summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-07-07 17:59:03 +0200
committerPeter Wu <peter@lekensteyn.nl>2016-07-07 18:28:45 +0200
commit478bd811ac82db5297527645fa09ead7149fec81 (patch)
tree2b1259165e8605c929e15229b65fd6f2b9e690d0
parent59062846dc7e56945fc9c9b61e8b2aa61b41735b (diff)
downloadlinux-478bd811ac82db5297527645fa09ead7149fec81.tar.gz
PCI: export pci_bridge_d3_possible
Allow the nouveau driver to find out whether the bridge can put itself in the D3cold state or whether it should use a specific DSM method to achieve the same result. Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Peter Wu <peter@lekensteyn.nl>
-rw-r--r--drivers/pci/pci.c3
-rw-r--r--include/linux/pci.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 9ff7183e25a2..714701b7775f 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2178,7 +2178,7 @@ void pci_config_pm_runtime_put(struct pci_dev *pdev)
* This function checks if it is possible to move the bridge to D3.
* Currently we only allow D3 for recent enough PCIe ports.
*/
-static bool pci_bridge_d3_possible(struct pci_dev *bridge)
+bool pci_bridge_d3_possible(struct pci_dev *bridge)
{
unsigned int year;
@@ -2207,6 +2207,7 @@ static bool pci_bridge_d3_possible(struct pci_dev *bridge)
return false;
}
+EXPORT_SYMBOL_GPL(pci_bridge_d3_possible);
static int pci_dev_check_d3cold(struct pci_dev *dev, void *data)
{
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 0a1a9e30359c..f19761d14b2c 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1088,6 +1088,7 @@ int pci_back_from_sleep(struct pci_dev *dev);
bool pci_dev_run_wake(struct pci_dev *dev);
bool pci_check_pme_status(struct pci_dev *dev);
void pci_pme_wakeup_bus(struct pci_bus *bus);
+bool pci_bridge_d3_possible(struct pci_dev *bridge);
void pci_d3cold_enable(struct pci_dev *dev);
void pci_d3cold_disable(struct pci_dev *dev);