projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
14fbbc3
)
Input: ad7879 - use i2c_smbus_read_i2c_block_data() to lower overhead
author
Michael Hennerich
<
[email protected]
>
Wed, 30 Jun 2010 21:51:09 +0000
(14:51 -0700)
committer
Dmitry Torokhov
<
[email protected]
>
Sat, 3 Jul 2010 20:13:19 +0000
(13:13 -0700)
Avoid additional addressing overhead incurred by word_data transfers.
Signed-off-by: Michael Hennerich <
[email protected]
>
Signed-off-by: Mike Frysinger <
[email protected]
>
Signed-off-by: Dmitry Torokhov <
[email protected]
>
drivers/input/touchscreen/ad7879-i2c.c
patch
|
blob
|
history
diff --git
a/drivers/input/touchscreen/ad7879-i2c.c
b/drivers/input/touchscreen/ad7879-i2c.c
index 81937b21e9d2d88327b53720760ed71732b36af1..d82a38ee9a3ea6bcde188883233a9af311acd58d 100644
(file)
--- a/
drivers/input/touchscreen/ad7879-i2c.c
+++ b/
drivers/input/touchscreen/ad7879-i2c.c
@@
-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;
}