Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5625791pxb; Mon, 28 Mar 2022 15:08:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZFKshvN4DCNPTVp3Zkxo32hPPEMkU2gsi7n13iq9IyAHDaJZPGVvLV2oOc+0CjVjXBiIN X-Received: by 2002:a63:5f4e:0:b0:382:3b02:a4a with SMTP id t75-20020a635f4e000000b003823b020a4amr11749046pgb.451.1648505331260; Mon, 28 Mar 2022 15:08:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648505331; cv=none; d=google.com; s=arc-20160816; b=UhBtCRkFge5gsIb8eqJnI9bXZQEjvAHXrIvRZYlxDjpVOpQN8iETaf3gq2UXF653v/ 4JcnYkv3extEL1KdF1Igax5CvKR12jUxmvCOVL3wUBUbraOZcqEZrawKUbbjgCw2PLYn ztEXFpbrEhNc967j3bOiNJcmtluyEebdhkulkaoTLvrW/u+XZ6y64iACD3N7t7cSxhPy ha4Ivp/Tj0qAutl9fcGtvqYkoparfhhHd+ROARvQQERJONF6dqIW28dpCCB7HDWt6HhG To3EbTmWUOimI4mgq2MKHvkAIzlak+kUu2LZEuB36PXoeWgmKCeWvhxP0p+Q3YaNlgIW uZuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=AOOaiM/g6uQDmbbfIBPJN7MIhqjZgkkbIwUWO6ORlFg=; b=ene6BNQp9dkLCR0+nAs5FsRCKcInoN1TmoovJO5xvUxrrJRoXKug4sFUwuabqWTteH eThBmgqig93QdXh2EYqB4dXxhta1QUbC0jlGWEWAMc4Zse8Aj7ArsvX7YOT1Htc6kJyG qgxNY2yHDr2HbB6jz0G7zGEODKlodbIF5rUcfWQImbp2+MD1ybGHeoH+4DGKDQirbggP dzMtgyFNGXDaw/xlM9KJ/8qdonEXErHiz0npzK+N6JwbBliOaYhx2rlG1kH4dHIFH0kY ycWRqILZ2r5p4nKutltC47zki091xqi2SeBt2xWEPwEzGn4NPk8MAykMmqnzNVW561IS a/Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xo72Byil; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id f13-20020a63554d000000b003816043efdasi14364659pgm.463.2022.03.28.15.08.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 15:08:51 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xo72Byil; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A37B814FFF0; Mon, 28 Mar 2022 14:29:43 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244557AbiC1RWQ (ORCPT + 99 others); Mon, 28 Mar 2022 13:22:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236180AbiC1RWP (ORCPT ); Mon, 28 Mar 2022 13:22:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90CC35A59D; Mon, 28 Mar 2022 10:20:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 169DE60C7E; Mon, 28 Mar 2022 17:20:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8814FC340F0; Mon, 28 Mar 2022 17:20:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648488033; bh=A1cAETogMKE4ByDJveM04ydwDhQNcj7ZVpXQPOMQvQs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Xo72ByilWB92HDWNLTtqY4spp9AeXbHk/lIMpcKvTCxuvJxK1agcIrDcJBMcU6ONQ OrLQiIJfvQPszkZlORSVD3EBxVv/cFKt8DY6Ecuol75mzJVFKWimAm1a15lLoiZaGX +c9kaiRQumyv3W7d3B9qxnUKyUYK2Pq8MWmO7I7G+pizhBkaIuGU0zxdvKFUPRKwj6 ENJmUDd4XO5Dt8OmtPJKEbWa+i5oe/81Ztqx4H2JJv9JcoHbyMpl4mBXkagDw2e+AM gYKHLx3m8AUjySN4AstB8l57w4Yw5yLC1QvgB4DBODe4Oe77EmR0B05aYzPT9v4MTN 39NFS0/Be9MIQ== Date: Mon, 28 Mar 2022 18:28:08 +0100 From: Jonathan Cameron To: Paul Cercueil Cc: Michael Hennerich , Lars-Peter Clausen , Christian =?UTF-8?B?S8O2bmln?= , Sumit Semwal , Jonathan Corbet , Alexandru Ardelean , dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org Subject: Re: [PATCH v2 04/12] iio: buffer-dmaengine: Enable write support Message-ID: <20220328182808.48e51432@jic23-huawei> In-Reply-To: <20220207125933.81634-5-paul@crapouillou.net> References: <20220207125933.81634-1-paul@crapouillou.net> <20220207125933.81634-5-paul@crapouillou.net> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 7 Feb 2022 12:59:25 +0000 Paul Cercueil wrote: > Use the iio_dma_buffer_write() and iio_dma_buffer_space_available() > functions provided by the buffer-dma core, to enable write support in > the buffer-dmaengine code. > > Signed-off-by: Paul Cercueil > Reviewed-by: Alexandru Ardelean This (and previous) look fine to me. Just that question of a user for the new functionality... Jonathan > --- > drivers/iio/buffer/industrialio-buffer-dmaengine.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/iio/buffer/industrialio-buffer-dmaengine.c b/drivers/iio/buffer/industrialio-buffer-dmaengine.c > index ac26b04aa4a9..5cde8fd81c7f 100644 > --- a/drivers/iio/buffer/industrialio-buffer-dmaengine.c > +++ b/drivers/iio/buffer/industrialio-buffer-dmaengine.c > @@ -123,12 +123,14 @@ static void iio_dmaengine_buffer_release(struct iio_buffer *buf) > > static const struct iio_buffer_access_funcs iio_dmaengine_buffer_ops = { > .read = iio_dma_buffer_read, > + .write = iio_dma_buffer_write, > .set_bytes_per_datum = iio_dma_buffer_set_bytes_per_datum, > .set_length = iio_dma_buffer_set_length, > .request_update = iio_dma_buffer_request_update, > .enable = iio_dma_buffer_enable, > .disable = iio_dma_buffer_disable, > .data_available = iio_dma_buffer_data_available, > + .space_available = iio_dma_buffer_space_available, > .release = iio_dmaengine_buffer_release, > > .modes = INDIO_BUFFER_HARDWARE,