lkml.org 
[lkml]   [2012]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 14/22 v4] Input: atmel_mxt_ts - don't re-read matrix after applying pdata
Date
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 | 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 87004ec..214bf8d 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -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,
--
1.7.7.3


\
 
 \ /
  Last update: 2012-06-18 07:01    [W:0.158 / U:3.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site