Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4733994rwl; Mon, 3 Apr 2023 08:55:14 -0700 (PDT) X-Google-Smtp-Source: AKy350ZwBQzF4ePCX0kwWDu3U5YP0ayMbENlKPhcdQdW8DE95SC7YOkpomo3zCfv3RQQwy2mg7gc X-Received: by 2002:a17:906:3093:b0:931:6641:9897 with SMTP id 19-20020a170906309300b0093166419897mr35277495ejv.44.1680537313808; Mon, 03 Apr 2023 08:55:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680537313; cv=none; d=google.com; s=arc-20160816; b=tVewhas5Ivdxnt+osiq48c9rURgF8jqwGLJPpVTg7ZDceP0mZiVNrN/3feg33Gdb+E qJ/O1DuAmqUz/KRllzxK813vqlqkW4LLT30XFPe9Zjqpmn+OpFkbUi1/VuOGsPxzS4BH HHPs7cyU6MkDwx9iQYgR3Rei4Vl0Rrg1FI0QHVLSiORTtBS6/m8Q1j6a+1vzal7TKHq2 W6ErcSPs5Z5lWmlERFgKGl7QrshzbxzhVYCSrzD5DQDR2Wjgk66Tk+zfpyizfFTHhBkY Ut+RotnbkTovqo771ctgTR3lG7PXiFv4PKloDDumdt9Yvd/Il37OGOOUoIrI1Bn3NUCU vQjQ== 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:date:subject:cc:to:from :dkim-signature; bh=uVat1y3nUPAGrRVYX0c87LmQAN3Bo767mwQaGSvhkEU=; b=1DYw0wvQ77TAR0SF3FUfcAHo31L/e06Wh4af+kv9rfJdKNf3FYpCQEdIImJ3ZWuBTW oOt7cY4LFVSISLHKqcDXKbUKd4Jw9u3cVXMwpG7HHrf5BlAOIxJEUf1dkO021xn2QY99 q3ES5pEE67gNP0nrROn/ZQ8Q2/S7ToGeAnrqqL2QbiE3EA3Ta9+GIqYRL63EtXNWnvta R6Ye7QMeRTTjsMcf7DD2AThuQaMhZeLVR8JymCCtYImcy3uDXeYehgBQHyTn+qAyqPpI w36r501OVip7KhQYi2tNYxYC1jrPUDZZBu4qBtnmlL2brI3fcQJHAmiy0XEyC+6G48bH PRjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=FeodDPhq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc41-20020a17090716a900b0093b441fef0fsi7659267ejc.295.2023.04.03.08.54.49; Mon, 03 Apr 2023 08:55:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=FeodDPhq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233099AbjDCPxz (ORCPT + 99 others); Mon, 3 Apr 2023 11:53:55 -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=20S=C3=A1?= , Sumit Semwal , =?UTF-8?q?Christian=20K=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 Content-Transfer-Encoding: 8bit X-Spam: Yes X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS 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 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, -- 2.39.2