* [PATCH 1/4] Revert to anonymous 'type A' MT protocol for touch
@ 2011-07-07 21:04 Jason Gerecke
2011-07-07 21:04 ` [PATCH 2/4] Use MT (in addition to single-touch) protocol for all events Jason Gerecke
` (3 more replies)
0 siblings, 4 replies; 14+ messages in thread
From: Jason Gerecke @ 2011-07-07 21:04 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Linux Input, Ping Cheng, Jason Gerecke, Dima Zavin, Jason Gerecke
Android (at least up to Gingerbread) does not understand the 'B' protocol
first made available in 2.6.36. As a workaround until this is fixed, we
drop back to using the 'A' protocol.
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
---
Now being sent upstream to LKML at the behest of Google.
drivers/input/touchscreen/wacom_w8001.c | 33 ++++++++++++++++++++++++++----
1 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/drivers/input/touchscreen/wacom_w8001.c b/drivers/input/touchscreen/wacom_w8001.c
index c14412e..7630806 100644
--- a/drivers/input/touchscreen/wacom_w8001.c
+++ b/drivers/input/touchscreen/wacom_w8001.c
@@ -151,8 +151,6 @@ static void parse_multi_touch(struct w8001 *w8001)
for (i = 0; i < 2; i++) {
bool touch = data[0] & (1 << i);
- input_mt_slot(dev, i);
- input_mt_report_slot_state(dev, MT_TOOL_FINGER, touch);
if (touch) {
x = (data[6 * i + 1] << 7) | data[6 * i + 2];
y = (data[6 * i + 3] << 7) | data[6 * i + 4];
@@ -163,9 +161,14 @@ static void parse_multi_touch(struct w8001 *w8001)
input_report_abs(dev, ABS_MT_POSITION_X, x);
input_report_abs(dev, ABS_MT_POSITION_Y, y);
+ input_report_abs(dev, ABS_MT_TOOL_TYPE, MT_TOOL_FINGER);
count++;
+
+ input_mt_sync(dev);
}
}
+ if (count == 0)
+ input_mt_sync(dev);
/* emulate single touch events when stylus is out of proximity.
* This is to make single touch backward support consistent
@@ -173,8 +176,20 @@ static void parse_multi_touch(struct w8001 *w8001)
*/
if (w8001->type != BTN_TOOL_PEN &&
w8001->type != BTN_TOOL_RUBBER) {
+ struct w8001_coord coord;
+
w8001->type = count == 1 ? BTN_TOOL_FINGER : KEY_RESERVED;
- input_mt_report_pointer_emulation(dev, true);
+
+ parse_single_touch(data, &coord);
+ x = coord.x;
+ y = coord.y;
+ scale_touch_coordinates(w8001, &x, &y);
+
+ input_report_abs(dev, ABS_X, x);
+ input_report_abs(dev, ABS_Y, y);
+ input_report_key(dev, BTN_TOUCH, count > 0);
+ input_report_key(dev, BTN_TOOL_FINGER, count == 1);
+ input_report_key(dev, BTN_TOOL_DOUBLETAP, count == 2);
}
input_sync(dev);
@@ -228,6 +243,10 @@ static void report_pen_events(struct w8001 *w8001, struct w8001_coord *coord)
input_report_key(dev, BTN_STYLUS, 0);
input_report_key(dev, BTN_STYLUS2, 0);
input_report_key(dev, BTN_TOOL_RUBBER, 0);
+
+ /* No multi-touchpoints -> SYN_MT_REPORT; SYN_REPORT */
+ input_mt_sync(dev);
+
input_sync(dev);
w8001->type = BTN_TOOL_PEN;
}
@@ -236,10 +255,15 @@ static void report_pen_events(struct w8001 *w8001, struct w8001_coord *coord)
case BTN_TOOL_FINGER:
input_report_key(dev, BTN_TOUCH, 0);
input_report_key(dev, BTN_TOOL_FINGER, 0);
- input_sync(dev);
+
/* fall through */
case KEY_RESERVED:
+ /* No multi-touchpoints -> SYN_MT_REPORT; SYN_REPORT */
+ input_mt_sync(dev);
+
+ input_sync(dev);
+
w8001->type = coord->f2 ? BTN_TOOL_RUBBER : BTN_TOOL_PEN;
break;
@@ -455,7 +479,6 @@ static int w8001_setup(struct w8001 *w8001)
case 5:
w8001->pktlen = W8001_PKTLEN_TOUCH2FG;
- input_mt_init_slots(dev, 2);
input_set_abs_params(dev, ABS_MT_POSITION_X,
0, touch.x, 0, 0);
input_set_abs_params(dev, ABS_MT_POSITION_Y,
--
1.7.5.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/4] Use MT (in addition to single-touch) protocol for all events
2011-07-07 21:04 [PATCH 1/4] Revert to anonymous 'type A' MT protocol for touch Jason Gerecke
@ 2011-07-07 21:04 ` Jason Gerecke
2011-07-07 21:04 ` [PATCH 3/4] Fix hover in Android (Gingerbread) Jason Gerecke
` (2 subsequent siblings)
3 siblings, 0 replies; 14+ messages in thread
From: Jason Gerecke @ 2011-07-07 21:04 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Linux Input, Ping Cheng, Jason Gerecke, Dima Zavin, Jason Gerecke
Android (begining with Gingerbread) ignores all single-touch events
from multi-touch capable devices. This patch augments the pen and
single-touch handlers to emit MT events for Android's consumption.
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
---
Now being sent upstream to LKML at the behest of Google.
drivers/input/touchscreen/wacom_w8001.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/drivers/input/touchscreen/wacom_w8001.c b/drivers/input/touchscreen/wacom_w8001.c
index 7630806..e94a21a 100644
--- a/drivers/input/touchscreen/wacom_w8001.c
+++ b/drivers/input/touchscreen/wacom_w8001.c
@@ -278,6 +278,13 @@ static void report_pen_events(struct w8001 *w8001, struct w8001_coord *coord)
input_report_key(dev, BTN_TOUCH, coord->tsw);
input_report_key(dev, BTN_STYLUS, coord->f1);
input_report_key(dev, w8001->type, coord->rdy);
+
+ input_report_abs(dev, ABS_MT_POSITION_X, coord->x);
+ input_report_abs(dev, ABS_MT_POSITION_Y, coord->y);
+ input_report_abs(dev, ABS_MT_PRESSURE, coord->pen_pressure);
+ input_report_abs(dev, ABS_MT_TOOL_TYPE, MT_TOOL_PEN);
+
+ input_mt_sync(dev);
input_sync(dev);
if (!coord->rdy)
@@ -298,6 +305,11 @@ static void report_single_touch(struct w8001 *w8001, struct w8001_coord *coord)
input_report_key(dev, BTN_TOUCH, coord->tsw);
input_report_key(dev, BTN_TOOL_FINGER, coord->tsw);
+ input_report_abs(dev, ABS_MT_POSITION_X, x);
+ input_report_abs(dev, ABS_MT_POSITION_Y, y);
+ input_report_abs(dev, ABS_MT_TOOL_TYPE, MT_TOOL_FINGER);
+
+ input_mt_sync(dev);
input_sync(dev);
w8001->type = coord->tsw ? BTN_TOOL_FINGER : KEY_RESERVED;
@@ -485,6 +497,8 @@ static int w8001_setup(struct w8001 *w8001)
0, touch.y, 0, 0);
input_set_abs_params(dev, ABS_MT_TOOL_TYPE,
0, MT_TOOL_MAX, 0, 0);
+ input_set_abs_params(dev, ABS_MT_PRESSURE,
+ 0, coord.pen_pressure, 0, 0);
strlcat(w8001->name, " 2FG", sizeof(w8001->name));
if (w8001->max_pen_x && w8001->max_pen_y)
--
1.7.5.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/4] Fix hover in Android (Gingerbread)
2011-07-07 21:04 [PATCH 1/4] Revert to anonymous 'type A' MT protocol for touch Jason Gerecke
2011-07-07 21:04 ` [PATCH 2/4] Use MT (in addition to single-touch) protocol for all events Jason Gerecke
@ 2011-07-07 21:04 ` Jason Gerecke
2011-07-08 1:13 ` Jaya Kumar
2011-07-09 6:15 ` Jeffrey Brown
2011-07-07 21:05 ` [PATCH 4/4] Only report multi-touch when pen is out of range Jason Gerecke
2011-07-07 21:35 ` [PATCH 1/4] Revert to anonymous 'type A' MT protocol for touch Dmitry Torokhov
3 siblings, 2 replies; 14+ messages in thread
From: Jason Gerecke @ 2011-07-07 21:04 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Linux Input, Ping Cheng, Jason Gerecke, Dima Zavin, Jason Gerecke
As of Gingerbread, Android does not pay attention to if the pen
is in contact with the screen, or merely in proximity. Since the
Xorg Wacom driver does not make use of MT pen events, we simply
do not emit MT data while hovering.
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
---
Now being sent upstream to LKML at the behest of Google.
drivers/input/touchscreen/wacom_w8001.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/input/touchscreen/wacom_w8001.c b/drivers/input/touchscreen/wacom_w8001.c
index e94a21a..40ed685 100644
--- a/drivers/input/touchscreen/wacom_w8001.c
+++ b/drivers/input/touchscreen/wacom_w8001.c
@@ -279,10 +279,12 @@ static void report_pen_events(struct w8001 *w8001, struct w8001_coord *coord)
input_report_key(dev, BTN_STYLUS, coord->f1);
input_report_key(dev, w8001->type, coord->rdy);
- input_report_abs(dev, ABS_MT_POSITION_X, coord->x);
- input_report_abs(dev, ABS_MT_POSITION_Y, coord->y);
- input_report_abs(dev, ABS_MT_PRESSURE, coord->pen_pressure);
- input_report_abs(dev, ABS_MT_TOOL_TYPE, MT_TOOL_PEN);
+ if (coord->pen_pressure > 0) {
+ input_report_abs(dev, ABS_MT_POSITION_X, coord->x);
+ input_report_abs(dev, ABS_MT_POSITION_Y, coord->y);
+ input_report_abs(dev, ABS_MT_PRESSURE, coord->pen_pressure);
+ input_report_abs(dev, ABS_MT_TOOL_TYPE, MT_TOOL_PEN);
+ }
input_mt_sync(dev);
input_sync(dev);
--
1.7.5.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 3/4] Fix hover in Android (Gingerbread)
2011-07-07 21:04 ` [PATCH 3/4] Fix hover in Android (Gingerbread) Jason Gerecke
@ 2011-07-08 1:13 ` Jaya Kumar
2011-07-08 21:04 ` Jason Gerecke
2011-07-09 6:15 ` Jeffrey Brown
1 sibling, 1 reply; 14+ messages in thread
From: Jaya Kumar @ 2011-07-08 1:13 UTC (permalink / raw)
To: Jason Gerecke
Cc: Dmitry Torokhov, Linux Input, Ping Cheng, Jason Gerecke,
Dima Zavin
On Fri, Jul 8, 2011 at 5:04 AM, Jason Gerecke <killertofu@gmail.com> wrote:
> As of Gingerbread, Android does not pay attention to if the pen
> is in contact with the screen, or merely in proximity. Since the
> Xorg Wacom driver does not make use of MT pen events, we simply
> do not emit MT data while hovering.
Hi Jason,
It would be nice if you could CC me next time. I would like to be
aware of the changes to the driver I wrote and use.
I guess the change below is ok, but it changes existing behavior. It
doesn't affect my apps (be aware that Xorg and Android may be the well
known users, but there are other custom apps).
Thanks,
jaya
>
> Signed-off-by: Jason Gerecke <killertofu@gmail.com>
> ---
> Now being sent upstream to LKML at the behest of Google.
>
> drivers/input/touchscreen/wacom_w8001.c | 10 ++++++----
> 1 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/input/touchscreen/wacom_w8001.c b/drivers/input/touchscreen/wacom_w8001.c
> index e94a21a..40ed685 100644
> --- a/drivers/input/touchscreen/wacom_w8001.c
> +++ b/drivers/input/touchscreen/wacom_w8001.c
> @@ -279,10 +279,12 @@ static void report_pen_events(struct w8001 *w8001, struct w8001_coord *coord)
> input_report_key(dev, BTN_STYLUS, coord->f1);
> input_report_key(dev, w8001->type, coord->rdy);
>
> - input_report_abs(dev, ABS_MT_POSITION_X, coord->x);
> - input_report_abs(dev, ABS_MT_POSITION_Y, coord->y);
> - input_report_abs(dev, ABS_MT_PRESSURE, coord->pen_pressure);
> - input_report_abs(dev, ABS_MT_TOOL_TYPE, MT_TOOL_PEN);
> + if (coord->pen_pressure > 0) {
> + input_report_abs(dev, ABS_MT_POSITION_X, coord->x);
> + input_report_abs(dev, ABS_MT_POSITION_Y, coord->y);
> + input_report_abs(dev, ABS_MT_PRESSURE, coord->pen_pressure);
> + input_report_abs(dev, ABS_MT_TOOL_TYPE, MT_TOOL_PEN);
> + }
>
> input_mt_sync(dev);
> input_sync(dev);
> --
> 1.7.5.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/4] Fix hover in Android (Gingerbread)
2011-07-08 1:13 ` Jaya Kumar
@ 2011-07-08 21:04 ` Jason Gerecke
2011-07-09 6:16 ` Dima Zavin
0 siblings, 1 reply; 14+ messages in thread
From: Jason Gerecke @ 2011-07-08 21:04 UTC (permalink / raw)
To: Jaya Kumar
Cc: Dmitry Torokhov, Linux Input, Ping Cheng, Jason Gerecke,
Dima Zavin
On Thu, Jul 7, 2011 at 6:13 PM, Jaya Kumar <jayakumar.lkml@gmail.com> wrote:
> On Fri, Jul 8, 2011 at 5:04 AM, Jason Gerecke <killertofu@gmail.com> wrote:
>> As of Gingerbread, Android does not pay attention to if the pen
>> is in contact with the screen, or merely in proximity. Since the
>> Xorg Wacom driver does not make use of MT pen events, we simply
>> do not emit MT data while hovering.
>
> Hi Jason,
>
> It would be nice if you could CC me next time. I would like to be
> aware of the changes to the driver I wrote and use.
>
> I guess the change below is ok, but it changes existing behavior. It
> doesn't affect my apps (be aware that Xorg and Android may be the well
> known users, but there are other custom apps).
>
> Thanks,
> jaya
>
Thanks for the heads-up. Since I had originally intended the patches
to go against the Android tree, I wasn't thinking too hard about how
other things would react to the changes. I figured I'd make them
Xorg-compatible in case they were rejected by Google, but didn't
consider custom applications.
Based on the replies to the first patch though, I may be withdrawing
these patches anyway... We need to wait and see if my Android
rejection is reversed or not.
Jason
---
Day xee-nee-svsh duu-'ushtlh-ts'it;
nuu-wee-ya' duu-xan' 'vm-nvshtlh-ts'it.
Huu-chan xuu naa~-gha.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/4] Fix hover in Android (Gingerbread)
2011-07-08 21:04 ` Jason Gerecke
@ 2011-07-09 6:16 ` Dima Zavin
0 siblings, 0 replies; 14+ messages in thread
From: Dima Zavin @ 2011-07-09 6:16 UTC (permalink / raw)
To: Jason Gerecke
Cc: Jaya Kumar, Dmitry Torokhov, Linux Input, Ping Cheng,
Jason Gerecke
On Fri, Jul 8, 2011 at 2:04 PM, Jason Gerecke <killertofu@gmail.com> wrote:
> On Thu, Jul 7, 2011 at 6:13 PM, Jaya Kumar <jayakumar.lkml@gmail.com> wrote:
>> On Fri, Jul 8, 2011 at 5:04 AM, Jason Gerecke <killertofu@gmail.com> wrote:
>>> As of Gingerbread, Android does not pay attention to if the pen
>>> is in contact with the screen, or merely in proximity. Since the
>>> Xorg Wacom driver does not make use of MT pen events, we simply
>>> do not emit MT data while hovering.
>>
>> Hi Jason,
>>
>> It would be nice if you could CC me next time. I would like to be
>> aware of the changes to the driver I wrote and use.
>>
>> I guess the change below is ok, but it changes existing behavior. It
>> doesn't affect my apps (be aware that Xorg and Android may be the well
>> known users, but there are other custom apps).
>>
>> Thanks,
>> jaya
>>
>
> Thanks for the heads-up. Since I had originally intended the patches
> to go against the Android tree, I wasn't thinking too hard about how
> other things would react to the changes. I figured I'd make them
> Xorg-compatible in case they were rejected by Google, but didn't
> consider custom applications.
>
> Based on the replies to the first patch though, I may be withdrawing
> these patches anyway... We need to wait and see if my Android
> rejection is reversed or not.
It will not be. We do not want to carry non-essential patches in our
tree. Our userspace now implements the B protocol, so things should
work fine in the next release.
--Dima
>
> Jason
>
> ---
> Day xee-nee-svsh duu-'ushtlh-ts'it;
> nuu-wee-ya' duu-xan' 'vm-nvshtlh-ts'it.
> Huu-chan xuu naa~-gha.
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/4] Fix hover in Android (Gingerbread)
2011-07-07 21:04 ` [PATCH 3/4] Fix hover in Android (Gingerbread) Jason Gerecke
2011-07-08 1:13 ` Jaya Kumar
@ 2011-07-09 6:15 ` Jeffrey Brown
2011-07-09 6:22 ` Dima Zavin
1 sibling, 1 reply; 14+ messages in thread
From: Jeffrey Brown @ 2011-07-09 6:15 UTC (permalink / raw)
To: Jason Gerecke
Cc: Dmitry Torokhov, Linux Input, Ping Cheng, Jason Gerecke,
Dima Zavin
On Thu, Jul 7, 2011 at 2:04 PM, Jason Gerecke <killertofu@gmail.com> wrote:
> As of Gingerbread, Android does not pay attention to if the pen
> is in contact with the screen, or merely in proximity. Since the
> Xorg Wacom driver does not make use of MT pen events, we simply
> do not emit MT data while hovering.
I'd rather not change the behavior of the upstream driver because that
would break other things. It would be better to just fix the Android
framework code for the device you are shipping.
What is it about Gingerbread that causes problems with hover? Is it
the fact it isn't checking BTN_TOUCH or the fact that it doesn't care
when ABS_MT_PRESSURE == 0? (Is BTN_TOUCH still relevant to the MT
protocol or only in single-touch?)
I have already added hover support to Android. It will appear in an
upcoming release, along with support for the MT slots protocol "B".
Sending a non-zero ABS_MT_DISTANCE is also a good robust hint for
hover. Zero pressure can be ambiguous sometimes.
Who did you talk to at Google about this?
Jeff.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/4] Fix hover in Android (Gingerbread)
2011-07-09 6:15 ` Jeffrey Brown
@ 2011-07-09 6:22 ` Dima Zavin
0 siblings, 0 replies; 14+ messages in thread
From: Dima Zavin @ 2011-07-09 6:22 UTC (permalink / raw)
To: Jeffrey Brown
Cc: Jason Gerecke, Dmitry Torokhov, Linux Input, Ping Cheng,
Jason Gerecke
Jason spoke with me. I pushed back because I did not want to carry any
patches for this in our kernel tree and asked Jason to send them
upstream. I, unfortunately, did not take a close look to see what the
patches were doing. As mentioned, these android-specific changes
shouldn't be accepted.
--Dima
On Fri, Jul 8, 2011 at 11:15 PM, Jeffrey Brown <jeffbrown@android.com> wrote:
> On Thu, Jul 7, 2011 at 2:04 PM, Jason Gerecke <killertofu@gmail.com> wrote:
>> As of Gingerbread, Android does not pay attention to if the pen
>> is in contact with the screen, or merely in proximity. Since the
>> Xorg Wacom driver does not make use of MT pen events, we simply
>> do not emit MT data while hovering.
>
> I'd rather not change the behavior of the upstream driver because that
> would break other things. It would be better to just fix the Android
> framework code for the device you are shipping.
>
> What is it about Gingerbread that causes problems with hover? Is it
> the fact it isn't checking BTN_TOUCH or the fact that it doesn't care
> when ABS_MT_PRESSURE == 0? (Is BTN_TOUCH still relevant to the MT
> protocol or only in single-touch?)
>
> I have already added hover support to Android. It will appear in an
> upcoming release, along with support for the MT slots protocol "B".
>
> Sending a non-zero ABS_MT_DISTANCE is also a good robust hint for
> hover. Zero pressure can be ambiguous sometimes.
>
> Who did you talk to at Google about this?
>
> Jeff.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 4/4] Only report multi-touch when pen is out of range
2011-07-07 21:04 [PATCH 1/4] Revert to anonymous 'type A' MT protocol for touch Jason Gerecke
2011-07-07 21:04 ` [PATCH 2/4] Use MT (in addition to single-touch) protocol for all events Jason Gerecke
2011-07-07 21:04 ` [PATCH 3/4] Fix hover in Android (Gingerbread) Jason Gerecke
@ 2011-07-07 21:05 ` Jason Gerecke
2011-07-09 6:19 ` Jeffrey Brown
2011-07-07 21:35 ` [PATCH 1/4] Revert to anonymous 'type A' MT protocol for touch Dmitry Torokhov
3 siblings, 1 reply; 14+ messages in thread
From: Jason Gerecke @ 2011-07-07 21:05 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Linux Input, Ping Cheng, Jason Gerecke, Dima Zavin, Jason Gerecke
Don't bother evaluating multi-touch packets from the hardware
when the pen is in range. Single-touch is already filtered, but
not MT.
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
---
Now being sent upstream to LKML at the behest of Google.
drivers/input/touchscreen/wacom_w8001.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/input/touchscreen/wacom_w8001.c b/drivers/input/touchscreen/wacom_w8001.c
index 40ed685..393fd3c 100644
--- a/drivers/input/touchscreen/wacom_w8001.c
+++ b/drivers/input/touchscreen/wacom_w8001.c
@@ -379,7 +379,10 @@ static irqreturn_t w8001_interrupt(struct serio *serio,
/* 2 finger touch packet */
case W8001_PKTLEN_TOUCH2FG - 1:
w8001->idx = 0;
- parse_multi_touch(w8001);
+ if (w8001->type != BTN_TOOL_PEN &&
+ w8001->type != BTN_TOOL_RUBBER) {
+ parse_multi_touch(w8001);
+ }
break;
}
--
1.7.5.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 4/4] Only report multi-touch when pen is out of range
2011-07-07 21:05 ` [PATCH 4/4] Only report multi-touch when pen is out of range Jason Gerecke
@ 2011-07-09 6:19 ` Jeffrey Brown
0 siblings, 0 replies; 14+ messages in thread
From: Jeffrey Brown @ 2011-07-09 6:19 UTC (permalink / raw)
To: Jason Gerecke
Cc: Dmitry Torokhov, Linux Input, Ping Cheng, Jason Gerecke,
Dima Zavin
I don't see why we should filter out multitouch while the pen is in
range. There are many reasons why it might be useful to support
simultaneous pen and touch.
For example, use one finger to select a color to draw with and use the
pen in the other hand to draw.
Jeff.
On Thu, Jul 7, 2011 at 2:05 PM, Jason Gerecke <killertofu@gmail.com> wrote:
> Don't bother evaluating multi-touch packets from the hardware
> when the pen is in range. Single-touch is already filtered, but
> not MT.
>
> Signed-off-by: Jason Gerecke <killertofu@gmail.com>
> ---
> Now being sent upstream to LKML at the behest of Google.
>
> drivers/input/touchscreen/wacom_w8001.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/input/touchscreen/wacom_w8001.c b/drivers/input/touchscreen/wacom_w8001.c
> index 40ed685..393fd3c 100644
> --- a/drivers/input/touchscreen/wacom_w8001.c
> +++ b/drivers/input/touchscreen/wacom_w8001.c
> @@ -379,7 +379,10 @@ static irqreturn_t w8001_interrupt(struct serio *serio,
> /* 2 finger touch packet */
> case W8001_PKTLEN_TOUCH2FG - 1:
> w8001->idx = 0;
> - parse_multi_touch(w8001);
> + if (w8001->type != BTN_TOOL_PEN &&
> + w8001->type != BTN_TOOL_RUBBER) {
> + parse_multi_touch(w8001);
> + }
> break;
> }
>
> --
> 1.7.5.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/4] Revert to anonymous 'type A' MT protocol for touch
2011-07-07 21:04 [PATCH 1/4] Revert to anonymous 'type A' MT protocol for touch Jason Gerecke
` (2 preceding siblings ...)
2011-07-07 21:05 ` [PATCH 4/4] Only report multi-touch when pen is out of range Jason Gerecke
@ 2011-07-07 21:35 ` Dmitry Torokhov
2011-07-07 21:52 ` Dima Zavin
3 siblings, 1 reply; 14+ messages in thread
From: Dmitry Torokhov @ 2011-07-07 21:35 UTC (permalink / raw)
To: Jason Gerecke; +Cc: Linux Input, Ping Cheng, Jason Gerecke, Dima Zavin
On Thu, Jul 07, 2011 at 02:04:57PM -0700, Jason Gerecke wrote:
> Android (at least up to Gingerbread) does not understand the 'B' protocol
> first made available in 2.6.36. As a workaround until this is fixed, we
> drop back to using the 'A' protocol.
>
Well, fix Android then. Same goes for patches 2 & 3.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/4] Revert to anonymous 'type A' MT protocol for touch
2011-07-07 21:35 ` [PATCH 1/4] Revert to anonymous 'type A' MT protocol for touch Dmitry Torokhov
@ 2011-07-07 21:52 ` Dima Zavin
2011-07-07 22:32 ` Jason Gerecke
2011-08-03 4:31 ` Jiejing.Zhang
0 siblings, 2 replies; 14+ messages in thread
From: Dima Zavin @ 2011-07-07 21:52 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Jason Gerecke, Linux Input, Ping Cheng, Jason Gerecke
Agreed. The next version will correctly use protocol B. When I briefly
(too briefly clearly :-( ) looked at the original patches, I thought
they were driver bug fixes. If it's just workarounds for stuff android
doesn't do, then we should fix our framework.
Jason, do any of these patches fix actual driver bugs or make the
driver more robust?
--Dima
On Thu, Jul 7, 2011 at 2:35 PM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> On Thu, Jul 07, 2011 at 02:04:57PM -0700, Jason Gerecke wrote:
>> Android (at least up to Gingerbread) does not understand the 'B' protocol
>> first made available in 2.6.36. As a workaround until this is fixed, we
>> drop back to using the 'A' protocol.
>>
>
> Well, fix Android then. Same goes for patches 2 & 3.
>
> Thanks.
>
> --
> Dmitry
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/4] Revert to anonymous 'type A' MT protocol for touch
2011-07-07 21:52 ` Dima Zavin
@ 2011-07-07 22:32 ` Jason Gerecke
2011-08-03 4:31 ` Jiejing.Zhang
1 sibling, 0 replies; 14+ messages in thread
From: Jason Gerecke @ 2011-07-07 22:32 UTC (permalink / raw)
To: Dima Zavin; +Cc: Dmitry Torokhov, Linux Input, Ping Cheng, Jason Gerecke
On Thu, Jul 7, 2011 at 2:52 PM, Dima Zavin <dima@android.com> wrote:
> Agreed. The next version will correctly use protocol B. When I briefly
> (too briefly clearly :-( ) looked at the original patches, I thought
> they were driver bug fixes. If it's just workarounds for stuff android
> doesn't do, then we should fix our framework.
>
> Jason, do any of these patches fix actual driver bugs or make the
> driver more robust?
>
The only patch which *may* be a bugfix is number 4 ("Only report
multi-touch when pen is out of range"). I can only reproduce
multi-touch + pen oddities under Android, but that could be due to
some kind of filtering from the xf86-input-wacom driver.
The remaining patches are absolutely specific to Android (though still
compatible with desktop distros).
Jason
---
Day xee-nee-svsh duu-'ushtlh-ts'it;
nuu-wee-ya' duu-xan' 'vm-nvshtlh-ts'it.
Huu-chan xuu naa~-gha.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/4] Revert to anonymous 'type A' MT protocol for touch
2011-07-07 21:52 ` Dima Zavin
2011-07-07 22:32 ` Jason Gerecke
@ 2011-08-03 4:31 ` Jiejing.Zhang
1 sibling, 0 replies; 14+ messages in thread
From: Jiejing.Zhang @ 2011-08-03 4:31 UTC (permalink / raw)
To: Dima Zavin
Cc: Dmitry Torokhov, Jason Gerecke, Linux Input, Ping Cheng,
Jason Gerecke
Hi Dima,
Could you tell when will android support protocol B ?
I'm using android honeycomb mr2 release, I found it not support Protocol B yet.
Best regards,
Zhang Jiejing
2011/7/8 Dima Zavin <dima@android.com>:
> Agreed. The next version will correctly use protocol B. When I briefly
> (too briefly clearly :-( ) looked at the original patches, I thought
> they were driver bug fixes. If it's just workarounds for stuff android
> doesn't do, then we should fix our framework.
>
> Jason, do any of these patches fix actual driver bugs or make the
> driver more robust?
>
> --Dima
>
> On Thu, Jul 7, 2011 at 2:35 PM, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
>> On Thu, Jul 07, 2011 at 02:04:57PM -0700, Jason Gerecke wrote:
>>> Android (at least up to Gingerbread) does not understand the 'B' protocol
>>> first made available in 2.6.36. As a workaround until this is fixed, we
>>> drop back to using the 'A' protocol.
>>>
>>
>> Well, fix Android then. Same goes for patches 2 & 3.
>>
>> Thanks.
>>
>> --
>> Dmitry
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2011-08-03 4:36 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-07 21:04 [PATCH 1/4] Revert to anonymous 'type A' MT protocol for touch Jason Gerecke
2011-07-07 21:04 ` [PATCH 2/4] Use MT (in addition to single-touch) protocol for all events Jason Gerecke
2011-07-07 21:04 ` [PATCH 3/4] Fix hover in Android (Gingerbread) Jason Gerecke
2011-07-08 1:13 ` Jaya Kumar
2011-07-08 21:04 ` Jason Gerecke
2011-07-09 6:16 ` Dima Zavin
2011-07-09 6:15 ` Jeffrey Brown
2011-07-09 6:22 ` Dima Zavin
2011-07-07 21:05 ` [PATCH 4/4] Only report multi-touch when pen is out of range Jason Gerecke
2011-07-09 6:19 ` Jeffrey Brown
2011-07-07 21:35 ` [PATCH 1/4] Revert to anonymous 'type A' MT protocol for touch Dmitry Torokhov
2011-07-07 21:52 ` Dima Zavin
2011-07-07 22:32 ` Jason Gerecke
2011-08-03 4:31 ` Jiejing.Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).