input: touchscreen: Move power mode handling to platform data
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
index f92845b..d279146 100644
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ b/arch/arm/mach-msm/board-msm7x30.c
@@ -395,7 +395,7 @@
.use_mt = CY_USE_MT,
.use_hndshk = CY_SEND_HNDSHK,
.use_trk_id = CY_USE_TRACKING_ID,
- .use_sleep = CY_USE_SLEEP,
+ .use_sleep = CY_USE_DEEP_SLEEP_SEL | CY_USE_LOW_POWER_SEL,
.use_gestures = CY_USE_GESTURES,
/* activate up to 4 groups
* and set active distance
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c
index db2cdfd..608a93d 100644
--- a/arch/arm/mach-msm/board-msm8960.c
+++ b/arch/arm/mach-msm/board-msm8960.c
@@ -2378,7 +2378,7 @@
.use_mt = CY_USE_MT,
.use_hndshk = CY_SEND_HNDSHK,
.use_trk_id = CY_USE_TRACKING_ID,
- .use_sleep = CY_USE_SLEEP,
+ .use_sleep = 0,
.use_gestures = CY_USE_GESTURES,
.fw_fname = "cyttsp_8960_cdp.hex",
/* activate up to 4 groups
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c
index 573bd57..ac5846e 100644
--- a/arch/arm/mach-msm/board-msm8x60.c
+++ b/arch/arm/mach-msm/board-msm8x60.c
@@ -3047,7 +3047,7 @@
.use_mt = CY_USE_MT,
.use_hndshk = CY_SEND_HNDSHK,
.use_trk_id = CY_USE_TRACKING_ID,
- .use_sleep = CY_USE_SLEEP,
+ .use_sleep = CY_USE_DEEP_SLEEP_SEL | CY_USE_LOW_POWER_SEL,
.use_gestures = CY_USE_GESTURES,
/* activate up to 4 groups
* and set active distance
@@ -3089,7 +3089,7 @@
.use_mt = CY_USE_MT,
.use_hndshk = CY_SEND_HNDSHK,
.use_trk_id = CY_USE_TRACKING_ID,
- .use_sleep = CY_USE_SLEEP,
+ .use_sleep = CY_USE_DEEP_SLEEP_SEL | CY_USE_LOW_POWER_SEL,
.use_gestures = CY_USE_GESTURES,
/* activate up to 4 groups
* and set active distance
diff --git a/include/linux/cyttsp.h b/include/linux/cyttsp.h
index 0644f1a..d34542c 100644
--- a/include/linux/cyttsp.h
+++ b/include/linux/cyttsp.h
@@ -139,16 +139,6 @@
#define CY_USE_TEST_DATA
*/
-/* define to activate power management */
-/*
-#define CY_USE_LOW_POWER
- */
-
-/* define if wake on i2c addr is activated */
-/*
-#define CY_USE_DEEP_SLEEP
- */
-
/* define if gesture signaling is used
* and which gesture groups to use
*/
@@ -283,16 +273,8 @@
#endif
#endif /* ABS_MT_TRACKING_ID */
-#ifdef CY_USE_DEEP_SLEEP
- #define CY_USE_DEEP_SLEEP_SEL 0x80
-#else
- #define CY_USE_DEEP_SLEEP_SEL 0x00
-#endif
-#ifdef CY_USE_LOW_POWER
- #define CY_USE_SLEEP (CY_USE_DEEP_SLEEP_SEL | 0x01)
-#else
- #define CY_USE_SLEEP 0x00
-#endif /* CY_USE_LOW_POWER */
+#define CY_USE_DEEP_SLEEP_SEL 0x80
+#define CY_USE_LOW_POWER_SEL 0x01
#ifdef CY_USE_TEST_DATA
#define cyttsp_testdat(ray1, ray2, sizeofray) \