Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp593783ybe; Wed, 4 Sep 2019 04:58:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyE+McxXpQXFQ9s67C5vVvYdzksDwQlHfcXycygMB0gADoeV/GupnAEpcWQ8B/Dh7G+a4Hi X-Received: by 2002:a63:188:: with SMTP id 130mr34341234pgb.231.1567598316496; Wed, 04 Sep 2019 04:58:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567598316; cv=none; d=google.com; s=arc-20160816; b=tq9d1k2LhyefTD13YjPqiyjgCFkWVWlY52FLUxEU9GYqXOJl3iLBmuSZxD8KukNYXQ j3BOntD1SC4q2+T2/KhNFigBYND1wMMQo3TG+CmqX+7ZdTGXJVmDkndF2DigyRlWJusq cXChTNCNNkX/xA5sMcSnqy+cGINkWb2o/YzdLkui29n0qBcH2P0a93gzKcObrRe2zrRv 9m81s5VycJ/FOlQVzwuGiCkPZcuaomWmKFCEiqfp+bBvEHwx1o7ySLmw6IeovWQxFsBy WWGbJ3AWLBb+ZzFuNuSvxOZO/O1cazrDPv+fN7IpmqyRl1DvrWbSdmJQL/rBkIMrNXFC rjtg== 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=PJdaAj2gQ2e5fQhMAbj+2g3exXyjaATTvCMyoU/32Eg=; b=c4HnQt18z8X+4qM6WJsUN6x6Z8tTCEva+L3TzhLLxgM8/VWPFkeqUKzc22ISWSEFKN QjjBVBIbH7XN/EJ5hjv/Hk9SFuOYvDxCFiNaPPO+Z7w6Z691QDN4mFOevd8m7+DL1myH lt0wpY9aIx2n7J25g9KsAhMtXD4Jtgi5/vchQKT22Y+9dCbkzYOhLdkbD2zFDfoHW23m PnSfsEXG1pFUhtb9fdqpR1V8HjTlYn3+fbjjvZ/uBcwJ5/KIm2Oh3XhYOLGAJzHTamsO E8PPsbWP8CS2y1+U8FnJ3k3wu5w/wlKbwk6ac6P9N34HuDbPpt1/H8lnIApIMKkbdLub wwuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=afyuI5uz; 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 w16si3918224plk.228.2019.09.04.04.58.19; Wed, 04 Sep 2019 04:58:36 -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=afyuI5uz; 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 S1729912AbfIDL5U (ORCPT + 99 others); Wed, 4 Sep 2019 07:57:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:38442 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729834AbfIDL5T (ORCPT ); Wed, 4 Sep 2019 07:57:19 -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 645FE22CF5; Wed, 4 Sep 2019 11:57:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567598238; bh=+NE03vk26gxXt4brBoR8Ly4u6W2a1FR4Kab3VIiTjZA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=afyuI5uzMEDH6a4KE6v9ld04B/V44tuOtu0HDeP2s00PF2PgdW4svvMA0PpojB91x 4AXefCNj5lzT9UaF+iF1IHuVdFhhIqVZxC8HH/SKPvqleIGzM4td2zoVemL9aa2d2r DoiZ5w4GmcZneXcnQ3uFLqupuL525W6wc7r/epFA= Date: Wed, 4 Sep 2019 17:26:09 +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: <20190904115609.GW2672@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 > --- > 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")) Where is this property documented, I dont see anything in linux-next for today > + 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