Commit 0a8237ae authored by Alexander Sverdlin's avatar Alexander Sverdlin Committed by Wolfram Sang

i2c: mux: pca954x: Use __i2c_transfer because of quirks

pca9541 and pca954x are calling master_xfer() of the parent adapter directly
thus bypassing the quirks checks of the adapter. Use __i2c_transfer() instead.
Signed-off-by: default avatarAlexander Sverdlin <alexander.sverdlin@nokia.com>
Tested-by: default avatarŁukasz Gemborowski <lukasz.gemborowski@nokia.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarJisheng Zhang <jszhang@marvell.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
Fixes: b7f62584 ("i2c: add quirk checks to core")
parent e766f338
......@@ -104,7 +104,7 @@ static int pca9541_reg_write(struct i2c_client *client, u8 command, u8 val)
buf[0] = command;
buf[1] = val;
msg.buf = buf;
ret = adap->algo->master_xfer(adap, &msg, 1);
ret = __i2c_transfer(adap, &msg, 1);
} else {
union i2c_smbus_data data;
......@@ -144,7 +144,7 @@ static int pca9541_reg_read(struct i2c_client *client, u8 command)
.buf = &val
}
};
ret = adap->algo->master_xfer(adap, msg, 2);
ret = __i2c_transfer(adap, msg, 2);
if (ret == 2)
ret = val;
else if (ret >= 0)
......
......@@ -134,7 +134,7 @@ static int pca954x_reg_write(struct i2c_adapter *adap,
msg.len = 1;
buf[0] = val;
msg.buf = buf;
ret = adap->algo->master_xfer(adap, &msg, 1);
ret = __i2c_transfer(adap, &msg, 1);
} else {
union i2c_smbus_data data;
ret = adap->algo->smbus_xfer(adap, client->addr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment