Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756482AbbGTIZM (ORCPT ); Mon, 20 Jul 2015 04:25:12 -0400 Received: from ns.mm-sol.com ([37.157.136.199]:51936 "EHLO extserv.mm-sol.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756107AbbGTIZG (ORCPT ); Mon, 20 Jul 2015 04:25:06 -0400 Message-ID: <1437380700.6267.1.camel@mm-sol.com> Subject: Re: [PATCH V4 2/7] qup: i2c: factor out common code for reuse From: "Ivan T. Ivanov" To: Sricharan R Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, galak@codeaurora.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, agross@codeaurora.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Date: Mon, 20 Jul 2015 11:25:00 +0300 In-Reply-To: <1436412350-19519-3-git-send-email-sricharan@codeaurora.org> References: <1436412350-19519-1-git-send-email-sricharan@codeaurora.org> <1436412350-19519-3-git-send-email-sricharan@codeaurora.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.13.7-fta1.2~trusty Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1100 Lines: 35 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/