//////////////////////////////////////////////////////////////////////////////// // // 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_platform_porting_layer.h * * @brief This file defines the interface of touch screen * * @version v2.2.0.0 * */ #ifndef __MSTAR_DRV_PLATFORM_PORTING_LAYER_H__ #define __MSTAR_DRV_PLATFORM_PORTING_LAYER_H__ /*--------------------------------------------------------------------------*/ /* INCLUDE FILE */ /*--------------------------------------------------------------------------*/ #include "mstar_drv_common.h" #if defined(CONFIG_TOUCH_DRIVER_RUN_ON_SPRD_PLATFORM) #include #include #ifdef CONFIG_ENABLE_REGULATOR_POWER_ON #include #include #endif //CONFIG_ENABLE_REGULATOR_POWER_ON #elif defined(CONFIG_TOUCH_DRIVER_RUN_ON_QCOM_PLATFORM) #ifdef CONFIG_ENABLE_REGULATOR_POWER_ON #include #endif //CONFIG_ENABLE_REGULATOR_POWER_ON #elif defined(CONFIG_TOUCH_DRIVER_RUN_ON_MTK_PLATFORM) #include #include #include #include #include #include //#include #include #include #include #include #include #include #include #include #include #include "tpd.h" #include "cust_gpio_usage.h" #endif /*--------------------------------------------------------------------------*/ /* PREPROCESSOR CONSTANT DEFINITION */ /*--------------------------------------------------------------------------*/ /* * Note. * Please change the below GPIO pin setting to follow the platform that you are using(EX. MediaTek, Spreadtrum, Qualcomm). */ #if defined(CONFIG_TOUCH_DRIVER_RUN_ON_SPRD_PLATFORM) // TODO : Please FAE colleague to confirm with customer device driver engineer about the value of RST and INT GPIO setting //#define MS_TS_MSG_IC_GPIO_RST GPIO_TOUCH_RESET //53 //35 //#define MS_TS_MSG_IC_GPIO_INT GPIO_TOUCH_IRQ //52 //37 #elif defined(CONFIG_TOUCH_DRIVER_RUN_ON_QCOM_PLATFORM) // TODO : Please FAE colleague to confirm with customer device driver engineer about the value of RST and INT GPIO setting #define MS_TS_MSG_IC_GPIO_RST 0 #define MS_TS_MSG_IC_GPIO_INT 1 #elif defined(CONFIG_TOUCH_DRIVER_RUN_ON_MTK_PLATFORM) #define MS_TS_MSG_IC_GPIO_RST (GPIO_CTP_RST_PIN) #define MS_TS_MSG_IC_GPIO_INT (GPIO_CTP_EINT_PIN) #endif /*--------------------------------------------------------------------------*/ /* GLOBAL FUNCTION DECLARATION */ /*--------------------------------------------------------------------------*/ extern void DrvPlatformLyrDisableFingerTouchReport(void); extern void DrvPlatformLyrEnableFingerTouchReport(void); extern void DrvPlatformLyrFingerTouchPressed(s32 nX, s32 nY, s32 nPressure, s32 nId); extern void DrvPlatformLyrFingerTouchReleased(s32 nX, s32 nY); extern s32 DrvPlatformLyrInputDeviceInitialize(struct i2c_client *pClient); extern void DrvPlatformLyrSetIicDataRate(struct i2c_client *pClient, u32 nIicDataRate); extern void DrvPlatformLyrTouchDevicePowerOff(void); extern void DrvPlatformLyrTouchDevicePowerOn(void); #ifdef CONFIG_ENABLE_REGULATOR_POWER_ON extern void DrvPlatformLyrTouchDeviceRegulatorPowerOn(void); #endif //CONFIG_ENABLE_REGULATOR_POWER_ON extern void DrvPlatformLyrTouchDeviceRegisterEarlySuspend(void); extern s32 DrvPlatformLyrTouchDeviceRegisterFingerTouchInterruptHandler(void); extern s32 DrvPlatformLyrTouchDeviceRemove(struct i2c_client *pClient); extern s32 DrvPlatformLyrTouchDeviceRequestGPIO(void); extern void DrvPlatformLyrTouchDeviceResetHw(void); #endif /* __MSTAR_DRV_PLATFORM_PORTING_LAYER_H__ */