| 65 | } |
| 66 | |
| 67 | rt_err_t rt_pci_enable_wake(struct rt_pci_device *pdev, |
| 68 | enum rt_pci_power state, rt_bool_t enable) |
| 69 | { |
| 70 | if (!pdev || state >= RT_PCI_PME_MAX) |
| 71 | { |
| 72 | return -RT_EINVAL; |
| 73 | } |
| 74 | |
| 75 | if (enable) |
| 76 | { |
| 77 | if (rt_pci_pme_capable(pdev, state) || |
| 78 | rt_pci_pme_capable(pdev, RT_PCI_D3COLD)) |
| 79 | { |
| 80 | rt_pci_pme_active(pdev, RT_EOK); |
| 81 | } |
| 82 | } |
| 83 | else |
| 84 | { |
| 85 | rt_pci_pme_active(pdev, RT_FALSE); |
| 86 | } |
| 87 | |
| 88 | return RT_EOK; |
| 89 | } |
| 90 | |
| 91 | static void pci_pme_active(struct rt_pci_device *pdev, rt_bool_t enable) |
| 92 | { |
no test coverage detected