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

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

Merge "cnss2: Expose PCIe PM control vote API to WLAN host driver"

parents 24a84eab e2981a48
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -456,6 +456,28 @@ static int cnss_pci_runtime_idle(struct device *dev)
	return -EBUSY;
}

int cnss_wlan_pm_control(bool vote)
{
	struct cnss_plat_data *plat_priv = cnss_bus_dev_to_plat_priv(NULL);
	struct cnss_pci_data *pci_priv;
	struct pci_dev *pci_dev;

	if (!plat_priv)
		return -ENODEV;

	pci_priv = plat_priv->bus_priv;
	if (!pci_priv)
		return -ENODEV;

	pci_dev = pci_priv->pci_dev;

	return msm_pcie_pm_control(vote ? MSM_PCIE_DISABLE_PC :
				   MSM_PCIE_ENABLE_PC,
				   pci_dev->bus->number, pci_dev,
				   NULL, PM_OPTIONS_DEFAULT);
}
EXPORT_SYMBOL(cnss_wlan_pm_control);

int cnss_auto_suspend(void)
{
	int ret = 0;
+1 −0
Original line number Diff line number Diff line
@@ -92,6 +92,7 @@ extern void cnss_request_pm_qos(u32 qos_val);
extern void cnss_remove_pm_qos(void);
extern void cnss_lock_pm_sem(void);
extern void cnss_release_pm_sem(void);
extern int cnss_wlan_pm_control(bool vote);
extern int cnss_auto_suspend(void);
extern int cnss_auto_resume(void);