Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 78ed050d authored by Angus Ainslie (Purism)'s avatar Angus Ainslie (Purism) Committed by Jonathan Cameron
Browse files

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: default avatarAngus Ainslie (Purism) <angus@akkea.ca>
Tested-by: default avatarTomas Novotny <tomas@novotny.cz>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 37ada026
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;