[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.2-230-g3cf36c4
Brought to you by:
sszy
|
From: Fabien M <fa...@us...> - 2013-04-24 13:26:25
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 3cf36c4872277442202817e379aacfec76faa680 (commit)
from 3138c748a90ec4d2c0f5792c042286f4f762f064 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3cf36c4872277442202817e379aacfec76faa680
Author: Fabien Marteau <fab...@ar...>
Date: Wed Apr 24 15:26:04 2013 +0200
[apf28][kernel] refresh touch status only on touch detection
-----------------------------------------------------------------------
Summary of changes:
.../linux/2.6.35/453-armadeus-mxs-ts-fixes.patch | 61 ++++++++++----------
1 files changed, 30 insertions(+), 31 deletions(-)
diff --git a/patches/linux/2.6.35/453-armadeus-mxs-ts-fixes.patch b/patches/linux/2.6.35/453-armadeus-mxs-ts-fixes.patch
index 979ad1f..3f355a1 100644
--- a/patches/linux/2.6.35/453-armadeus-mxs-ts-fixes.patch
+++ b/patches/linux/2.6.35/453-armadeus-mxs-ts-fixes.patch
@@ -4,8 +4,8 @@ Signed-off-by: Nicolas Colombain <nic...@ar...>
Index: linux-2.6.35.3/drivers/input/touchscreen/mxs-ts.c
===================================================================
---- linux-2.6.35.3.orig/drivers/input/touchscreen/mxs-ts.c 2012-01-31 14:27:22.000000000 +0100
-+++ linux-2.6.35.3/drivers/input/touchscreen/mxs-ts.c 2012-02-03 17:42:26.000000000 +0100
+--- linux-2.6.35.3.orig/drivers/input/touchscreen/mxs-ts.c 2013-04-24 12:56:53.000000000 +0200
++++ linux-2.6.35.3/drivers/input/touchscreen/mxs-ts.c 2013-04-24 15:05:35.000000000 +0200
@@ -1,8 +1,9 @@
/*
- * Freesclae MXS Touchscreen driver
@@ -26,7 +26,7 @@ Index: linux-2.6.35.3/drivers/input/touchscreen/mxs-ts.c
struct mxs_ts_info {
int touch_irq;
-@@ -50,6 +51,8 @@ struct mxs_ts_info {
+@@ -50,6 +51,8 @@
unsigned int y_plus_mask;
unsigned int y_minus_mask;
@@ -35,7 +35,7 @@ Index: linux-2.6.35.3/drivers/input/touchscreen/mxs-ts.c
struct input_dev *idev;
enum {
TS_STATE_DISABLED,
-@@ -60,161 +63,142 @@ struct mxs_ts_info {
+@@ -60,161 +63,141 @@
} state;
u16 x;
u16 y;
@@ -81,7 +81,7 @@ Index: linux-2.6.35.3/drivers/input/touchscreen/mxs-ts.c
info->sample_count = 0;
+ info->x = 0;
+ info->y = 0;
-+
++
+ hw_lradc_set_delay_trigger_kick(LRADC_DELAY_TRIGGER_TOUCHSCREEN, 1);
}
@@ -118,19 +118,23 @@ Index: linux-2.6.35.3/drivers/input/touchscreen/mxs-ts.c
- hw_lradc_set_delay_trigger_kick(LRADC_DELAY_TRIGGER_TOUCHSCREEN, 1);
+ struct mxs_ts_info *info =
+ container_of(to_delayed_work(work), struct mxs_ts_info, activate_touch_detect);
++
info->state = TS_STATE_X_PLANE;
- info->sample_count = 0;
+
+ /* check if the pen is always down */
+ if( __raw_readl(info->base + HW_LRADC_STATUS) & BM_LRADC_STATUS_TOUCH_DETECT_RAW ){
-+ info->pressure = 1;
++ info->pressure = 1;
++ input_report_abs(info->idev, ABS_X, info->x);
++ input_report_abs(info->idev, ABS_Y, info->y);
++ input_report_abs(info->idev, ABS_PRESSURE, 100);
++ input_sync(info->idev);
+ /* if yes, start a new scan */
+ enter_state_x_plane(info);
-+ }
-+ else{
++ } else{
+ if (info->pressure){
-+ info->pressure = 0;
++ info->pressure = 0;
+ /* report touch pen up */
+ input_report_key(info->idev, BTN_TOUCH, 0);
+ input_report_abs(info->idev, ABS_PRESSURE, 0);
@@ -175,7 +179,7 @@ Index: linux-2.6.35.3/drivers/input/touchscreen/mxs-ts.c
- info->sample_count = 0;
+ info->base + HW_LRADC_CTRL0_SET);
+ /* delay touch detect interrupt enable due to touch capacitance and imx28 bug */
-+ schedule_delayed_work(&info->activate_touch_detect, msecs_to_jiffies(5));
++ schedule_delayed_work(&info->activate_touch_detect, msecs_to_jiffies(1));
}
-static inline void enter_state_touch_verify(struct mxs_ts_info *info)
@@ -220,11 +224,11 @@ Index: linux-2.6.35.3/drivers/input/touchscreen/mxs-ts.c
+ info->x += x;
+ info->sample_count++;
+ if (info->sample_count >= FILTER_SIZE){
-+ info->x = info->x >> FILTER_SIZE;
++ info->x = info->x >> (FILTER_SIZE>>1);
enter_state_y_plane(info);
- else
+ }
-+ else{
++ else{
hw_lradc_set_delay_trigger_kick(
LRADC_DELAY_TRIGGER_TOUCHSCREEN, 1);
+ }
@@ -244,22 +248,19 @@ Index: linux-2.6.35.3/drivers/input/touchscreen/mxs-ts.c
- info->y = (y_c + y) / info->sample_count;
- info->sample_count++;
- }
-- }
++ info->y += y;
++ info->sample_count++;
++ if (info->sample_count >= FILTER_SIZE){
++ info->y = info->y >> (FILTER_SIZE>>1);
++ enter_state_touch_detect(info);
+ }
- if (info->sample_count > 4)
- enter_state_touch_verify(info);
- else
- hw_lradc_set_delay_trigger_kick(
- LRADC_DELAY_TRIGGER_TOUCHSCREEN, 1);
- break;
-+ info->y += y;
-+ info->sample_count++;
-+ if (info->sample_count >= FILTER_SIZE){
-+ info->y = info->y >> FILTER_SIZE;
-+ input_report_abs(info->idev, ABS_X, info->x);
-+ input_report_abs(info->idev, ABS_Y, info->y);
-+ input_report_abs(info->idev, ABS_PRESSURE, 100);
-+ input_sync(info->idev);
-
+-
- case TS_STATE_TOUCH_VERIFY:
- pr_debug("%s: touch verify state, sample_count %d\n", __func__,
- info->sample_count);
@@ -275,18 +276,16 @@ Index: linux-2.6.35.3/drivers/input/touchscreen/mxs-ts.c
- if (pressure) {
- input_report_abs(info->idev, ABS_PRESSURE, pressure);
- enter_state_x_plane(info);
-+ enter_state_touch_detect(info);
-+ }
+ else{
hw_lradc_set_delay_trigger_kick(
LRADC_DELAY_TRIGGER_TOUCHSCREEN, 1);
- } else
- enter_state_touch_detect(info);
-+ }
++ }
break;
default:
-@@ -227,30 +211,29 @@ static irqreturn_t ts_handler(int irq, v
+@@ -227,30 +210,29 @@
{
struct mxs_ts_info *info = dev_id;
u16 x_plus, y_plus;
@@ -334,7 +333,7 @@ Index: linux-2.6.35.3/drivers/input/touchscreen/mxs-ts.c
return IRQ_HANDLED;
}
-@@ -278,7 +261,8 @@ static int __devinit mxs_ts_probe(struct
+@@ -278,7 +260,8 @@
}
idev->name = "MXS touchscreen";
@@ -344,7 +343,7 @@ Index: linux-2.6.35.3/drivers/input/touchscreen/mxs-ts.c
input_set_abs_params(idev, ABS_X, 0, 0xFFF, 0, 0);
input_set_abs_params(idev, ABS_Y, 0, 0xFFF, 0, 0);
input_set_abs_params(idev, ABS_PRESSURE, 0, 1, 0, 0);
-@@ -301,6 +285,8 @@ static int __devinit mxs_ts_probe(struct
+@@ -301,6 +284,8 @@
info->y_plus_mask = plat_data->y_plus_mask;
info->y_minus_mask = plat_data->y_minus_mask;
@@ -353,7 +352,7 @@ Index: linux-2.6.35.3/drivers/input/touchscreen/mxs-ts.c
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
printk(KERN_ERR "%s: couldn't get MEM resource\n", __func__);
-@@ -335,7 +321,6 @@ static int __devinit mxs_ts_probe(struct
+@@ -335,7 +320,6 @@
free_irq(info->touch_irq, info);
goto out_nodev;
}
@@ -361,7 +360,7 @@ Index: linux-2.6.35.3/drivers/input/touchscreen/mxs-ts.c
hw_lradc_use_channel(info->x_plus_chan);
hw_lradc_use_channel(info->x_minus_chan);
-@@ -366,8 +351,8 @@ static int __devinit mxs_ts_probe(struct
+@@ -366,8 +350,8 @@
__raw_writel(BM_LRADC_CTRL1_LRADC0_IRQ_EN << info->y_minus_chan,
info->base + HW_LRADC_CTRL1_SET);
@@ -372,7 +371,7 @@ Index: linux-2.6.35.3/drivers/input/touchscreen/mxs-ts.c
platform_set_drvdata(pdev, info);
device_init_wakeup(&pdev->dev, 1);
-@@ -401,6 +386,7 @@ static int __devexit mxs_ts_remove(struc
+@@ -401,6 +385,7 @@
free_irq(info->device_irq, info);
free_irq(info->touch_irq, info);
hooks/post-receive
--
armadeus
|