qcacld-3.0: add Runtime PM support and its PLD callbacks

Add PLD functions for Runtime suspend and resume callbacks,
and enable Runtime PM support for Moselle.

Change-Id: Ie990334c0c60892ec0f0ad6fac3253b3d326a919
CRs-Fixed: 2720832
This commit is contained in:
Vevek Venkatesan 2020-06-12 23:21:56 +05:30 committed by nshrivas
parent 8500973b30
commit 7d7f50849d
2 changed files with 53 additions and 0 deletions

View File

@ -486,6 +486,10 @@ ifeq ($(CONFIG_CNSS_QCA6750), y)
CONFIG_FEATURE_HAL_DELAYED_REG_WRITE := n
endif
ifeq ($(CONFIG_CNSS_QCA6750), y)
CONFIG_BUS_AUTO_SUSPEND := y
endif
CONFIG_QCA_WIFI_QCA8074 := y
CONFIG_QCA_WIFI_QCA8074_VP := y
CONFIG_DP_INTR_POLL_BASED := y

View File

@ -240,6 +240,53 @@ static int pld_ipci_resume_noirq(struct device *dev)
return 0;
}
/**
* pld_ipci_runtime_suspend() - Runtime suspend callback for power management
* @dev: device
*
* This function is to runtime suspend the platform device when power management
* is enabled.
*
* Return: status
*/
static int pld_ipci_runtime_suspend(struct device *dev)
{
struct pld_context *pld_context;
pld_context = pld_get_global_context();
if (!pld_context)
return -EINVAL;
if (pld_context->ops && pld_context->ops->runtime_suspend)
return pld_context->ops->runtime_suspend(dev,
PLD_BUS_TYPE_IPCI);
return 0;
}
/**
* pld_ipci_runtime_resume() - Runtime resume callback for power management
* @pdev: device
*
* This function is to runtime resume the platform device when power management
* is enabled.
*
* Return: status
*/
static int pld_ipci_runtime_resume(struct device *dev)
{
struct pld_context *pld_context;
pld_context = pld_get_global_context();
if (!pld_context)
return -EINVAL;
if (pld_context->ops && pld_context->ops->runtime_resume)
return pld_context->ops->runtime_resume(dev, PLD_BUS_TYPE_IPCI);
return 0;
}
static int pld_ipci_uevent(struct device *dev,
struct icnss_uevent_data *uevent)
{
@ -343,6 +390,8 @@ struct icnss_driver_ops pld_ipci_ops = {
.pm_resume = pld_ipci_pm_resume,
.suspend_noirq = pld_ipci_suspend_noirq,
.resume_noirq = pld_ipci_resume_noirq,
.runtime_suspend = pld_ipci_runtime_suspend,
.runtime_resume = pld_ipci_runtime_resume,
.uevent = pld_ipci_uevent,
.idle_restart = pld_ipci_idle_restart_cb,
.idle_shutdown = pld_ipci_idle_shutdown_cb,