Input: elan_i2c - add product IDs FW names
[firefly-linux-kernel-4.4.55.git] / drivers / input / mouse / elan_i2c.h
index e100c1b31597d7efe67ae358983e21c5dd234fb8..73670f2aebfd5e189ab794c6ffd4b44759bb5acb 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #ifndef _ELAN_I2C_H
-#define _ELAN_i2C_H
+#define _ELAN_I2C_H
 
 #include <linux/types.h>
 
 #define ETP_ENABLE_CALIBRATE   0x0002
 #define ETP_DISABLE_CALIBRATE  0x0000
 #define ETP_DISABLE_POWER      0x0001
+#define ETP_PRESSURE_OFFSET    25
 
 /* IAP Firmware handling */
-#define ETP_FW_NAME            "elan_i2c.bin"
+#define ETP_PRODUCT_ID_FORMAT_STRING   "%d.0"
+#define ETP_FW_NAME            "elan_i2c_" ETP_PRODUCT_ID_FORMAT_STRING ".bin"
 #define ETP_IAP_START_ADDR     0x0083
 #define ETP_FW_IAP_PAGE_ERR    (1 << 5)
 #define ETP_FW_IAP_INTF_ERR    (1 << 4)
 #define ETP_FW_PAGE_SIZE       64
-#define ETP_FW_VAILDPAGE_COUNT 768
 #define ETP_FW_SIGNATURE_SIZE  6
-#define ETP_FW_SIGNATURE_ADDRESS       0xBFFA
 
 struct i2c_client;
 struct completion;
@@ -57,7 +57,8 @@ struct elan_transport_ops {
                                 bool max_baseliune, u8 *value);
 
        int (*get_version)(struct i2c_client *client, bool iap, u8 *version);
-       int (*get_sm_version)(struct i2c_client *client, u8 *version);
+       int (*get_sm_version)(struct i2c_client *client,
+                             u8* ic_type, u8 *version);
        int (*get_checksum)(struct i2c_client *client, bool iap, u16 *csum);
        int (*get_product_id)(struct i2c_client *client, u8 *id);
 
@@ -79,6 +80,8 @@ struct elan_transport_ops {
                                struct completion *reset_done);
 
        int (*get_report)(struct i2c_client *client, u8 *report);
+       int (*get_pressure_adjustment)(struct i2c_client *client,
+                                      int *adjustment);
 };
 
 extern const struct elan_transport_ops elan_smbus_ops, elan_i2c_ops;