--- v5
+++ v4
@@ -1,32 +1,58 @@
-Print unsigned values as '%u'.
-Also, parse and print the firmware version in its canonical format, as
-suggested by Nick Dyer.
+The matrix x/y size in the Info ID Block represents the number of x/y
+trace lines on the device. There is no need to re-read them after
+applying pdata config, since pdata only configures the object table
+etnries. The matrix size read from the ID can only be updated by a
+firmware update.
+
+As a side affect, to squash a compiler warning, remove the 1-byte limited
+mxt_read_reg() since it no longer has any callers.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
---
- drivers/input/touchscreen/atmel_mxt_ts.c | 8 ++++----
- 1 files changed, 4 insertions(+), 4 deletions(-)
+ drivers/input/touchscreen/atmel_mxt_ts.c | 17 -----------------
+ 1 files changed, 0 insertions(+), 17 deletions(-)
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
-index 07e0238..be7da72 100644
+index 87004ec..214bf8d 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
-@@ -855,12 +855,12 @@ static int mxt_initialize(struct mxt_data *data)
- info->matrix_ysize = val;
+@@ -426,11 +426,6 @@ static int __mxt_read_reg(struct i2c_client *client,
+ return ret;
+ }
+-static int mxt_read_reg(struct i2c_client *client, u16 reg, u8 *val)
+-{
+- return __mxt_read_reg(client, reg, 1, val);
+-}
+-
+ static int __mxt_write_reg(struct i2c_client *client, u16 reg, u16 len,
+ const void *val)
+ {
+@@ -805,7 +800,6 @@ static int mxt_initialize(struct mxt_data *data)
+ struct i2c_client *client = data->client;
+ struct mxt_info *info = &data->info;
+ int error;
+- u8 val;
+
+ error = mxt_get_info(data);
+ if (error)
+@@ -842,17 +836,6 @@ static int mxt_initialize(struct mxt_data *data)
+ MXT_COMMAND_RESET, 1);
+ msleep(MXT_RESET_TIME);
+
+- /* Update matrix size at info struct */
+- error = mxt_read_reg(client, MXT_MATRIX_X_SIZE, &val);
+- if (error)
+- return error;
+- info->matrix_xsize = val;
+-
+- error = mxt_read_reg(client, MXT_MATRIX_Y_SIZE, &val);
+- if (error)
+- return error;
+- info->matrix_ysize = val;
+-
dev_info(&client->dev,
-- "Family ID: %d Variant ID: %d Version: %d Build: %d\n",
-- info->family_id, info->variant_id, info->version,
-- info->build);
-+ "Family ID: %u Variant ID: %u Major.Minor.Build: %u.%u.%02X\n",
-+ info->family_id, info->variant_id, info->version >> 4,
-+ info->version & 0xf, info->build);
-
- dev_info(&client->dev,
-- "Matrix X Size: %d Matrix Y Size: %d Object Num: %d\n",
-+ "Matrix X Size: %u Matrix Y Size: %u Object Num: %u\n",
- info->matrix_xsize, info->matrix_ysize,
- info->object_num);
-
+ "Family ID: %d Variant ID: %d Version: %d Build: %d\n",
+ info->family_id, info->variant_id, info->version,
--
1.7.7.3