Input: elan_i2c - expand maximum product_id form 0xFF to 0xFFFF
In order to support more projects in the future, we expand the maximum product_id value form 0xFF to 0xFFFF. Signed-off by: Duson Lin <dusonlin@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
c84333a1c5
commit
ed75a14eb5
@ -60,7 +60,7 @@ struct elan_transport_ops {
|
|||||||
int (*get_sm_version)(struct i2c_client *client,
|
int (*get_sm_version)(struct i2c_client *client,
|
||||||
u8* ic_type, u8 *version);
|
u8* ic_type, u8 *version);
|
||||||
int (*get_checksum)(struct i2c_client *client, bool iap, u16 *csum);
|
int (*get_checksum)(struct i2c_client *client, bool iap, u16 *csum);
|
||||||
int (*get_product_id)(struct i2c_client *client, u8 *id);
|
int (*get_product_id)(struct i2c_client *client, u16 *id);
|
||||||
|
|
||||||
int (*get_max)(struct i2c_client *client,
|
int (*get_max)(struct i2c_client *client,
|
||||||
unsigned int *max_x, unsigned int *max_y);
|
unsigned int *max_x, unsigned int *max_y);
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
#include "elan_i2c.h"
|
#include "elan_i2c.h"
|
||||||
|
|
||||||
#define DRIVER_NAME "elan_i2c"
|
#define DRIVER_NAME "elan_i2c"
|
||||||
#define ELAN_DRIVER_VERSION "1.6.0"
|
#define ELAN_DRIVER_VERSION "1.6.1"
|
||||||
#define ETP_MAX_PRESSURE 255
|
#define ETP_MAX_PRESSURE 255
|
||||||
#define ETP_FWIDTH_REDUCE 90
|
#define ETP_FWIDTH_REDUCE 90
|
||||||
#define ETP_FINGER_WIDTH 15
|
#define ETP_FINGER_WIDTH 15
|
||||||
@ -76,7 +76,7 @@ struct elan_tp_data {
|
|||||||
unsigned int x_res;
|
unsigned int x_res;
|
||||||
unsigned int y_res;
|
unsigned int y_res;
|
||||||
|
|
||||||
u8 product_id;
|
u16 product_id;
|
||||||
u8 fw_version;
|
u8 fw_version;
|
||||||
u8 sm_version;
|
u8 sm_version;
|
||||||
u8 iap_version;
|
u8 iap_version;
|
||||||
|
@ -276,7 +276,7 @@ static int elan_i2c_get_sm_version(struct i2c_client *client,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int elan_i2c_get_product_id(struct i2c_client *client, u8 *id)
|
static int elan_i2c_get_product_id(struct i2c_client *client, u16 *id)
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
u8 val[3];
|
u8 val[3];
|
||||||
@ -287,7 +287,7 @@ static int elan_i2c_get_product_id(struct i2c_client *client, u8 *id)
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
*id = val[0];
|
*id = le16_to_cpup((__le16 *)val);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ static int elan_smbus_get_sm_version(struct i2c_client *client,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int elan_smbus_get_product_id(struct i2c_client *client, u8 *id)
|
static int elan_smbus_get_product_id(struct i2c_client *client, u16 *id)
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
u8 val[3];
|
u8 val[3];
|
||||||
@ -195,7 +195,7 @@ static int elan_smbus_get_product_id(struct i2c_client *client, u8 *id)
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
*id = val[1];
|
*id = be16_to_cpup((__be16 *)val);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user