iio: light sensor: Add SMBUS support to the tsl2563 driver.
authorBryan Freed <bfreed@chromium.org>
Fri, 24 Jun 2011 20:40:47 +0000 (13:40 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 28 Jun 2011 21:52:25 +0000 (14:52 -0700)
commitd9b42c01ae8d17fdf8d910a4255d18ed2ac22f90
treec503b88d15f5dc0afe79306df6f8bfb4633d248b
parent9e4216fd6a547261c54bede60108347646c95a69
iio: light sensor: Add SMBUS support to the tsl2563 driver.

This is so we can support it on x86 SMBUS adapters.

Since i2c adapters which do not provide an smbus_xfer interface fall
back to using their I2C master_xfer interface, all the i2c_master_send()
calls in this driver are changed to i2c_smbus_*() calls.
This will fail on an i2c adapter that implements a proper subset of
(SMBUS_BYTE | SMBUS_BYTE_DATA | SMBUS_WORD_DATA), but I do not see that
in any of our adapters today.

This results in a few wrapper functions that provide little additional
functionality, so remove them and call the smbus functions directly from
the general driver code.

Signed-off-by: Bryan Freed <bfreed@chromium.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/light/tsl2563.c