iio: proximity: lidar: optimize i2c transactions
authorMatt Ranostay <mranostay@gmail.com>
Wed, 2 Dec 2015 05:05:22 +0000 (21:05 -0800)
committerJonathan Cameron <jic23@kernel.org>
Sat, 5 Dec 2015 16:40:48 +0000 (16:40 +0000)
commit366e65633cf4f117609965cd6e189f2cd11533d2
tree353c0dbefc78bd9a5174dac2379d842aa264bce5
parent8d6c16dd7213fa43702416e3dd1059e9e36bc758
iio: proximity: lidar: optimize i2c transactions

Optimize device tranactions using i2c transfers versus multiple
possibly racey i2c_smbus_* function calls, and only one transaction
for distance measurement. Falls back to smbus method if i2c
functionality isn't available.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/proximity/pulsedlight-lidar-lite-v2.c