diff --git a/core/hif/inc/hif.h b/core/hif/inc/hif.h index de926ef998b1..40950c31f031 100644 --- a/core/hif/inc/hif.h +++ b/core/hif/inc/hif.h @@ -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); diff --git a/core/hif/src/pcie/if_pci.c b/core/hif/src/pcie/if_pci.c index 09e06f15fa30..a70811e7e052 100644 --- a/core/hif/src/pcie/if_pci.c +++ b/core/hif/src/pcie/if_pci.c @@ -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; diff --git a/core/hif/src/snoc/if_snoc.c b/core/hif/src/snoc/if_snoc.c index c5f248d8f847..c9dfa8c96d20 100644 --- a/core/hif/src/snoc/if_snoc.c +++ b/core/hif/src/snoc/if_snoc.c @@ -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 *