Skip to content

Commit a6821f3

Browse files
rydbergdtor
authored andcommitted
Input: bcm5974 - add BTN_TOUCH event for mousedev benefit
The mousedev driver requires the use of BTN_TOUCH events to process ABS_X and ABS_Y events properly, which is what is needed for the bcm5974-based apple computers to have a functional pointer out-of-the-box. Signed-off-by: Henrik Rydberg <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 75e21e3 commit a6821f3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/input/mouse/bcm5974.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ static void setup_events_to_report(struct input_dev *input_dev,
253253
0, cfg->y.dim, cfg->y.fuzz, 0);
254254

255255
__set_bit(EV_KEY, input_dev->evbit);
256+
__set_bit(BTN_TOUCH, input_dev->keybit);
256257
__set_bit(BTN_TOOL_FINGER, input_dev->keybit);
257258
__set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit);
258259
__set_bit(BTN_TOOL_TRIPLETAP, input_dev->keybit);
@@ -320,6 +321,7 @@ static int report_tp_state(struct bcm5974 *dev, int size)
320321
if (dev->fingers > nmax)
321322
dev->fingers = nmax;
322323

324+
input_report_key(input, BTN_TOUCH, dev->fingers > 0);
323325
input_report_key(input, BTN_TOOL_FINGER, dev->fingers == 1);
324326
input_report_key(input, BTN_TOOL_DOUBLETAP, dev->fingers == 2);
325327
input_report_key(input, BTN_TOOL_TRIPLETAP, dev->fingers > 2);

0 commit comments

Comments
 (0)