aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/mms152_ts.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/mms152_ts.c b/drivers/input/touchscreen/mms152_ts.c
index fa1d295..ad1dc98 100644
--- a/drivers/input/touchscreen/mms152_ts.c
+++ b/drivers/input/touchscreen/mms152_ts.c
@@ -49,6 +49,8 @@
#include <asm/unaligned.h>
+#include "../keyboard/cypress/cypress-touchkey.h"
+
#ifdef CONFIG_INPUT_FBSUSPEND
#ifdef CONFIG_DRM
#include <drm/drm_backlight.h>
@@ -975,6 +977,10 @@ static irqreturn_t mms_ts_interrupt(int irq, void *dev_id)
if (info->panel == 'M') {
if (info->finger_state[id] != 0) {
info->finger_state[id] = 0;
+
+ // report state to cypress-touchkey for backlight timeout
+ touchscreen_state_report(0);
+
#ifdef CONFIG_LCD_FREQ_SWITCH
dev_notice(&client->dev,
"R(%c)(%d) [%2d]", info->ldi,
@@ -988,6 +994,10 @@ static irqreturn_t mms_ts_interrupt(int irq, void *dev_id)
} else {
if (info->finger_state[id] != 0) {
info->finger_state[id] = 0;
+
+ // report state to cypress-touchkey for backlight timeout
+ touchscreen_state_report(0);
+
dev_notice(&client->dev,
"R [%2d]", id);
}
@@ -996,6 +1006,10 @@ static irqreturn_t mms_ts_interrupt(int irq, void *dev_id)
if (info->panel == 'M') {
if (info->finger_state[id] != 0) {
info->finger_state[id] = 0;
+
+ // report state to cypress-touchkey for backlight timeout
+ touchscreen_state_report(0);
+
#ifdef CONFIG_LCD_FREQ_SWITCH
dev_notice(&client->dev,
"R(%c)(%d) [%2d],([%4d],[%3d])",
@@ -1011,6 +1025,10 @@ static irqreturn_t mms_ts_interrupt(int irq, void *dev_id)
} else {
if (info->finger_state[id] != 0) {
info->finger_state[id] = 0;
+
+ // report state to cypress-touchkey for backlight timeout
+ touchscreen_state_report(0);
+
dev_notice(&client->dev,
"R [%2d],([%4d],[%3d]),S:%d W:%d",
id, x, y, tmp[4], tmp[5]);
@@ -1040,6 +1058,10 @@ static irqreturn_t mms_ts_interrupt(int irq, void *dev_id)
#ifdef CONFIG_SAMSUNG_PRODUCT_SHIP
if (info->finger_state[id] == 0) {
info->finger_state[id] = 1;
+
+ // report state to cypress-touchkey for backlight timeout
+ touchscreen_state_report(1);
+
#ifdef CONFIG_LCD_FREQ_SWITCH
dev_notice(&client->dev,
"P(%c)(%d) [%2d]", info->ldi,
@@ -1052,6 +1074,10 @@ static irqreturn_t mms_ts_interrupt(int irq, void *dev_id)
#else
if (info->finger_state[id] == 0) {
info->finger_state[id] = 1;
+
+ // report state to cypress-touchkey for backlight timeout
+ touchscreen_state_report(1);
+
#ifdef CONFIG_LCD_FREQ_SWITCH
dev_notice(&client->dev,
"P(%c)(%d) [%2d],([%4d],[%3d]) w=%d, major=%d, minor=%d, angle=%d, palm=%d",
@@ -1082,12 +1108,20 @@ static irqreturn_t mms_ts_interrupt(int irq, void *dev_id)
#ifdef CONFIG_SAMSUNG_PRODUCT_SHIP
if (info->finger_state[id] == 0) {
info->finger_state[id] = 1;
+
+ // report state to cypress-touchkey for backlight timeout
+ touchscreen_state_report(1);
+
dev_notice(&client->dev,
"P [%2d]", id);
}
#else
if (info->finger_state[id] == 0) {
info->finger_state[id] = 1;
+
+ // report state to cypress-touchkey for backlight timeout
+ touchscreen_state_report(1);
+
dev_notice(&client->dev,
"P [%2d],([%4d],[%3d]),S:%d W:%d",
id, x, y, tmp[4], tmp[5]);