Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp596461ybe; Wed, 4 Sep 2019 05:01:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbCYOEz4LJsiNLLT/UYiJgxEzIZN1YkA3xhLofufDoLbMyyJwa8LG07GuZVOZLShR0QMF5 X-Received: by 2002:a17:902:4545:: with SMTP id m63mr39353294pld.45.1567598467727; Wed, 04 Sep 2019 05:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567598467; cv=none; d=google.com; s=arc-20160816; b=lslUu5P428tRnB+WNptglAsP3XQgacKebs7exoc0xJO+BgQSaEvD2laPouV/P55Gy6 hisf/eCmF7trsFfcfnQCQku5XsJ+xg1F2wg2ublxLpbUYw8PlQtVElHCe0L4oz/dTYv5 7g+yrLwWrZdZ5UkdOImvnqwRarIiU5b97Qj1/9xqKTa7vmd8B1SFWhEbM1S3Y4z6D6/s 1Is/80eg6+Mq+OFvIiIzYjr2PvqdEanvxFM4+bNUxyqUsVOjAhxqTNIf0rGDviO9JdLj yKnwoIEMxTbXU8IMRwuwsVx20FuPltNhh3VnPoDn48hM349jOUEgdQTRa/QH/puHxcGx 1TAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gltzve3Erh3/LgJfZprohb6yjTgtqXYz6OXponP5Rhc=; b=SVj5AukbPmqE7SESQUeNMiF3QlSax3LUndz8OO4UACy7Akz5mNNHBeFI6fJov4GSk/ BKN4ZA8QDG9e8Z0aDSnEfBJKmSjaMQvrtoqeX5iEG+5hgitWEsY5ntHtNuD2dvxVwl13 uAz0DRu1WiO+0XM4J9cZbp6P2nsB+S3lKIaUIHvXCu4MiMgwazq5x7OVrhiXlLPHXcIX QeAIVyOwck6LRwjbDlVt5o+xyMNuKC408U1gAOWkR+qtmLAqRQg+DqO+7UI52rQBjWbQ l88jaPwqH7w6RItn+WiA9vomzb2OHcEmijM2Y7ZC2kPU604Cs1Jf10wymFqxoy42bm8T /cdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vlM4fX7g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r26si16650362pgv.189.2019.09.04.05.00.50; Wed, 04 Sep 2019 05:01:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vlM4fX7g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729935AbfIDL7h (ORCPT + 99 others); Wed, 4 Sep 2019 07:59:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:39938 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726495AbfIDL7h (ORCPT ); Wed, 4 Sep 2019 07:59:37 -0400 Received: from localhost (unknown [122.182.201.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 952D322DBF; Wed, 4 Sep 2019 11:59:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567598376; bh=4TTVOFVYHfiDvgKfc29qmEyn8YD0TEuVBSJgTusyRC0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vlM4fX7g6if9wq2T6prMEQd/N7Yoa1BaW/kpZH7xVJVJt1b9t1vLhgmImrQTdaakr gXh6h04PqSWhWQ4Vz4aYSrJMegJg3A8chjUaCOMWPTFp0rXTEvfhcuObY9OQmqSnPv zTgWH0ZuO03rdeUm/hYHmCMbV8qHjo2OvjHSUOzE= Date: Wed, 4 Sep 2019 17:28:27 +0530 From: Vinod Koul To: Lee Jones Cc: alokc@codeaurora.org, agross@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, bjorn.andersson@linaro.org, linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] i2c: qcom-geni: Provide an option to select FIFO processing Message-ID: <20190904115827.GY2672@vkoul-mobl> References: <20190904113613.14997-1-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190904113613.14997-1-lee.jones@linaro.org> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04-09-19, 12:36, Lee Jones wrote: > Signed-off-by: Lee Jones Reviewed-by: Vinod Koul > --- > drivers/i2c/busses/i2c-qcom-geni.c | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c > index a89bfce5388e..dfdbce067827 100644 > --- a/drivers/i2c/busses/i2c-qcom-geni.c > +++ b/drivers/i2c/busses/i2c-qcom-geni.c > @@ -353,13 +353,16 @@ static void geni_i2c_tx_fsm_rst(struct geni_i2c_dev *gi2c) > static int geni_i2c_rx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg, > u32 m_param) > { > + struct device_node *np = gi2c->se.dev->of_node; > dma_addr_t rx_dma; > unsigned long time_left; > - void *dma_buf; > + void *dma_buf = NULL; > struct geni_se *se = &gi2c->se; > size_t len = msg->len; > > - dma_buf = i2c_get_dma_safe_msg_buf(msg, 32); > + if (!of_property_read_bool(np, "qcom,geni-se-fifo")) > + dma_buf = i2c_get_dma_safe_msg_buf(msg, 32); > + > if (dma_buf) > geni_se_select_mode(se, GENI_SE_DMA); > else > @@ -392,13 +395,16 @@ static int geni_i2c_rx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg, > static int geni_i2c_tx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg, > u32 m_param) > { > + struct device_node *np = gi2c->se.dev->of_node; > dma_addr_t tx_dma; > unsigned long time_left; > - void *dma_buf; > + void *dma_buf = NULL; > struct geni_se *se = &gi2c->se; > size_t len = msg->len; > > - dma_buf = i2c_get_dma_safe_msg_buf(msg, 32); > + if (!of_property_read_bool(np, "qcom,geni-se-fifo")) > + dma_buf = i2c_get_dma_safe_msg_buf(msg, 32); > + > if (dma_buf) > geni_se_select_mode(se, GENI_SE_DMA); > else > -- > 2.17.1 -- ~Vinod