PCI: endpoint: Add PME notifier support
Add support to notify the EPF device about the Power Management Event
(PME) received by the EPC device from the Root complex.
Usage:
======
EPC
---
```
static irqreturn_t pcie_ep_irq(int irq, void *data)
{
...
case PCIE_EP_INT_PM_TURNOFF:
pci_epc_pme_notify(epc, PCIE_EP_PM_TURNOFF);
break;
...
}
```
EPF
---
```
static int pci_epf_notifier(struct notifier_block *nb, unsigned long val,
void *data)
{
...
case PME:
pm_state = data;
if (pm_state == PCIE_EP_PM_TURNOFF)
/* Handle PM Turnoff event */
break;
...
}
```
Signed-off-by:
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Loading
Please sign in to comment