Skip to content

Commit

Permalink
leds: pca955x: Correct I2C Functionality
Browse files Browse the repository at this point in the history
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: Tin Huynh <[email protected]>
Signed-off-by: Jacek Anaszewski <[email protected]>
  • Loading branch information
Tin Huynh authored and jacek-anaszewski committed May 22, 2017
1 parent 2ea659a commit aace34c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/leds/leds-pca955x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit aace34c

Please sign in to comment.