[PATCH] Input: bcm5974 - Report button also for zero fingers

Subsystems: apple bcm5974 multitouch driver, input (keyboard, mouse, joystick, touchscreen) drivers, the rest

STALE5683d

3 messages, 2 authors, 2011-02-24 · open the first message on its own page

[PATCH] Input: bcm5974 - Report button also for zero fingers

From: Henrik Rydberg <hidden>
Date: 2011-02-24 19:36:40

With the current code, pressing the integrated button with an
isolating tool does not result in any button report. Fixed
with this this patch.

Signed-off-by: Henrik Rydberg <redacted>
---
Hi Dmitry,

that nobody every complained about this bug is beyond me...

Thanks,
Henrik

 drivers/input/mouse/bcm5974.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
index ee82851..0efaf66 100644
--- a/drivers/input/mouse/bcm5974.c
+++ b/drivers/input/mouse/bcm5974.c
@@ -430,10 +430,6 @@ static int report_tp_state(struct bcm5974 *dev, int size)
 		ptest = int2bound(&c->p, raw_p);
 		origin = raw2int(f->origin);
 
-		/* set the integrated button if applicable */
-		if (c->tp_type == TYPE2)
-			ibt = raw2int(dev->tp_data[BUTTON_TYPE2]);
-
 		/* while tracking finger still valid, count all fingers */
 		if (ptest > PRESSURE_LOW && origin) {
 			abs_p = ptest;
@@ -452,6 +448,10 @@ static int report_tp_state(struct bcm5974 *dev, int size)
 		}
 	}
 
+	/* set the integrated button if applicable */
+	if (c->tp_type == TYPE2)
+		ibt = raw2int(dev->tp_data[BUTTON_TYPE2]);
+
 	if (dev->fingers < nmin)
 		dev->fingers = nmin;
 	if (dev->fingers > nmax)
-- 
1.7.4.1

Re: [PATCH] Input: bcm5974 - Report button also for zero fingers

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2011-02-24 22:21:55

On Thu, Feb 24, 2011 at 08:37:44PM +0100, Henrik Rydberg wrote:
With the current code, pressing the integrated button with an
isolating tool does not result in any button report. Fixed
with this this patch.

Signed-off-by: Henrik Rydberg <redacted>
---
Hi Dmitry,

that nobody every complained about this bug is beyond me...
I guess nobody uses styluses to work with the touchpad... I'll apply it
of course, but since I do not recall bug reports I'll hold it till .39 I
think.

Thanks. 

-- 
Dmitry

Re: [PATCH] Input: bcm5974 - Report button also for zero fingers

From: Henrik Rydberg <hidden>
Date: 2011-02-24 22:31:00

On Thu, Feb 24, 2011 at 02:20:59PM -0800, Dmitry Torokhov wrote:
On Thu, Feb 24, 2011 at 08:37:44PM +0100, Henrik Rydberg wrote:
quoted
With the current code, pressing the integrated button with an
isolating tool does not result in any button report. Fixed
with this this patch.

Signed-off-by: Henrik Rydberg <redacted>
---
Hi Dmitry,

that nobody every complained about this bug is beyond me...
I guess nobody uses styluses to work with the touchpad... I'll apply it
of course, but since I do not recall bug reports I'll hold it till .39 I
think.
I was hoping it could slip into 2.6.38 - I can even produce a bug
report if needed. :-)

Henrik
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help