--- v2
+++ v4
@@ -1,57 +1,58 @@
-The atmel_mxt_ts T9 data contains orientation information in its 'vector'
-field. Parse and debug print its contents, although its value isn't
-actually used yet.
+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>
-Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
-Acked-by: Nick Dyer <nick.dyer@itdev.co.uk>
---
- drivers/input/touchscreen/atmel_mxt_ts.c | 10 ++++++++--
- 1 files changed, 8 insertions(+), 2 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 40dd3e6..be1e2ec 100644
+index 87004ec..214bf8d 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
-@@ -489,6 +489,7 @@ static void mxt_input_touch(struct mxt_data *data, struct mxt_message *message)
- int area;
- int amplitude;
- int id;
-+ int vector1, vector2;
+@@ -426,11 +426,6 @@ static int __mxt_read_reg(struct i2c_client *client,
+ return ret;
+ }
- id = message->reportid - data->T9_reportid_min;
+-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;
-@@ -503,8 +504,12 @@ static void mxt_input_touch(struct mxt_data *data, struct mxt_message *message)
- area = message->message[4];
- amplitude = message->message[5];
+ 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);
-+ /* The two vector components are 4-bit signed ints (2s complement) */
-+ vector1 = (signed)((signed char)message->message[6]) >> 4;
-+ vector2 = (signed)((signed char)(message->message[6] << 4)) >> 4;
-+
- dev_dbg(dev,
-- "[%d] %c%c%c%c%c%c%c%c x: %d y: %d area: %d amp: %d\n",
-+ "[%d] %c%c%c%c%c%c%c%c x: %d y: %d area: %d amp: %d vector: [%d,%d]\n",
- id,
- (status & MXT_DETECT) ? 'D' : '.',
- (status & MXT_PRESS) ? 'P' : '.',
-@@ -514,7 +519,7 @@ static void mxt_input_touch(struct mxt_data *data, struct mxt_message *message)
- (status & MXT_AMP) ? 'A' : '.',
- (status & MXT_SUPPRESS) ? 'S' : '.',
- (status & MXT_UNGRIP) ? 'U' : '.',
-- x, y, area, amplitude);
-+ x, y, area, amplitude, vector1, vector2);
-
- input_mt_slot(input_dev, id);
- input_mt_report_slot_state(input_dev, MT_TOOL_FINGER,
-@@ -525,6 +530,7 @@ static void mxt_input_touch(struct mxt_data *data, struct mxt_message *message)
- input_report_abs(input_dev, ABS_MT_POSITION_Y, y);
- input_report_abs(input_dev, ABS_MT_PRESSURE, amplitude);
- input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, area);
-+ /* TODO: Use vector to report ORIENTATION & TOUCH_MINOR */
- }
-
- input_mt_report_pointer_emulation(input_dev, false);
+- /* 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,
--
1.7.7.3
-