mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
qcacld-3.0: Provide hif runtime suspend resume apis
hif runtime suspend resume is identical to a regular bus suspend resume, but provide a different api just in case this changes. Change-Id: If069df7733d6a1ebe38d356ac5bdd4e2a250118b CRs-Fixed: 935300
This commit is contained in:
parent
47ee8ca308
commit
f2936d19bc
3 changed files with 47 additions and 3 deletions
|
|
@ -684,6 +684,8 @@ void hif_runtime_pm_set_state_inprogress(void);
|
|||
void hif_runtime_pm_set_state_on(void);
|
||||
|
||||
void hif_enable_power_management(void *hif_ctx);
|
||||
int hif_runtime_suspend(void);
|
||||
int hif_runtime_resume(void);
|
||||
int hif_bus_resume(void);
|
||||
int hif_bus_suspend(void);
|
||||
void hif_vote_link_down(void);
|
||||
|
|
|
|||
|
|
@ -1797,9 +1797,10 @@ static int hif_bus_resume_link_down(void)
|
|||
|
||||
/**
|
||||
* hif_bus_suspend(): prepare hif for suspend
|
||||
*
|
||||
* chose suspend type based on link suspend voting.
|
||||
*
|
||||
* Return: linux status
|
||||
* Return: 0 for success and non-zero error code for failure
|
||||
*/
|
||||
int hif_bus_suspend(void)
|
||||
{
|
||||
|
|
@ -1810,10 +1811,11 @@ int hif_bus_suspend(void)
|
|||
}
|
||||
|
||||
/**
|
||||
* hif_bus_suspend(): prepare hif for suspend
|
||||
* hif_bus_resume(): prepare hif for resume
|
||||
*
|
||||
* chose suspend type based on link suspend voting.
|
||||
*
|
||||
* Return: linux status
|
||||
* Return: 0 for success and non-zero error code for failure
|
||||
*/
|
||||
int hif_bus_resume(void)
|
||||
{
|
||||
|
|
@ -1881,6 +1883,26 @@ void hif_runtime_pm_set_state_suspended(void)
|
|||
__hif_runtime_pm_set_state(HIF_PM_RUNTIME_STATE_SUSPENDED);
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_runtime_suspend() - do the bus suspend part of a runtime suspend
|
||||
*
|
||||
* Return: 0 for success and non-zero error code for failure
|
||||
*/
|
||||
int hif_runtime_suspend(void)
|
||||
{
|
||||
return hif_bus_suspend();
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_runtime_resume() - do the bus resume part of a runtime resume
|
||||
*
|
||||
* Return: 0 for success and non-zero error code for failure
|
||||
*/
|
||||
int hif_runtime_resume(void)
|
||||
{
|
||||
return hif_bus_resume();
|
||||
}
|
||||
|
||||
void hif_disable_isr(void *ol_sc)
|
||||
{
|
||||
struct ol_softc *scn = (struct ol_softc *)ol_sc;
|
||||
|
|
|
|||
|
|
@ -141,6 +141,15 @@ void hif_runtime_pm_set_state_on(void)
|
|||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_runtime_pm_set_state_suspended() - dummy function
|
||||
*
|
||||
* currently runtime pm only supported in pci
|
||||
*/
|
||||
void hif_runtime_pm_set_state_suspended(void)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_bus_suspend() - suspend the bus
|
||||
*
|
||||
|
|
@ -167,6 +176,17 @@ int hif_bus_resume(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int hif_runtime_suspend(void)
|
||||
{
|
||||
return hif_bus_suspend();
|
||||
}
|
||||
|
||||
static int hif_runtime_resume(void)
|
||||
{
|
||||
return hif_bus_resume();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* hif_enable_power_gating(): enable HW power gating
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue