Input: iqs269a - add support for slider gestures
authorJeff LaBundy <jeff@labundy.com>
Mon, 1 Jan 2024 20:02:23 +0000 (14:02 -0600)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 1 Jan 2024 21:24:03 +0000 (13:24 -0800)
commit00521a9bf96eaab358886d7a0c531d52027d3241
treeac57bc5f51e17c694fa37f21597f608305df1133
parent65cdd3ada7dcec1863022b2ca218ae409f99c759
Input: iqs269a - add support for slider gestures

This patch adds support for slider gestures that can be expressed
by the device. Each gesture (e.g. tap or hold) can be mapped to a
unique keycode for either slider 0 or 1.

With this change, raw slider coordinates are reported only if the
slider has no keycodes defined. This prevents unwanted mouse cur-
sor movement when expressing axial gestures (e.g. swipe) and also
eliminates some unnecessary I2C traffic.

Different revisions of silicon use different tap and swipe timeout
step sizes. Apply an appropriate scaling factor depending on which
revision is found.

To facilitate this change, store the iqs269_ver_info struct in the
driver's private data so that other functions can use it after the
driver has probed.

Last but not least, a former reserved field in iqs269_ver_info now
contains useful information; give it a name (fw_num).

Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/ZZMaT46WQq1/Nrsb@nixie71
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/iqs269a.c