msm: ipa3: Changes to support deepsleep
Adding changes to support 1. Deepsleep entry time allowing calling exit registered callback. 2. Allow to re-register the client to notify IPA ready back. 3. Deepsleep exit time calling IPA ready callback. Change-Id: Ia09eca461b41bdf13c7be69f832a5eaab27f9b59 Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
This commit is contained in:
parent
b775cf70c7
commit
bbce9d0d1c
@ -623,6 +623,40 @@ bool ipa_is_ready(void)
|
||||
}
|
||||
EXPORT_SYMBOL(ipa_is_ready);
|
||||
|
||||
#ifdef CONFIG_DEEPSLEEP
|
||||
int ipa_fmwk_deepsleep_entry_ipa(void)
|
||||
{
|
||||
if (!ipa_fmwk_ctx) {
|
||||
pr_err("ipa framework hasn't been initialized yet\n");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
mutex_lock(&ipa_fmwk_ctx->lock);
|
||||
ipa_fmwk_ctx->ipa_ready = false;
|
||||
mutex_unlock(&ipa_fmwk_ctx->lock);
|
||||
pr_info("IPA driver is now in exit state\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(ipa_fmwk_deepsleep_entry_ipa);
|
||||
|
||||
int ipa_fmwk_deepsleep_exit_ipa(void)
|
||||
{
|
||||
if (!ipa_fmwk_ctx) {
|
||||
pr_err("ipa framework hasn't been initialized yet\n");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
mutex_lock(&ipa_fmwk_ctx->lock);
|
||||
ipa_trigger_ipa_ready_cbs();
|
||||
ipa_fmwk_ctx->ipa_ready = true;
|
||||
mutex_unlock(&ipa_fmwk_ctx->lock);
|
||||
pr_info("IPA driver is now in ready state\n");
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(ipa_fmwk_deepsleep_exit_ipa);
|
||||
#endif
|
||||
|
||||
int ipa_register_ipa_ready_cb(void(*ipa_ready_cb)(void *user_data),
|
||||
void *user_data)
|
||||
{
|
||||
|
@ -1762,6 +1762,12 @@ bool ipa_is_ready(void);
|
||||
void ipa_proxy_clk_vote(void);
|
||||
void ipa_proxy_clk_unvote(void);
|
||||
|
||||
#ifdef CONFIG_DEEPSLEEP
|
||||
int ipa_fmwk_deepsleep_entry_ipa(void);
|
||||
|
||||
int ipa_fmwk_deepsleep_exit_ipa(void);
|
||||
#endif
|
||||
|
||||
enum ipa_hw_type ipa_get_hw_type(void);
|
||||
|
||||
const struct ipa_gsi_ep_config *ipa_get_gsi_ep_info(
|
||||
@ -2165,6 +2171,16 @@ static inline bool ipa_is_ready(void)
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline int ipa_fmwk_deepsleep_entry_ipa(void)
|
||||
{
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
static inline int ipa_fmwk_deepsleep_exit_ipa(void)
|
||||
{
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
static inline enum ipa_hw_type ipa_get_hw_type(void)
|
||||
{
|
||||
return IPA_HW_None;
|
||||
|
Loading…
Reference in New Issue
Block a user