lkml.org 
[lkml]   [2016]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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]
\
 
 \ /
  Last update: 2016-03-12 17:21    [W:0.105 / U:0.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site