2 \brief Declaration of library functions
4 Any definitions in this file will be shared among GLUE Layer and internal Driver Stack.
10 /*******************************************************************************
11 * C O M P I L E R F L A G S
12 ********************************************************************************
15 /*******************************************************************************
17 ********************************************************************************
21 #if CONFIG_HAS_WAKELOCK
22 #include <linux/wakelock.h>
23 #define CFG_WMT_WAKELOCK_SUPPORT 1
29 #define DFT_TAG "[WMT-PLAT]"
32 /*******************************************************************************
33 * E X T E R N A L R E F E R E N C E S
34 ********************************************************************************
37 /* ALPS and COMBO header files */
38 #include <mach/mtk_wcn_cmb_stub.h>
39 /* MTK_WCN_COMBO header files */
41 #include "wmt_plat_stub.h"
43 #include <mach/mtk_wcn_cmb_stub.h>
45 #include "osal_typedef.h"
47 /*******************************************************************************
49 ********************************************************************************
55 /*******************************************************************************
57 ********************************************************************************
60 /*******************************************************************************
61 * F U N C T I O N D E C L A R A T I O N S
62 ********************************************************************************
65 static VOID
wmt_plat_func_ctrl(UINT32 type
, UINT32 on
);
69 /*******************************************************************************
71 ********************************************************************************
75 /*******************************************************************************
76 * P R I V A T E D A T A
77 ********************************************************************************
81 /*******************************************************************************
83 ********************************************************************************
86 static void wmt_plat_func_ctrl(unsigned int type
, unsigned int on
)
89 mtk_wcn_wmt_func_on((ENUM_WMTDRV_TYPE_T
) type
);
91 mtk_wcn_wmt_func_off((ENUM_WMTDRV_TYPE_T
) type
);
96 static signed long wmt_plat_thremal_query(void)
98 return wmt_lib_tm_temp_query();
101 #if MTK_WCN_CMB_FOR_SDIO_1V_AUTOK
102 static unsigned int wmt_plat_get_drv_status(unsigned int type
)
104 return wmt_lib_get_drv_status(type
);
108 static INT32
wmt_plat_do_reset (UINT32 type
)
110 return wmt_lib_trigger_reset();
113 INT32
wmt_plat_stub_init(VOID
)
117 stub_cb
.aif_ctrl_cb
= wmt_plat_audio_ctrl
;
118 stub_cb
.func_ctrl_cb
= wmt_plat_func_ctrl
;
119 stub_cb
.thermal_query_cb
= wmt_plat_thremal_query
;
120 stub_cb
.wmt_do_reset_cb
= wmt_plat_do_reset
;
121 #if MTK_WCN_CMB_FOR_SDIO_1V_AUTOK
122 stub_cb
.get_drv_status_cb
= wmt_plat_get_drv_status
;
124 stub_cb
.size
= sizeof(stub_cb
);
126 /* register to cmb_stub */
127 iRet
= mtk_wcn_cmb_stub_reg(&stub_cb
);