diff options
Diffstat (limited to 'drivers/input/touchscreen/msg2138/mstar_drv_utility_adaption.h')
| -rw-r--r-- | drivers/input/touchscreen/msg2138/mstar_drv_utility_adaption.h | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/msg2138/mstar_drv_utility_adaption.h b/drivers/input/touchscreen/msg2138/mstar_drv_utility_adaption.h new file mode 100644 index 00000000..5e729569 --- /dev/null +++ b/drivers/input/touchscreen/msg2138/mstar_drv_utility_adaption.h @@ -0,0 +1,101 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Copyright (c) 2006-2012 MStar Semiconductor, Inc. +// All rights reserved. +// +// Unless otherwise stipulated in writing, any and all information contained +// herein regardless in any format shall remain the sole proprietary of +// MStar Semiconductor Inc. and be kept in strict confidence +// (??MStar Confidential Information??) by the recipient. +// Any unauthorized act including without limitation unauthorized disclosure, +// copying, use, reproduction, sale, distribution, modification, disassembling, +// reverse engineering and compiling of the contents of MStar Confidential +// Information is unlawful and strictly prohibited. MStar hereby reserves the +// rights to any and all damages, losses, costs and expenses resulting therefrom. +// +//////////////////////////////////////////////////////////////////////////////// + +/** + * + * @file mstar_drv_utility_adaption.h + * + * @brief This file defines the interface of touch screen + * + * @version v2.2.0.0 + * + */ + +#ifndef __MSTAR_DRV_UTILITY_ADAPTION_H__ +#define __MSTAR_DRV_UTILITY_ADAPTION_H__ (1) + + +//////////////////////////////////////////////////////////// +/// Included Files +//////////////////////////////////////////////////////////// + +#include "mstar_drv_common.h" + +//////////////////////////////////////////////////////////// +/// Constant +//////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////// +/// Data Types +//////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////// +/// Variables +//////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////// +/// Macro +//////////////////////////////////////////////////////////// +#define BK_REG8_WL(addr,val) ( RegSetLByteValue( addr, val ) ) +#define BK_REG8_WH(addr,val) ( RegSetHByteValue( addr, val ) ) +#define BK_REG16_W(addr,val) ( RegSet16BitValue( addr, val ) ) +#define BK_REG8_RL(addr) ( RegGetLByteValue( addr ) ) +#define BK_REG8_RH(addr) ( RegGetHByteValue( addr ) ) +#define BK_REG16_R(addr) ( RegGet16BitValue( addr ) ) + +#define PRINTF_EMERG(fmt, ...) printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) +#define PRINTF_ALERT(fmt, ...) printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) +#define PRINTF_CRIT(fmt, ...) printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) +#define PRINTF_ERR(fmt, ...) printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) +#define PRINTF_WARN(fmt, ...) printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) +#define PRINTF_NOTICE(fmt, ...) printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) +#define PRINTF_INFO(fmt, ...) printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) +#define PRINTF_DEBUG(fmt, ...) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) + +//////////////////////////////////////////////////////////// +/// Function Prototypes +//////////////////////////////////////////////////////////// + +#ifdef CONFIG_ENABLE_DMA_IIC +extern void DmaAlloc(void); +extern void DmaFree(void); +#endif //CONFIG_ENABLE_DMA_IIC +extern u16 RegGet16BitValue(u16 nAddr); +extern u8 RegGetLByteValue(u16 nAddr); +extern u8 RegGetHByteValue(u16 nAddr); +extern void RegSet16BitValue(u16 nAddr, u16 nData); +extern void RegSetLByteValue(u16 nAddr, u8 nData); +extern void RegSetHByteValue(u16 nAddr, u8 nData); +extern void RegSet16BitValueOn(u16 nAddr, u16 nData); +extern void RegSet16BitValueOff(u16 nAddr, u16 nData); +extern void DbBusEnterSerialDebugMode(void); +extern void DbBusExitSerialDebugMode(void); +extern void DbBusIICUseBus(void); +extern void DbBusIICNotUseBus(void); +extern void DbBusIICReshape(void); +extern void DbBusStopMCU(void); +extern void DbBusNotStopMCU(void); +extern s32 IicWriteData(u8 nSlaveId, u8* pBuf, u16 nSize); +extern s32 IicReadData(u8 nSlaveId, u8* pBuf, u16 nSize); +extern void mstpMemSet(void *pDst, s8 nVal, u32 nSize); +extern void mstpMemCopy(void *pDst, void *pSource, u32 nSize); +extern void mstpDelay(u32 nTime); + +#endif // __MSTAR_DRV_UTILITY_ADAPTION_H__ |
