mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
Merge "msm: ipa_fwmk: Provide api for mhi driver to update state"
This commit is contained in:
commit
da9ad9f15c
3 changed files with 34 additions and 2 deletions
|
|
@ -321,6 +321,8 @@ struct ipa_fmwk_contex {
|
|||
int (*ipa_mhi_handle_ipa_config_req)(
|
||||
struct ipa_config_req_msg_v01 *config_req);
|
||||
|
||||
int (*ipa_mhi_update_mstate)(enum ipa_mhi_mstate mstate_info);
|
||||
|
||||
/* ipa_wigig APIs */
|
||||
int (*ipa_wigig_init)(struct ipa_wigig_init_in_params *in,
|
||||
struct ipa_wigig_init_out_params *out);
|
||||
|
|
@ -1484,7 +1486,8 @@ int ipa_fmwk_register_ipa_mhi(const struct ipa_mhi_data *in)
|
|||
|| ipa_fmwk_ctx->ipa_mhi_suspend
|
||||
|| ipa_fmwk_ctx->ipa_mhi_resume
|
||||
|| ipa_fmwk_ctx->ipa_mhi_destroy
|
||||
|| ipa_fmwk_ctx->ipa_mhi_handle_ipa_config_req) {
|
||||
|| ipa_fmwk_ctx->ipa_mhi_handle_ipa_config_req
|
||||
|| ipa_fmwk_ctx->ipa_mhi_update_mstate) {
|
||||
pr_err("ipa_mhi APIs were already initialized\n");
|
||||
return -EPERM;
|
||||
}
|
||||
|
|
@ -1498,6 +1501,7 @@ int ipa_fmwk_register_ipa_mhi(const struct ipa_mhi_data *in)
|
|||
ipa_fmwk_ctx->ipa_mhi_destroy = in->ipa_mhi_destroy;
|
||||
ipa_fmwk_ctx->ipa_mhi_handle_ipa_config_req =
|
||||
in->ipa_mhi_handle_ipa_config_req;
|
||||
ipa_fmwk_ctx->ipa_mhi_update_mstate = in->ipa_mhi_update_mstate;
|
||||
|
||||
pr_info("ipa_mhi registered successfully\n");
|
||||
|
||||
|
|
@ -1588,6 +1592,16 @@ int ipa_mhi_handle_ipa_config_req(struct ipa_config_req_msg_v01 *config_req)
|
|||
}
|
||||
EXPORT_SYMBOL(ipa_mhi_handle_ipa_config_req);
|
||||
|
||||
int ipa_mhi_update_mstate(enum ipa_mhi_mstate mstate_info)
|
||||
{
|
||||
int ret;
|
||||
|
||||
IPA_FMWK_DISPATCH_RETURN(ipa_mhi_update_mstate, mstate_info);
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(ipa_mhi_update_mstate);
|
||||
|
||||
/* registration API for IPA wigig module */
|
||||
int ipa_fmwk_register_ipa_wigig(const struct ipa_wigig_data *in)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -228,6 +228,8 @@ struct ipa_mhi_data {
|
|||
|
||||
int (*ipa_mhi_handle_ipa_config_req)(
|
||||
struct ipa_config_req_msg_v01 *config_req);
|
||||
|
||||
int (*ipa_mhi_update_mstate)(enum ipa_mhi_mstate mstate_info);
|
||||
};
|
||||
|
||||
struct ipa_wigig_data {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef IPA_MHI_H_
|
||||
|
|
@ -22,6 +22,14 @@ enum ipa_mhi_event_type {
|
|||
IPA_MHI_EVENT_MAX,
|
||||
};
|
||||
|
||||
enum ipa_mhi_mstate {
|
||||
IPA_MHI_STATE_M0,
|
||||
IPA_MHI_STATE_M1,
|
||||
IPA_MHI_STATE_M2,
|
||||
IPA_MHI_STATE_M3,
|
||||
IPA_MHI_STATE_M_MAX
|
||||
};
|
||||
|
||||
typedef void (*mhi_client_cb)(void *priv, enum ipa_mhi_event_type event,
|
||||
unsigned long data);
|
||||
|
||||
|
|
@ -111,6 +119,8 @@ int ipa_mhi_resume(void);
|
|||
|
||||
void ipa_mhi_destroy(void);
|
||||
|
||||
int ipa_mhi_update_mstate(enum ipa_mhi_mstate mstate_info);
|
||||
|
||||
#else /* IS_ENABLED(CONFIG_IPA3) */
|
||||
|
||||
static inline int ipa_mhi_init(struct ipa_mhi_init_params *params)
|
||||
|
|
@ -149,6 +159,12 @@ static inline void ipa_mhi_destroy(void)
|
|||
|
||||
}
|
||||
|
||||
static inline int ipa_mhi_update_mstate
|
||||
(enum ipa_mhi_mstate mstate_info)
|
||||
{
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
#endif /* IS_ENABLED(CONFIG_IPA3) */
|
||||
|
||||
#endif /* IPA_MHI_H_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue