alistair23-linux/drivers/input/mouse
Stephen Lyons 4c711ef628 Input: psmouse - add support for 2nd wheel on A4Tech Dual-Scroll wheel mice
This Far-Eastern company's PS/2 mice use a deviant format for the data
relating to movement of the scroll wheels for, at least, their dual wheel
mice, such as their "Optical GreatEye Wheelmouse" model "WOP-35".  This
product has five "buttons" (one of which is the click action on the first
wheel) and TWO scroll wheels.  However for a byte comprising d0-d7 instead
of setting one of d6-7 in the forth byte of the mouse data packet and a
twos complement number of scroll steps in the remaining d5-d0 (or d3-d0
should there be a fourth (BTN_SIDE - d4) or fifth (BTN_EXTRA - d5) button
to report; they only report a single +/- event for each wheel and use a bit
pattern that corresponds to +/-1 for the first wheel and +/- 2 for the
second in the lower nibble of the fourth byte.

The effect with existing code is that the second mouse wheel merely repeats
the effect of the first but providing two steps per click rather than the
one of the first wheel - so there is no HORIZONTAL scroll wheel movement
detected from the device as far as the rest of the kernel sees it.

This patch, if enabled by the "a4tech_workaround" module parameter modifies
the handling just for mice of type PSMOUSE_IMEX so that the second scroll
wheel movement gets correctly reported as REL_HWHEEL events.  Should this
module parameter be activated for other mice of the same PSMOUSE_IMEX type
then it is possible that at the point where the mouse reports more than a
single movement step the user may start seeing horizontal rather than
vertical wheel events, but should the movement steps get to be more than
two at a time the hack will get immediately deactivated and the behaviour
will revert to the past code.

This was discussed around *fifteen* *years* *ago* on the LKML and the best
summary is in post https://lkml.org/lkml/2002/7/18/111 "Re: PS2 Input Core
Support" by Vojtech Pavlik. I was not able to locate any discussion later
than this on this topic.

Given that most users of the "psmouse" module will NOT want this additional
feature enabled I have taken the apparently erroneous step of defaulting
the module parameter that enables it to be "disabled" - this functionality
may interfere with the operation of "normal" mice of this type (until a
large enough scroll wheel movement is detected) so I cannot see how it
would want to be enabled for "normal" users - i.e.  everyone without this
brand of mouse.

I am using this patch at the moment and I can confirm that it is working
for me as both a module and compiled into the kernel for my mouse that is
of the type (WOP-35) described - I note that it is still available from
certain on-line retailers and that the manufacturers site does not list
GNU/Linux as being supported on the product page - this patch however does
enable full use of this product:
http://www.a4tech.com/product.asp?cid=3D1&scid=3D8&id=3D22

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-02-02 16:49:35 -08:00
..
alps.c Input: psmouse - create helper for reporting standard buttons/motion 2018-02-02 16:48:56 -08:00
alps.h Input: ALPS - fix multi-touch decoding on SS4 plus touchpads 2018-01-12 00:41:36 -08:00
amimouse.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
appletouch.c Input: appletouch - constify usb_device_id 2017-08-07 20:10:18 -07:00
atarimouse.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
bcm5974.c Input: mouse - use local variables consistently 2017-01-21 23:52:22 -08:00
byd.c Input: byd - convert to using timer_setup() 2017-10-23 16:31:43 -07:00
byd.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cyapa.c Input: mouse - use local variables consistently 2017-01-21 23:52:22 -08:00
cyapa.h Input: cyapa - fix for losing events during device power transitions 2016-03-04 11:32:13 -08:00
cyapa_gen3.c Input: cyapa - use msleep() for long delay 2017-01-15 15:40:23 -08:00
cyapa_gen5.c Input: cyapa - fix for losing events during device power transitions 2016-03-04 11:32:13 -08:00
cyapa_gen6.c Input: cyapa - fix for losing events during device power transitions 2016-03-04 11:32:13 -08:00
cypress_ps2.c Input: mouse - drop unnecessary calls to input_set_drvdata 2017-01-22 17:22:28 -08:00
cypress_ps2.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
elan_i2c.h Input: elan_i2c - support touchpads with two physical buttons 2017-08-18 17:07:02 -07:00
elan_i2c_core.c Merge branch 'next' into for-linus 2017-11-13 17:10:13 -08:00
elan_i2c_i2c.c Input: elan_i2c - extend Flash-Write delay 2017-09-22 10:07:38 -07:00
elan_i2c_smbus.c Input: elan_i2c - support touchpads with two physical buttons 2017-08-18 17:07:02 -07:00
elantech.c Input: psmouse - create helper for reporting standard buttons/motion 2018-02-02 16:48:56 -08:00
elantech.h Input: elantech - add special check for fw_version 0x470f01 touchpad 2015-08-07 14:54:15 -07:00
focaltech.c Input: psmouse - cleanup Focaltech code 2016-10-24 17:19:25 -07:00
focaltech.h Input: psmouse - rearrange Focaltech init code 2015-12-17 15:23:54 -08:00
gpio_mouse.c Input: gpio_mouse - add device tree probing 2017-10-19 17:08:46 -07:00
hgpk.c Input: mouse - use local variables consistently 2017-01-21 23:52:22 -08:00
hgpk.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
inport.c Annotate hardware config module parameters in drivers/input/ 2017-04-20 12:02:32 +01:00
Kconfig Input: synaptics - add support for Intertouch devices 2017-03-25 10:37:30 -07:00
lifebook.c Input: lifebook - clean up code 2018-02-02 16:49:17 -08:00
lifebook.h Input: lifebook - use "static inline" instead of "inline" in lifebook.h 2014-11-09 22:59:25 -08:00
logibm.c Annotate hardware config module parameters in drivers/input/ 2017-04-20 12:02:32 +01:00
logips2pp.c Input: logips2pp - clean up code 2018-02-02 16:49:01 -08:00
logips2pp.h Input: psmouse - rename ps2pp_init() to ps2pp_detect() 2015-12-17 15:24:37 -08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
maplemouse.c Input: mouse - drop unnecessary calls to input_set_drvdata 2017-01-22 17:22:28 -08:00
navpoint.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-12-17 10:06:02 -08:00
pc110pad.c Input: switch to input_abs_*() access functions 2010-08-02 20:29:56 -07:00
psmouse-base.c Input: psmouse - add support for 2nd wheel on A4Tech Dual-Scroll wheel mice 2018-02-02 16:49:35 -08:00
psmouse-smbus.c Input: psmouse - use i2c_client_type to locate i2c clients 2017-04-03 12:03:55 -07:00
psmouse.h Input: psmouse - create helper for reporting standard buttons/motion 2018-02-02 16:48:56 -08:00
pxa930_trkball.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
rpcmouse.c input: rpcmouse: use __iomem pointers for MMIO 2012-09-19 15:37:13 +02:00
sentelic.c Input: psmouse - create helper for reporting standard buttons/motion 2018-02-02 16:48:56 -08:00
sentelic.h Input: sentelic - use "static inline" instead of "inline" 2015-05-22 10:59:54 -07:00
sermouse.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
synaptics.c Input: synaptics - Lenovo Thinkpad T460p devices should use RMI 2018-01-10 16:38:41 -08:00
synaptics.h Input: synaptics - use u8 instead of unsigned char 2017-04-03 16:23:58 -07:00
synaptics_i2c.c Input: synaptics_i2c - add OF device ID table 2017-03-23 14:46:32 -07:00
synaptics_usb.c Input: synaptics_usb - constify usb_device_id 2017-08-07 20:10:19 -07:00
touchkit_ps2.c Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
touchkit_ps2.h Input: psmouse - use boolean type 2009-09-10 22:11:38 -07:00
trackpoint.c Input: trackpoint - only expose supported controls for Elan, ALPS and NXP 2018-01-22 16:24:36 -08:00
trackpoint.h Input: trackpoint - only expose supported controls for Elan, ALPS and NXP 2018-01-22 16:24:36 -08:00
vmmouse.c x86/virt: Add enum for hypervisors to replace x86_hyper 2017-11-10 10:03:12 +01:00
vmmouse.h Input: add vmmouse driver 2015-04-14 14:29:03 -07:00
vsxxxaa.c Input: vsxxxaa - fix code dropping bytes from queue 2014-10-28 10:33:48 -07:00