diff options
author | codeworkx <codeworkx@cyanogenmod.org> | 2013-03-03 11:29:32 +0000 |
---|---|---|
committer | codeworkx <codeworkx@cyanogenmod.org> | 2013-03-03 11:34:47 +0000 |
commit | cea4b18c0f6d20915f779529a22fb650a80c9712 (patch) | |
tree | eb8a10f0a742294a23c9e74cc97c2e92f9d91f36 /drivers/input | |
parent | cbfae70f1dcaf3cc6e93061179dad80caa1597fe (diff) | |
download | kernel_samsung_smdk4412-cea4b18c0f6d20915f779529a22fb650a80c9712.zip kernel_samsung_smdk4412-cea4b18c0f6d20915f779529a22fb650a80c9712.tar.gz kernel_samsung_smdk4412-cea4b18c0f6d20915f779529a22fb650a80c9712.tar.bz2 |
melfas touch: report touch events to cypress for backlight timeout
Change-Id: I9f7470566d740e90a3e8d595fec34ba21b3ff1e1
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/touchscreen/mms152_ts.c | 34 |
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]); |