/* * remove function is triggered when the input * device is removed from input sub-system */ s32 /*__devexit*/ MsDrvInterfaceTouchDeviceRemove(struct i2c_client *pClient) { DBG("*** %s() ***\n", __func__); #ifdef CONFIG_HIPAD_FIRMWARE_UPGRADE msg2238_destroy_fw_mdev(&mdev); #endif return DrvPlatformLyrTouchDeviceRemove(pClient); }
/* probe function is used for matching and initializing input device */ s32 /*__devinit*/ MsDrvInterfaceTouchDeviceProbe(struct i2c_client *pClient, const struct i2c_device_id *pDeviceId) { s32 nRetVal = 0; DBG("*** %s() ***\n", __func__); DrvPlatformLyrInputDeviceInitialize(pClient); DrvPlatformLyrTouchDeviceRequestGPIO(); DrvPlatformLyrTouchDeviceRegisterFingerTouchInterruptHandler(); #ifdef CONFIG_ENABLE_REGULATOR_POWER_ON DrvPlatformLyrTouchDeviceRegulatorPowerOn(); #endif //CONFIG_ENABLE_REGULATOR_POWER_ON DrvPlatformLyrTouchDevicePowerOn(); nRetVal = DrvMainTouchDeviceInitialize(); if (nRetVal == -ENODEV) { DrvPlatformLyrTouchDeviceRemove(pClient); return nRetVal; } #ifdef CONFIG_ENABLE_GESTURE_WAKEUP #ifdef CONFIG_ENABLE_GESTURE_INFORMATION_MODE mstar_create_proc(); #endif #endif #if defined(CONFIG_FB) call_back_functions_init(); #endif #ifndef CONFIG_UPDATE_FIRMWARE_BY_SW_ID DrvPlatformLyrEnableFingerTouchReport(); #endif DBG("*** MStar touch driver registered ***\n"); //modify by pangle at 20150228 begin #ifdef CONFIG_UPDATE_FIRMWARE_BY_SW_ID program_over = 1; #endif //modify by pangle at 20150228 end return nRetVal; }
/* probe function is used for matching and initializing input device */ s32 /*__devinit*/ MsDrvInterfaceTouchDeviceProbe(struct i2c_client *pClient, const struct i2c_device_id *pDeviceId) { s32 nRetVal = 0; DBG("*** %s() ***\n", __func__); #ifdef CONFIG_OF DrvPlatformLyrDts(pClient); #endif DrvPlatformLyrInputDeviceInitialize(pClient); DrvPlatformLyrTouchDeviceRequestGPIO(); #ifdef CONFIG_ENABLE_REGULATOR_POWER_ON DrvPlatformLyrTouchDeviceRegulatorPowerOn(); #endif /* CONFIG_ENABLE_REGULATOR_POWER_ON */ DrvPlatformLyrTouchDevicePowerOn(); nRetVal = DrvMainTouchDeviceInitialize(); if (nRetVal == -ENODEV) { DrvPlatformLyrTouchDeviceRemove(pClient); return nRetVal; } DrvPlatformLyrTouchDeviceRegisterFingerTouchInterruptHandler(); DrvPlatformLyrTouchDeviceRegisterEarlySuspend(); #ifdef CONFIG_HIPAD_FIRMWARE_UPGRADE nRetVal = msg2238_create_fw_mdev(&mdev); if (nRetVal) fw_mdev_err("msg2238_create_fw_mdev ERROR = %d\n", nRetVal); #endif DBG("*** MStar touch driver registered ***\n"); return nRetVal; }
/* remove function is triggered when the input device is removed from input sub-system */ s32 /*__devexit*/ MsDrvInterfaceTouchDeviceRemove(struct i2c_client *pClient) { DBG("*** %s() ***\n", __func__); return DrvPlatformLyrTouchDeviceRemove(pClient); }