summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gonzalez <alex.gonzalez@digi.com>2012-02-21 17:16:45 +0100
committerAlex Gonzalez <alex.gonzalez@digi.com>2012-02-21 17:16:45 +0100
commitcea890c5f590c29e7c72cf033806461e59fca3b8 (patch)
tree3731f94596db14e59815eb660ba6a46fe2df1109
parentb18c30dd60daee65abed837402e92a8e549e7af2 (diff)
mma7455: Fix I2C read access.
When reading 10bit registers, the value of the MSB is latched after the LSB is read. The MSB read is expected right after the LSB access otherwise read errors occur. Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
-rw-r--r--drivers/input/misc/mma7455l.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/misc/mma7455l.c b/drivers/input/misc/mma7455l.c
index 9d4c5ed70cb5..e01ecb7847c6 100644
--- a/drivers/input/misc/mma7455l.c
+++ b/drivers/input/misc/mma7455l.c
@@ -167,7 +167,7 @@ static inline u_int8_t __reg_read(struct mma7455l_info *mma, u_int8_t reg)
/* Write the register to access */
i2cmsg[0].addr = mma->client->addr;
- i2cmsg[0].len = 2;
+ i2cmsg[0].len = 1;
i2cmsg[0].buf = &buf[0];
i2cmsg[0].flags = 0;