[lkml]   [2009]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectThree buttons reported on two-button touchpad
Kernel 2.6.31.x

Synaptics Touchpad, model: 1, fw: 6.3, id: 0x1c0b1, caps: 0xa04751/0x0

but /proc/bus/input/devices:

I: Bus=0011 Vendor=0002 Product=0007 Version=01b1
N: Name="SynPS/2 Synaptics TouchPad"
P: Phys=isa0060/serio1/input0
S: Sysfs=/devices/platform/i8042/serio1/input/input15
U: Uniq=
H: Handlers=mouse1 event2
B: EV=b
B: KEY=420 70000 0 0 0 0
B: ABS=11000003

So even when capabilities clear say only 2 buttons, driver claims there
are 3 of them.

The reason most likely is initialization sequence.
psmouse_switch_protocol() unconditionally sets supported buttons:

input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
input_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_LEFT) |
input_dev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y);

before even starting hardware detection and knowing real capabilities.
Detection for specific hardware won't change it (possibly only extend).

Is it OK to move button bits setting into ps2bare_detect()? This seems
to agree with comments in psmouse_extensions() as well:

* Okay, all failed, we have a standard mouse here. The number of the
* is still a question, though. We assume 3.

All other detection routines seem to be setting those bits already.
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2009-11-14 13:55    [W:0.040 / U:1.524 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site