MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_pci_enable_wake

Function rt_pci_enable_wake

components/drivers/pci/pme.c:67–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67rt_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
91static void pci_pme_active(struct rt_pci_device *pdev, rt_bool_t enable)
92{

Callers 4

pci_device_pm_opsFunction · 0.85
pci_probeFunction · 0.85
pci_removeFunction · 0.85
pci_shutdownFunction · 0.85

Calls 2

rt_pci_pme_capableFunction · 0.85
rt_pci_pme_activeFunction · 0.85

Tested by

no test coverage detected