Messages in this thread | | | Date | Sat, 12 Mar 2016 16:44:22 +0100 | From | Wolfram Sang <> | Subject | Re: [PATCH v3 04/14] i2c-octeon: Support I2C_M_RECV_LEN |
| |
On Mon, Mar 07, 2016 at 04:10:47PM +0100, Jan Glauber wrote: > From: David Daney <david.daney@cavium.com> > > If I2C_M_RECV_LEN is set consider the length byte. > > Signed-off-by: David Daney <ddaney@caviumnetworks.com> > Signed-off-by: Jan Glauber <jglauber@cavium.com>
You also might want to set "| I2C_FUNC_SMBUS_READ_BLOCK_DATA | I2C_FUNC_SMBUS_BLOCK_PROC_CALL" in your functionality?
> + if (recv_len && i == 0) { > + if (data[i] > I2C_SMBUS_BLOCK_MAX + 1) { > + dev_err(i2c->dev, > + "%s: read len > I2C_SMBUS_BLOCK_MAX %d\n", > + __func__, data[i]); > + return -EIO;
According to Documentation/i2c/fault-codes this should be -EPROTO.
[unhandled content-type:application/pgp-signature] | |