summaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/elan_i2c.h
diff options
context:
space:
mode:
authorJingle Wu <jingle.wu@emc.com.tw>2020-07-20 12:46:10 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-07-21 10:11:18 -0700
commit04d5ce620f794f1df69b5f1b9ad62910fea547f1 (patch)
tree0ce909edccb217f0339238e7c02c558b89586751 /drivers/input/mouse/elan_i2c.h
parent3d712af637e19a1c139c2b586c08b2a56bdff8c8 (diff)
downloadlinux-04d5ce620f794f1df69b5f1b9ad62910fea547f1.tar.bz2
Input: elan_i2c - add support for high resolution reports
Newer controllers (identified as "pattern" version 2) send higher resolution reports, with 16-bit X and Y coordinates (previous generations used 12-bit values). These new high resolution reports use report ID of 0x60. SMbus controllers use the same buffer size for both the new and old reports, and because of that high resolution reports no longer carry area of contact data with SMbus. Signed-off-by: Jingle Wu <jingle.wu@emc.com.tw> Link: https://lore.kernel.org/r/20200710054116.5529-1-jingle.wu@emc.com.tw Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/elan_i2c.h')
-rw-r--r--drivers/input/mouse/elan_i2c.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/input/mouse/elan_i2c.h b/drivers/input/mouse/elan_i2c.h
index 6e6f13a4489c..c75b00c45d75 100644
--- a/drivers/input/mouse/elan_i2c.h
+++ b/drivers/input/mouse/elan_i2c.h
@@ -26,6 +26,8 @@
#define ETP_CALIBRATE_MAX_LEN 3
+#define ETP_FEATURE_REPORT_MK BIT(0)
+
/* IAP Firmware handling */
#define ETP_PRODUCT_ID_FORMAT_STRING "%d.0"
#define ETP_FW_NAME "elan_i2c_" ETP_PRODUCT_ID_FORMAT_STRING ".bin"
@@ -82,7 +84,11 @@ struct elan_transport_ops {
int (*finish_fw_update)(struct i2c_client *client,
struct completion *reset_done);
- int (*get_report)(struct i2c_client *client, u8 *report);
+ int (*get_report_features)(struct i2c_client *client, u8 pattern,
+ unsigned int *features,
+ unsigned int *report_len);
+ int (*get_report)(struct i2c_client *client, u8 *report,
+ unsigned int report_len);
int (*get_pressure_adjustment)(struct i2c_client *client,
int *adjustment);
int (*get_pattern)(struct i2c_client *client, u8 *pattern);