1 #ifndef __MT_PMIC_WRAP_H__
2 #define __MT_PMIC_WRAP_H__
3 /* #include <mach/typedefs.h> */
4 /* #include <linux/smp.h> */
5 #include <mach/mt_typedefs.h>
6 #include <linux/device.h>
9 struct mt_pmic_wrap_driver
{
11 struct device_driver driver
;
12 S32(*wacs2_hal
) (U32 write
, U32 adr
, U32 wdata
, U32
* rdata
);
14 S32(*show_hal
) (char *buf
);
15 S32(*store_hal
) (const char *buf
, size_t count
);
18 void (*resume
) (void);
25 /* ------external API for pmic_wrap user-------------------------------------------------- */
26 S32
pwrap_read(U32 adr
, U32
* rdata
);
27 S32
pwrap_write(U32 adr
, U32 wdata
);
29 S32
pwrap_wacs2(U32 write
, U32 adr
, U32 wdata
, U32
*rdata
);
30 /*_____________ROME only_____________________________________________*/
31 /********************************************************************/
32 /* return value : EINT_STA: [0]: CPU IRQ status in MT6331 */
33 /* [1]: MD32 IRQ status in MT6331 */
34 /* [2]: CPU IRQ status in MT6332 */
36 /********************************************************************/
37 U32
pmic_wrap_eint_status(void);
38 /********************************************************************/
39 /* set value(W1C) : EINT_CLR: [0]: CPU IRQ status in MT6331 */
40 /* [1]: MD32 IRQ status in MT6331 */
41 /* [2]: CPU IRQ status in MT6332 */
43 /* para: offset is shift of clear bit which needs to clear */
44 /********************************************************************/
45 void pmic_wrap_eint_clr(int offset
);
46 /*--------------------------------------------------------------------*/
47 U32
mt_pmic_wrap_eint_status(void);
48 void mt_pmic_wrap_eint_clr(int offset
);
50 struct mt_pmic_wrap_driver
*get_mt_pmic_wrap_drv(void);
52 #endif /* __MT_PMIC_WRAP_H__ */