Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318301
b: refs/heads/master
c: 23003a8
h: refs/heads/master
i:
  318299: 725baac
v: v3
  • Loading branch information
Daniel Kurtz authored and Henrik Rydberg committed Jun 29, 2012
1 parent 3b77db3 commit 32085e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cf94bc09c89c923d339c68cf89360c02578ceee3
refs/heads/master: 23003a8496b3f8100ed215dfda438cece5745545
26 changes: 3 additions & 23 deletions trunk/drivers/input/touchscreen/atmel_mxt_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#define MXT_FW_NAME "maxtouch.fw"

/* Registers */
#define MXT_INFO 0x00
#define MXT_FAMILY_ID 0x00
#define MXT_VARIANT_ID 0x01
#define MXT_VERSION 0x02
Expand Down Expand Up @@ -760,32 +761,11 @@ static int mxt_get_info(struct mxt_data *data)
struct i2c_client *client = data->client;
struct mxt_info *info = &data->info;
int error;
u8 val;

error = mxt_read_reg(client, MXT_FAMILY_ID, &val);
if (error)
return error;
info->family_id = val;

error = mxt_read_reg(client, MXT_VARIANT_ID, &val);
if (error)
return error;
info->variant_id = val;

error = mxt_read_reg(client, MXT_VERSION, &val);
if (error)
return error;
info->version = val;

error = mxt_read_reg(client, MXT_BUILD, &val);
if (error)
return error;
info->build = val;

error = mxt_read_reg(client, MXT_OBJECT_NUM, &val);
/* Read 7-byte info block starting at address 0 */
error = __mxt_read_reg(client, MXT_INFO, sizeof(*info), info);
if (error)
return error;
info->object_num = val;

return 0;
}
Expand Down

0 comments on commit 32085e2

Please sign in to comment.