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

Commit aace34c0 authored by Tin Huynh's avatar Tin Huynh Committed by Jacek Anaszewski
Browse files

leds: pca955x: Correct I2C Functionality



The driver checks an incorrect flag of functionality of adapter.
When a driver requires i2c_smbus_read_byte_data and
i2c_smbus_write_byte_data, it should check I2C_FUNC_SMBUS_BYTE_DATA
instead I2C_FUNC_I2C.
This patch fixes the problem.

Signed-off-by: default avatarTin Huynh <tnhuynh@apm.com>
Signed-off-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
parent 2ea659a9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -285,7 +285,7 @@ static int pca955x_probe(struct i2c_client *client,
			"slave address 0x%02x\n",
			client->name, chip->bits, client->addr);

	if (!i2c_check_functionality(adapter, I2C_FUNC_I2C))
	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
		return -EIO;

	if (pdata) {