From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Gross Subject: Re: [PATCH V2 2/6] i2c: qup: Add V2 tags support Date: Tue, 7 Apr 2015 00:06:40 -0500 Message-ID: <20150407050640.GB9225@qualcomm.com> References: <1428345067-21878-1-git-send-email-sricharan@codeaurora.org> <1428345067-21878-3-git-send-email-sricharan@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1428345067-21878-3-git-send-email-sricharan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Sricharan R Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org, srichara-Rm6X0d1/PG5y9aJCnZT0Uw@public.gmane.org List-Id: linux-arm-msm@vger.kernel.org On Tue, Apr 07, 2015 at 12:01:03AM +0530, Sricharan R wrote: > +static u32 qup_i2c_send_data(struct qup_i2c_dev *qup, int tlen, u8 *tbuf, > + int dlen, u8 *dbuf) > +{ > + u32 val = 0, idx = 0, pos = 0, i = 0, t; > + int len = tlen + dlen; > + u8 *buf = tbuf; > + > + while (len > 0) { > + if (qup_i2c_wait_ready(qup, QUP_OUT_FULL, 0, 4)) { Instead of 0 and 4 can we use some #defines? This applies for all of the i2c_wait_ready calls -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project From mboxrd@z Thu Jan 1 00:00:00 1970 From: agross@codeaurora.org (Andy Gross) Date: Tue, 7 Apr 2015 00:06:40 -0500 Subject: [PATCH V2 2/6] i2c: qup: Add V2 tags support In-Reply-To: <1428345067-21878-3-git-send-email-sricharan@codeaurora.org> References: <1428345067-21878-1-git-send-email-sricharan@codeaurora.org> <1428345067-21878-3-git-send-email-sricharan@codeaurora.org> Message-ID: <20150407050640.GB9225@qualcomm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, Apr 07, 2015 at 12:01:03AM +0530, Sricharan R wrote: > +static u32 qup_i2c_send_data(struct qup_i2c_dev *qup, int tlen, u8 *tbuf, > + int dlen, u8 *dbuf) > +{ > + u32 val = 0, idx = 0, pos = 0, i = 0, t; > + int len = tlen + dlen; > + u8 *buf = tbuf; > + > + while (len > 0) { > + if (qup_i2c_wait_ready(qup, QUP_OUT_FULL, 0, 4)) { Instead of 0 and 4 can we use some #defines? This applies for all of the i2c_wait_ready calls -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751841AbbDGFGq (ORCPT ); Tue, 7 Apr 2015 01:06:46 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:41231 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750840AbbDGFGn (ORCPT ); Tue, 7 Apr 2015 01:06:43 -0400 Date: Tue, 7 Apr 2015 00:06:40 -0500 From: Andy Gross To: Sricharan R Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, galak@codeaurora.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, iivanov@mm-sol.com, srichara@qti.qualcomm.com Subject: Re: [PATCH V2 2/6] i2c: qup: Add V2 tags support Message-ID: <20150407050640.GB9225@qualcomm.com> References: <1428345067-21878-1-git-send-email-sricharan@codeaurora.org> <1428345067-21878-3-git-send-email-sricharan@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1428345067-21878-3-git-send-email-sricharan@codeaurora.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 07, 2015 at 12:01:03AM +0530, Sricharan R wrote: > +static u32 qup_i2c_send_data(struct qup_i2c_dev *qup, int tlen, u8 *tbuf, > + int dlen, u8 *dbuf) > +{ > + u32 val = 0, idx = 0, pos = 0, i = 0, t; > + int len = tlen + dlen; > + u8 *buf = tbuf; > + > + while (len > 0) { > + if (qup_i2c_wait_ready(qup, QUP_OUT_FULL, 0, 4)) { Instead of 0 and 4 can we use some #defines? This applies for all of the i2c_wait_ready calls -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project