Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202195
b: refs/heads/master
c: 16ea10a
h: refs/heads/master
i:
  202193: 29345dc
  202191: 4317e3d
v: v3
  • Loading branch information
Michael Hennerich authored and Dmitry Torokhov committed Jul 3, 2010
1 parent ee32255 commit 0e5181e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 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: 14fbbc36d126d7ec7717144def386b9fc4c7fba2
refs/heads/master: 16ea10a7d557a0177cbbd716b4a06e5373d513ba
5 changes: 4 additions & 1 deletion trunk/drivers/input/touchscreen/ad7879-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,13 @@ static int ad7879_i2c_read(struct device *dev, u8 reg)
static int ad7879_i2c_multi_read(struct device *dev,
u8 first_reg, u8 count, u16 *buf)
{
struct i2c_client *client = to_i2c_client(dev);
u8 idx;

i2c_smbus_read_i2c_block_data(client, first_reg, count * 2, (u8 *)buf);

for (idx = 0; idx < count; ++idx)
buf[idx] = ad7879_i2c_read(dev, first_reg + idx);
buf[idx] = swab16(buf[idx]);

return 0;
}
Expand Down

0 comments on commit 0e5181e

Please sign in to comment.