summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/elants_i2c.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-10-23 16:16:31 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-10-23 16:16:31 -0700
commitbd7e8c996f5aba542f416ee6d19e91fd3668674f (patch)
treed75c0094e0e2f82d18e02fbb7e5362984b36863f /drivers/input/touchscreen/elants_i2c.c
parent40a03b750bb3ded71a0f21a0b7dfbf3b24068dcb (diff)
parentbb0bc0cfeabc0d6865865e8d3a601bea6711f951 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov: - a new driver for ADC driven joysticks - a new Zintix touchscreen driver - enhancements to Intel SoC button array driver - support for F3A "function" in Synaptics RMI4 driver - assorted driver fixups * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (29 commits) Input: Add MAINTAINERS entry for SiS i2c touch input driver Input: evdev - per-client waitgroups Input: synaptics - enable InterTouch for ThinkPad T14 Gen 1 Input: synaptics - enable InterTouch for ThinkPad P1/X1E gen 2 Input: synaptics-rmi4 - support bootloader v8 in f34v7 Input: synaptics-rmi4 - add support for F3A Input: synaptics-rmi4 - rename f30_data to gpio_data Input: add zinitix touchscreen driver dt-bindings: input/touchscreen: add bindings for zinitix Input: joystick - add ADC attached joystick driver. dt-bindings: input: Add docs for ADC driven joystick Input: sun4i-ps2 - fix handling of platform_get_irq() error Input: twl4030_keypad - fix handling of platform_get_irq() error Input: omap4-keypad - fix handling of platform_get_irq() error Input: ep93xx_keypad - fix handling of platform_get_irq() error Input: stmfts - fix a & vs && typo Input: imx6ul_tsc - unify open/close and PM paths Input: imx6ul_tsc - clean up some errors in imx6ul_tsc_resume() Input: elants_i2c - fix typo for an attribute to show calibration count Input: elants_i2c - report resolution of ABS_MT_TOUCH_MAJOR by FW information. ...
Diffstat (limited to 'drivers/input/touchscreen/elants_i2c.c')
-rw-r--r--drivers/input/touchscreen/elants_i2c.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
index b0bd5bb079be..50c348297e38 100644
--- a/drivers/input/touchscreen/elants_i2c.c
+++ b/drivers/input/touchscreen/elants_i2c.c
@@ -90,7 +90,7 @@
/* FW read command, 0x53 0x?? 0x0, 0x01 */
#define E_ELAN_INFO_FW_VER 0x00
#define E_ELAN_INFO_BC_VER 0x10
-#define E_ELAN_INFO_REK 0xE0
+#define E_ELAN_INFO_REK 0xD0
#define E_ELAN_INFO_TEST_VER 0xE0
#define E_ELAN_INFO_FW_ID 0xF0
#define E_INFO_OSR 0xD6
@@ -134,6 +134,7 @@ struct elants_data {
u8 bc_version;
u8 iap_version;
u16 hw_version;
+ u8 major_res;
unsigned int x_res; /* resolution in units/mm */
unsigned int y_res;
unsigned int x_max;
@@ -459,6 +460,9 @@ static int elants_i2c_query_ts_info(struct elants_data *ts)
rows = resp[2] + resp[6] + resp[10];
cols = resp[3] + resp[7] + resp[11];
+ /* Get report resolution value of ABS_MT_TOUCH_MAJOR */
+ ts->major_res = resp[16];
+
/* Process mm_to_pixel information */
error = elants_i2c_execute_command(client,
get_osr_cmd, sizeof(get_osr_cmd),
@@ -1325,6 +1329,8 @@ static int elants_i2c_probe(struct i2c_client *client,
0, MT_TOOL_PALM, 0, 0);
input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->x_res);
input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->y_res);
+ if (ts->major_res > 0)
+ input_abs_set_res(ts->input, ABS_MT_TOUCH_MAJOR, ts->major_res);
touchscreen_parse_properties(ts->input, true, &ts->prop);