[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1361555907-19840-36-git-send-email-nick.dyer@itdev.co.uk>
Date: Fri, 22 Feb 2013 17:58:22 +0000
From: Nick Dyer <nick.dyer@...ev.co.uk>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Daniel Kurtz <djkurtz@...omium.org>,
Henrik Rydberg <rydberg@...omail.se>,
Joonyoung Shim <jy0922.shim@...sung.com>,
Alan.Bowens@...el.com, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org, pmeerw@...erw.net,
bleung@...omium.org, olofj@...omium.org
Cc: Nick Dyer <nick.dyer@...ev.co.uk>
Subject: [PATCH 35/40] Input: atmel_mxt_ts - Improve messages relating to info block read
The matrix size is only used to print out a debug message, and results in some
rather confusing code to re-read it if the device configuration is updated. So
don't print it out.
Signed-off-by: Nick Dyer <nick.dyer@...ev.co.uk>
---
drivers/input/touchscreen/atmel_mxt_ts.c | 26 ++++++++++----------------
1 file changed, 10 insertions(+), 16 deletions(-)
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 83a0837..267b5d8 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1390,6 +1390,8 @@ static int mxt_parse_object_table(struct mxt_data *data)
u8 reportid;
u16 end_address;
+ dev_dbg(&client->dev, "Object num: %d\n", data->info->object_num);
+
/* Valid Report IDs start counting from 1 */
reportid = 1;
data->mem_size = 0;
@@ -1567,6 +1569,12 @@ static int mxt_read_info_block(struct mxt_data *data)
data->info = (struct mxt_info *)buf;
data->object_table = (struct mxt_object *)(buf + MXT_OBJECT_START);
+ dev_info(&client->dev,
+ "Family ID: %u Variant ID: %u Firmware: V%u.%u.%02X",
+ data->info->family_id, data->info->variant_id,
+ data->info->version >> 4, data->info->version & 0xf,
+ data->info->build);
+
/* Parse object table information */
error = mxt_parse_object_table(data);
if (error) {
@@ -1575,13 +1583,6 @@ static int mxt_read_info_block(struct mxt_data *data)
return error;
}
- dev_info(&client->dev,
- "Family ID: %u Variant ID: %u Firmware V%u.%u.%02X "
- " Object Num:%d\n",
- data->info->family_id, data->info->variant_id,
- data->info->version >> 4, data->info->version & 0xf,
- data->info->build, data->info->object_num);
-
return 0;
err_free_mem:
@@ -1601,11 +1602,6 @@ static int mxt_read_t9_resolution(struct mxt_data *data)
if (!object)
return -EINVAL;
- /* Update matrix size in info struct (may change after reset) */
- error = mxt_read_info_block(data);
- if (error)
- return error;
-
error = __mxt_read_reg(client,
object->start_address + MXT_T9_RANGE,
sizeof(range), &range);
@@ -1636,10 +1632,8 @@ static int mxt_read_t9_resolution(struct mxt_data *data)
data->max_y = range.y;
}
- dev_info(&client->dev,
- "Matrix Size X%uY%u Touchscreen size X%uY%u\n",
- data->info->matrix_xsize, data->info->matrix_ysize,
- data->max_x, data->max_y);
+ dev_info(&client->dev, "Touchscreen size X%uY%u\n",
+ data->max_x, data->max_y);
return 0;
}
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists