Add Elantech trackpad support

Elantech trackpads are found in some laptops like the Asus UX31E. They
are "synaptics compatible" but use a slightly different protocol.

Elantech hardware support is not enabled by default and just like
Synaptic or TrackPoint devices it should be enabled by setting
tunable, in this case hw.psm.elantech_support, to non-zero value

PR:		205690
Submitted by:	Vladimir Kondratyev <wulf@cicgroup.ru>
MFC after:	1 week
This commit is contained in:
Oleksandr Tymoshenko 2016-09-26 22:06:19 +00:00
parent cda20f96df
commit 0fe98e8f2c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=306355
2 changed files with 1705 additions and 518 deletions

File diff suppressed because it is too large Load Diff

View File

@ -170,6 +170,7 @@ typedef struct synapticshw {
#define MOUSE_MODEL_4DPLUS 12
#define MOUSE_MODEL_SYNAPTICS 13
#define MOUSE_MODEL_TRACKPOINT 14
#define MOUSE_MODEL_ELANTECH 15
typedef struct mousemode {
int protocol; /* MOUSE_PROTO_XXX */
@ -240,6 +241,9 @@ typedef struct mousevar {
/* Synaptics Touchpad */
#define MOUSE_SYNAPTICS_PACKETSIZE 6 /* '3' works better */
/* Elantech Touchpad */
#define MOUSE_ELANTECH_PACKETSIZE 6
/* Microsoft Serial mouse data packet */
#define MOUSE_MSS_PACKETSIZE 3
#define MOUSE_MSS_SYNCMASK 0x40