diff options
author | Jean Delvare <khali@linux-fr.org> | 2009-09-19 00:45:44 +0400 |
---|---|---|
committer | Jean Delvare <khali@linux-fr.org> | 2009-09-19 00:45:44 +0400 |
commit | ac7809414fb1e3e49b88ad6016e57598594aa4e2 (patch) | |
tree | b00de5f5130f8b21bc1be49e5b90c0190aed555d /drivers/i2c/i2c-core.c | |
parent | 27693ce5f372c0af3b0730f5152b35432afa0fd7 (diff) | |
download | linux-ac7809414fb1e3e49b88ad6016e57598594aa4e2.tar.xz |
i2c/tsl2550: Use combined SMBus transactions
Make the I/O faster, mainly by using combined SMBus transactions when
possible. While the TSL2550 datasheet doesn't say the device supports
them, they seem to work just fine in practice, and a combined
transaction is faster than two simple transactions in many cases and
always more reliable.
A side effect is to suppress the delays between SMBus writes and
reads. The datasheet doesn't say they are needed and things work just
fine for me without them.
I also couldn't see any reason for the delay between reading the two
channels. Nor for the loop to get a reading in the first place. The
400 ms delay between samples only matters at chip power-up, after that
the chip always hold the previously sampled value so we never get to
wait.
All these changes make reading the lux value much faster and cheaper.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Michele De Candia <michele.decandia@valueteam.com>
Cc: Rodolfo Giometti <giometti@linux.it>
Diffstat (limited to 'drivers/i2c/i2c-core.c')
0 files changed, 0 insertions, 0 deletions