diff options
author | Angus Ainslie (Purism) <angus@akkea.ca> | 2019-03-21 08:40:43 -0700 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-04-04 20:20:42 +0100 |
commit | 78ed050dd2962560d01ce8ee7b011bb7ccc3f502 (patch) | |
tree | cb0002af58fa528adc9d32a17bcc2f3c5bf8ab27 /drivers/iio | |
parent | 37ada026be2cb61b4a99b5e4cb5a542df727b752 (diff) | |
download | linux-78ed050dd2962560d01ce8ee7b011bb7ccc3f502.tar.gz linux-78ed050dd2962560d01ce8ee7b011bb7ccc3f502.tar.bz2 linux-78ed050dd2962560d01ce8ee7b011bb7ccc3f502.zip |
iio: light: vcnl4000 use word writes instead of byte writes
The VCNL4200 datasheet says that word read and writes should be used
to access the registers.
Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
Tested-by: Tomas Novotny <tomas@novotny.cz>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/light/vcnl4000.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c index 04fd0d4b6f19..5e0a8eb83ebc 100644 --- a/drivers/iio/light/vcnl4000.c +++ b/drivers/iio/light/vcnl4000.c @@ -140,10 +140,10 @@ static int vcnl4200_init(struct vcnl4000_data *data) data->rev = (ret >> 8) & 0xf; /* Set defaults and enable both channels */ - ret = i2c_smbus_write_byte_data(data->client, VCNL4200_AL_CONF, 0x00); + ret = i2c_smbus_write_word_data(data->client, VCNL4200_AL_CONF, 0); if (ret < 0) return ret; - ret = i2c_smbus_write_byte_data(data->client, VCNL4200_PS_CONF1, 0x00); + ret = i2c_smbus_write_word_data(data->client, VCNL4200_PS_CONF1, 0); if (ret < 0) return ret; |