Commit d2e4b5a2 authored by Mani Sadhasivam's avatar Mani Sadhasivam
Browse files

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: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
parent 86c3bfb1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment