2 \brief Declaration of library functions
4 Any definitions in this file will be shared among GLUE Layer and internal Driver Stack.
9 #ifndef _MTK_WCN_CMB_STUB_H_
10 #define _MTK_WCN_CMB_STUB_H_
13 /*******************************************************************************
14 * C O M P I L E R F L A G S
15 ********************************************************************************
18 /*******************************************************************************
20 ********************************************************************************
22 //#define MTK_WCN_CMB_AUD_IO_NAMING_STYLE_0 1 // Audio GPIO naming style for 73/75/77
23 #define MTK_WCN_CMB_AUD_IO_NAMING_STYLE_1 1 // Audio GPIO naming style for 89/8135
25 /*******************************************************************************
26 * E X T E R N A L R E F E R E N C E S
27 ********************************************************************************
32 /*******************************************************************************
34 ********************************************************************************
39 /*******************************************************************************
41 ********************************************************************************
44 CMB_STUB_AIF_0
= 0, /* 0000: BT_PCM_OFF & FM analog (line in/out) */
45 CMB_STUB_AIF_1
= 1, /* 0001: BT_PCM_ON & FM analog (in/out) */
46 CMB_STUB_AIF_2
= 2, /* 0010: BT_PCM_OFF & FM digital (I2S) */
47 CMB_STUB_AIF_3
= 3, /* 0011: BT_PCM_ON & FM digital (I2S) (invalid in 73evb & 1.2 phone configuration) */
51 /*COMBO_CHIP_AUDIO_PIN_CTRL*/
53 CMB_STUB_AIF_CTRL_DIS
= 0,
54 CMB_STUB_AIF_CTRL_EN
= 1,
55 CMB_STUB_AIF_CTRL_MAX
= 2,
59 COMBO_FUNC_TYPE_BT
= 0,
60 COMBO_FUNC_TYPE_FM
= 1,
61 COMBO_FUNC_TYPE_GPS
= 2,
62 COMBO_FUNC_TYPE_WIFI
= 3,
63 COMBO_FUNC_TYPE_WMT
= 4,
64 COMBO_FUNC_TYPE_STP
= 5,
65 COMBO_FUNC_TYPE_NUM
= 6
75 typedef void (*wmt_bgf_eirq_cb
)(void);
76 typedef int (*wmt_aif_ctrl_cb
)(CMB_STUB_AIF_X
, CMB_STUB_AIF_CTRL
);
77 typedef void (*wmt_func_ctrl_cb
)(unsigned int, unsigned int);
78 typedef signed long (*wmt_thermal_query_cb
)(void);
79 typedef int (*wmt_deep_idle_ctrl_cb
)(unsigned int);
80 typedef int (*wmt_func_do_reset
)(unsigned int);
82 typedef struct _CMB_STUB_CB_
{
83 unsigned int size
; //structure size
84 /*wmt_bgf_eirq_cb bgf_eirq_cb;*//* remove bgf_eirq_cb from stub. handle it in platform */
85 wmt_aif_ctrl_cb aif_ctrl_cb
;
86 wmt_func_ctrl_cb func_ctrl_cb
;
87 wmt_thermal_query_cb thermal_query_cb
;
88 wmt_deep_idle_ctrl_cb deep_idle_ctrl_cb
;
89 wmt_func_do_reset wmt_do_reset_cb
;
90 } CMB_STUB_CB
, *P_CMB_STUB_CB
;
92 /*******************************************************************************
94 ********************************************************************************
99 /*******************************************************************************
100 * P R I V A T E D A T A
101 ********************************************************************************
108 /*******************************************************************************
109 * F U N C T I O N D E C L A R A T I O N S
110 ********************************************************************************
113 extern int mtk_wcn_cmb_stub_reg (P_CMB_STUB_CB p_stub_cb
);
114 extern int mtk_wcn_cmb_stub_unreg (void);
116 extern int mtk_wcn_cmb_stub_aif_ctrl (CMB_STUB_AIF_X state
, CMB_STUB_AIF_CTRL ctrl
);
118 static inline int mtk_wcn_cmb_stub_audio_ctrl(CMB_STUB_AIF_X state
) {
119 return mtk_wcn_cmb_stub_aif_ctrl(state
, 1);
122 extern int mt_combo_plt_enter_deep_idle(COMBO_IF src
);
123 extern int mt_combo_plt_exit_deep_idle(COMBO_IF src
);
125 /* Use new mtk_wcn_stub APIs instead of old mt_combo ones for kernel to control
128 extern void mtk_wcn_cmb_stub_func_ctrl (unsigned int type
, unsigned int on
);
129 extern signed long mtk_wcn_cmb_stub_query_ctrl(void);
130 extern int board_sdio_ctrl (unsigned int sdio_port_num
, unsigned int on
);
132 extern int mtk_wcn_wmt_chipid_query(void);
133 extern void mtk_wcn_wmt_set_chipid(int chipid
);
134 /*******************************************************************************
136 ********************************************************************************
139 #endif /* _MTK_WCN_CMB_STUB_H_ */