From patchwork Mon Apr 3 15:47:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 669949 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39254C761AF for ; Mon, 3 Apr 2023 15:53:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233098AbjDCPxy (ORCPT ); Mon, 3 Apr 2023 11:53:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232212AbjDCPxg (ORCPT ); Mon, 3 Apr 2023 11:53:36 -0400 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C12324209; Mon, 3 Apr 2023 08:53:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1680536898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uVat1y3nUPAGrRVYX0c87LmQAN3Bo767mwQaGSvhkEU=; b=FeodDPhqhSrgCY931wbpHE6ejF5oHVHcNN9LKo1irGAdS332/J9BWW1vxmLi9f6cPCDxUu BJmbaFoOLXJOLPjOx3Glsg+4nu0jshD/V6BZHWfI9pi6vy1psy5D0Q5+tCxIlOulXsLEk6 56bq7XLlenzXWg3DS2+///eQUHm2/HY= From: Paul Cercueil To: Jonathan Cameron , Lars-Peter Clausen , Vinod Koul , Michael Hennerich , =?utf-8?q?Nuno_S=C3=A1?= , Sumit Semwal , =?utf-8?q?Christian_K=C3=B6nig?= Cc: linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-iio@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, Paul Cercueil , Alexandru Ardelean Subject: [PATCH v3 06/11] iio: buffer-dmaengine: Enable write support Date: Mon, 3 Apr 2023 17:47:55 +0200 Message-Id: <20230403154800.215924-7-paul@crapouillou.net> In-Reply-To: <20230403154800.215924-1-paul@crapouillou.net> References: <20230403154800.215924-1-paul@crapouillou.net> MIME-Version: 1.0 X-Spam: Yes Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 --- 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 592d2aa9044c..866c8b84bb24 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,