}
}
+/**
+ * pci_power_up - Put the given device into D0
+ * @dev: PCI device to power up
+ */
+int pci_power_up(struct pci_dev *dev)
+{
+ __pci_start_power_transition(dev, PCI_D0);
+ return pci_raw_set_power_state(dev, PCI_D0);
+}
+
/**
* __pci_dev_set_current_state - Set current state of a PCI device
* @dev: Device to handle
if (dev->current_state == state)
return 0;
+ if (state == PCI_D0)
+ return pci_power_up(dev);
+
/*
* This device is quirked not to be put into D3, so don't put it in
* D3
if (state >= PCI_D3hot && (dev->dev_flags & PCI_DEV_FLAGS_NO_D3))
return 0;
- __pci_start_power_transition(dev, state);
-
/*
* To put device in D3cold, we put device into D3hot in native
* way, then put device into D3cold with platform ops
}
EXPORT_SYMBOL(pci_set_power_state);
-/**
- * pci_power_up - Put the given device into D0 forcibly
- * @dev: PCI device to power up
- */
-void pci_power_up(struct pci_dev *dev)
-{
- __pci_start_power_transition(dev, PCI_D0);
- pci_raw_set_power_state(dev, PCI_D0);
-}
-
/**
* pci_choose_state - Choose the power state of a PCI device
* @dev: PCI device to be suspended
int pci_set_platform_pm(const struct pci_platform_pm_ops *ops);
void pci_update_current_state(struct pci_dev *dev, pci_power_t state);
void pci_refresh_power_state(struct pci_dev *dev);
-void pci_power_up(struct pci_dev *dev);
+int pci_power_up(struct pci_dev *dev);
void pci_disable_enabled_device(struct pci_dev *dev);
int pci_finish_runtime_suspend(struct pci_dev *dev);
void pcie_clear_root_pme_status(struct pci_dev *dev);