i2c: mux: pca954x: Use __i2c_transfer because of quirks
Subsystems (2)
RFC PATCH 2/2 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.
--- drivers/i2c/muxes/i2c-mux-pca9541.c | 4 ++-- drivers/i2c/muxes/i2c-mux-pca954x.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/i2c/muxes/i2c-mux-pca9541.c +2 -2
@@ -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 )
drivers/i2c/muxes/i2c-mux-pca954x.c +1 -1
@@ -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,
Laurent Pinchart
Acked-byHi Alexander,
Thank you for the patch.
Quoted 6 lines · On Friday 12 June 2015 14:41:00 Alexander Sverdlin wrote:
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 Alexander Sverdlin <[email protected]>Tested-by Łukasz Gemborowski <[email protected]>
Quoted 40 lines
--- drivers/i2c/muxes/i2c-mux-pca9541.c | 4 ++-- drivers/i2c/muxes/i2c-mux-pca954x.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)(quoted diff) +0
-0
b/drivers/i2c/muxes/i2c-mux-pca9541.cindex cb77277..0c8d4d2 100644drivers/i2c/muxes/i2c-mux-pca9541.c +1
-1@@ -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
drivers/i2c/muxes/i2c-mux-pca9541.c +1
-1} }; - ret = adap->algo->master_xfer (adap, msg,2 ); + ret =__i2c_transfer (adap, msg,2 );if (ret ==2 ) ret = val;else if (ret >=0 )(quoted diff) +0
-0
b/drivers/i2c/muxes/i2c-mux-pca954x.cindex bea0d2d..ea4aa9d 100644drivers/i2c/muxes/i2c-mux-pca954x.c +1
-1@@ -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,
Signature · 3 lines
Regards, Laurent Pinchart
Dear Alexander,
Quoted 5 lines · On Fri, 12 Jun 2015 22:28:50 +0300 Laurent Pinchart…
Hi Alexander,
Thank you for the patch.
On Friday 12 June 2015 14:41:00 Alexander Sverdlin wrote:
Quoted 8 lines
Quoted 6 lines
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 Alexander Sverdlin <[email protected]>Tested-by Łukasz Gemborowski <[email protected]>
Just quickly tested the patch, seems fine. So feel free to add my
Thanks
Quoted 42 lines
Quoted 41 lines
--- drivers/i2c/muxes/i2c-mux-pca9541.c | 4 ++-- drivers/i2c/muxes/i2c-mux-pca954x.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)(quoted diff) +0
-0
b/drivers/i2c/muxes/i2c-mux-pca9541.cindex cb77277..0c8d4d2 100644drivers/i2c/muxes/i2c-mux-pca9541.c +1
-1@@ -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
drivers/i2c/muxes/i2c-mux-pca9541.c +1
-1} }; - ret = adap->algo->master_xfer (adap, msg,2 ); + ret =__i2c_transfer (adap, msg,2 );if (ret ==2 ) ret = val;else if (ret >=0 )(quoted diff) +0
-0
b/drivers/i2c/muxes/i2c-mux-pca954x.cindex bea0d2d..ea4aa9d 100644drivers/i2c/muxes/i2c-mux-pca954x.c +1
-1@@ -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,
Wolfram Sang
AppliedQuoted 5 lines · Alexander Sverdlin
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 Alexander Sverdlin <[email protected]>Tested-by Łukasz Gemborowski <[email protected]>
Applied to for-next with stable added, thanks!