lkml.org 
[lkml]   [2015]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V4 2/7] qup: i2c: factor out common code for reuse
From
Date

Hi Sricharan,

On Thu, 2015-07-09 at 08:55 +0530, Sricharan R wrote:
>

> static int qup_i2c_read_one(struct qup_i2c_dev *qup, struct i2c_msg *msg)
> {
> - unsigned long left;
> - int ret;
> + int ret = 0;
>
> - qup->msg = msg;
> - qup->pos = 0;
> + /*
> + * The QUP block will issue a NACK and STOP on the bus when reaching
> + * the end of the read, the length of the read is specified as one byte
> + * which limits the possible read to 256 (QUP_READ_LIMIT) bytes.
> + */
> + if (msg->len > QUP_READ_LIMIT) {
> + dev_err(qup->dev, "HW not capable of reads over %d bytes\n",
> + QUP_READ_LIMIT);
> + return -EINVAL;
> + }
>

This should be removed. Please see qup_i2c_quirks.

Regards,
Ivan


\
 
 \ /
  Last update: 2015-07-20 10:41    [W:0.136 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site