]> git.baikalelectronics.ru Git - kernel.git/commit
Input: trackpoint - only expose supported controls for Elan, ALPS and NXP
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 5 Jan 2018 21:28:47 +0000 (13:28 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 23 Jan 2018 00:24:36 +0000 (16:24 -0800)
commit28dada2ab6f9b0161486ac5518a26a3e47fb78e0
treea0d4842432ed789c6dff8b4e4e6493cb984f83e3
parentc190b13a026b2c1a94541f096490835ec81c90e6
Input: trackpoint - only expose supported controls for Elan, ALPS and NXP

The newer trackpoints from ALPS, Elan and NXP implement a very limited
subset of extended commands and controls that the original trackpoints
implemented, so we should not be exposing not working controls in sysfs.
The newer trackpoints also do not implement "Power On Reset" or "Read
Extended Button Status", so we should not be using these commands during
initialization.

While we are at it, let's change "unsigned char" to u8 for byte data or
bool for booleans and use better suited error codes instead of -1.

Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/trackpoint.c
drivers/input/mouse/trackpoint.h