Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f7046d0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ep_pcie: Disable clkreq interrupt and release wakelock in D3 cold"

parents e1ff91c5 5a9939d3
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -1661,6 +1661,13 @@ int ep_pcie_core_disable_endpoint(void)
	ep_pcie_vreg_deinit(dev);
out:
	mutex_unlock(&dev->setup_mtx);

	if (atomic_read(&dev->ep_pcie_dev_wake)) {
		EP_PCIE_DBG(dev, "PCIe V%d: Released wakelock\n", dev->rev);
		atomic_set(&dev->ep_pcie_dev_wake, 0);
		pm_relax(&dev->pdev->dev);
	}

	return rc;
}

@@ -1971,6 +1978,17 @@ static irqreturn_t ep_pcie_handle_perst_irq(int irq, void *data)
			"PCIe V%d: No. %ld PERST assertion.\n",
			dev->rev, dev->perst_ast_counter);

		if (dev->in_d3hot_sleep) {
			/*
			 * Perst was asserted when device was in d3hot sleep,
			 * disable clkreq irq
			 */
			EP_PCIE_DBG(dev,
				"PCIe V%d: Disable clkreq irq\n", dev->rev);
			disable_irq_nosync(clkreq_irq);
			dev->in_d3hot_sleep = false;
		}

		if (dev->client_ready) {
			ep_pcie_notify_event(dev, EP_PCIE_EVENT_PM_D3_COLD);
		} else {