Skip to content

Commit

Permalink
Input: bcm5974 - Report button also for zero fingers
Browse files Browse the repository at this point in the history
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 <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Henrik Rydberg authored and Dmitry Torokhov committed Feb 27, 2011
1 parent 1d64b65 commit 5063511
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/input/mouse/bcm5974.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,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;
Expand All @@ -412,6 +408,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)
Expand Down

0 comments on commit 5063511

Please sign in to comment.