Message ID | 557AD35C.2070406@nokia.com |
---|---|
State | Accepted |
Headers | show |
Hi Alexander, Thank you for the patch. 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 <alexander.sverdlin@nokia.com> > Tested-by: Łukasz Gemborowski <lukasz.gemborowski@nokia.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/i2c/muxes/i2c-mux-pca9541.c | 4 ++-- > drivers/i2c/muxes/i2c-mux-pca954x.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/i2c/muxes/i2c-mux-pca9541.c > b/drivers/i2c/muxes/i2c-mux-pca9541.c index cb77277..0c8d4d2 100644 > --- a/drivers/i2c/muxes/i2c-mux-pca9541.c > +++ b/drivers/i2c/muxes/i2c-mux-pca9541.c > @@ -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) > diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c > b/drivers/i2c/muxes/i2c-mux-pca954x.c index bea0d2d..ea4aa9d 100644 > --- a/drivers/i2c/muxes/i2c-mux-pca954x.c > +++ b/drivers/i2c/muxes/i2c-mux-pca954x.c > @@ -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,
Dear Alexander, On Fri, 12 Jun 2015 22:28:50 +0300 Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote: > Hi Alexander, > > Thank you for the patch. > > 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 <alexander.sverdlin@nokia.com> > > Tested-by: Łukasz Gemborowski <lukasz.gemborowski@nokia.com> > > Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Just quickly tested the patch, seems fine. So feel free to add my Acked-by: Jisheng Zhang <jszhang@marvell.com> Tested-by: Jisheng Zhang <jszhang@marvell.com> Thanks > > > --- > > drivers/i2c/muxes/i2c-mux-pca9541.c | 4 ++-- > > drivers/i2c/muxes/i2c-mux-pca954x.c | 2 +- > > 2 files changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/i2c/muxes/i2c-mux-pca9541.c > > b/drivers/i2c/muxes/i2c-mux-pca9541.c index cb77277..0c8d4d2 100644 > > --- a/drivers/i2c/muxes/i2c-mux-pca9541.c > > +++ b/drivers/i2c/muxes/i2c-mux-pca9541.c > > @@ -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) > > diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c > > b/drivers/i2c/muxes/i2c-mux-pca954x.c index bea0d2d..ea4aa9d 100644 > > --- a/drivers/i2c/muxes/i2c-mux-pca954x.c > > +++ b/drivers/i2c/muxes/i2c-mux-pca954x.c > > @@ -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, > -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Jun 12, 2015 at 02:41:00PM +0200, 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 <alexander.sverdlin@nokia.com> > Tested-by: Łukasz Gemborowski <lukasz.gemborowski@nokia.com> Applied to for-next with stable added, thanks!
diff --git a/drivers/i2c/muxes/i2c-mux-pca9541.c b/drivers/i2c/muxes/i2c-mux-pca9541.c index cb77277..0c8d4d2 100644 --- a/drivers/i2c/muxes/i2c-mux-pca9541.c +++ b/drivers/i2c/muxes/i2c-mux-pca9541.c @@ -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) diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c index bea0d2d..ea4aa9d 100644 --- a/drivers/i2c/muxes/i2c-mux-pca954x.c +++ b/drivers/i2c/muxes/i2c-mux-pca954x.c @@ -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,