2010-09-22 11:27:00 ad7879 touch issues
Appalayagari Sreedhar (INDIA)
Message: 93753
Hi,
I am working with the custom board with BF527 2009R1-RC3 distribution. In the custom board we have the touch interface.
touch controller ic ad7879 is used. We used tslib user interface.
When we press the touch interface without releasing the hand (without release ) the pressure sample is giving zero.
This is observed quite frequent when we operate the i2c bus at 400kHz compared at 100kHz.
Could you please suggest what to be done to solve this problem. we desired to get pressure samples 0 only when we release the hand.
Thank you, Sreedhar
QuoteReplyEditDelete
2010-09-22 11:32:15 ad7879 touch issues
Michael Hennerich (GERMANY)
Message: 93754 This issue has been resolved.
Please take the ad7879 driver from svn trunk.
QuoteReplyEditDelete
2010-09-29 03:09:17 Re: ad7879 touch issues
Appalayagari Sreedhar (INDIA)
Message: 93945
Dear Micheal,
Thank you, the trunk version i can not directly use it in my working distribution it gives lot of compilation problems.
I am working with the distribution 2009R1-RC1 linux kernel version v2.6.28.10.
which ad7879 driver revision will be compatabile to this and solve the above mentioned problem.
we are using the 2009R1-RC1 distribution for the product development so migrating to newer distribution might be quite dificult for us. please provide your help.
Thank you.
QuoteReplyEditDelete
2010-09-29 03:54:47 Re: ad7879 touch issues
Michael Hennerich (GERMANY)
Message: 93956 I checked following patch into the 2009R1 branch:
input: touchscreen: ad7879: Fix release scheduling on error and implement EV_KEY:BTN_TOUCH reporting
Some input users such as Android or X require BTN_TOUCH events.
Implement EV_KEY:BTN_TOUCH and make sure that the release event
is not erroneous scheduled without a preceding valid touch.
Index: drivers/input/touchscreen/ad7879.c
===================================================================
--- drivers/input/touchscreen/ad7879.c (revision 9175)
+++ drivers/input/touchscreen/ad7879.c (working copy)
@@ -160,7 +160,7 @@
static int ad7879_write(bus_device *, u8, u16);
static void ad7879_collect(struct ad7879 *);
-static void ad7879_report(struct ad7879 *ts)
+static int ad7879_report(struct ad7879 *ts)
{
struct input_dev *input_dev = ts->input;
unsigned Rt;
@@ -187,11 +187,17 @@
Rt /= z1;
Rt = (Rt + 2047) >> 12;
+ if (!timer_pending(&ts->timer))
+ input_report_key(input_dev, BTN_TOUCH, 1);
+
input_report_abs(input_dev, ABS_X, x);
input_report_abs(input_dev, ABS_Y, y);
input_report_abs(input_dev, ABS_PRESSURE, Rt);
input_sync(input_dev);
+ return 0;
}
+
+ return -EINVAL;
}
static void ad7879_work(struct work_struct *work)
@@ -200,8 +206,8 @@
/* use keventd context to read the result registers */
ad7879_collect(ts);
- ad7879_report(ts);
- mod_timer(&ts->timer, jiffies + TS_PEN_UP_TIMEOUT);
+ if (!ad7879_report(ts))
+ mod_timer(&ts->timer, jiffies + TS_PEN_UP_TIMEOUT);
}
static void ad7879_ts_event_release(struct ad7879 *ts)
@@ -209,6 +215,7 @@
struct input_dev *input_dev = ts->input;
input_report_abs(input_dev, ABS_PRESSURE, 0);
+ input_report_key(input_dev, BTN_TOUCH, 0);
input_sync(input_dev);
}
@@ -419,6 +426,9 @@
__set_bit(ABS_Y, input_dev->absbit);
__set_bit(ABS_PRESSURE, input_dev->absbit);
+ __set_bit(EV_KEY, input_dev->evbit);
+ __set_bit(BTN_TOUCH, input_dev->keybit);
+
input_set_abs_params(input_dev, ABS_X,
pdata->x_min ? : 0,
pdata->x_max ? : MAX_12BIT,
QuoteReplyEditDelete
2010-09-29 09:40:14 Re: ad7879 touch issues
Appalayagari Sreedhar (INDIA)
Message: 93978
Hi Micheal,
I checked by applying this patch. it is not working still the issue exits. please let me know is there anything i need to take care.
Thank you.
QuoteReplyEditDelete
2010-10-01 03:08:55 Re: ad7879 touch issues
Appalayagari Sreedhar (INDIA)
Message: 94090
Hi Micheal,
Need your help in resolving the issues.
Thank you, Sreedhar.
QuoteReplyEditDelete
2010-10-01 03:13:32 Re: ad7879 touch issues
Michael Hennerich (GERMANY)
Message: 94091 Please describe the issue in all detail.
The best thing would be to provide event_test outputs and describe the moves that you are doing.
In addition you can also try to increase the TS_PEN_UP_TIMEOUT value.
#define TS_PEN_UP_TIMEOUT msecs_to_jiffies(50)
-Michael