Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1701007pxb; Wed, 9 Feb 2022 02:34:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJxFo5BoHPabFJ7+IBUegNGsedXV9VJyfWJBxpQQorIH9gsi//ldaXDWIC1f6uqnpxY+bY8/ X-Received: by 2002:a17:90b:2251:: with SMTP id hk17mr2691243pjb.210.1644402873781; Wed, 09 Feb 2022 02:34:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644402873; cv=none; d=google.com; s=arc-20160816; b=H+aIxybikVeZQ+CJfenL6G/AF7hzGdI7iFy9rRWy3p/jVGWE8PFXFhcSvvQ+ITU9qb 3u/twVt77Uhz/puzxhkF3bI3X+TXgqDD3mzEN66hm5Zlz/5a+nb54m4aHJjY58yUgvEY m5/s47DiqpYTsOcugCW9WYrsMw63jX4qVkVwPv/oKBtB0YznCad3OcqkqQ6EzSWPIJrp ISuzQKeeiaAggZ6Wd8rTvv94qPe34KSO/FzbjzFh/a5O+bA7boO1EzyPZPdBgvAcFaC5 v85G1W3hUw+Wk2YLi4/0KB5pUoW4S17DXeHwvadpOUqSyt232DwrfV+EP8X3KcLl5F+u Q1QQ== 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; bh=ZxBYL8+DauaPfTHjDhwt6dfBr2OZSNB+CaJDA/+bvVw=; b=gW30q6ocb6noWi6riMFXIAQf0JnhFzfOfDFWqTeMTjjsAvTHoElqJ9iDA4ablZj9Yx JoMPT6xDKVLzK2U1N3i/mExkR4YxygB5C3A2XEWInGaUSRaiO1avN969Sh072A0S+ZQM rlqi/t9nEHW16JdNSIe6VWovskN/wk3MYTChgP7Cl6tDUlxKE1HQPWuY8ItdDT+2R/BI vfnJdo8kolLKZ0ulpEzVEDklMrPLFnIHZsHjzKuCGaPLrlGZvuwNViqToEvZh2Zie1Py oy7yJmHQF89h13nPUkKazlnNsOQFw5Td2DcmqAlNFR5Um0TbtmoDh1iyhoe26teW7ALo dczQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q4si16201092plk.120.2022.02.09.02.34.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 02:34:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F19C7E0A623D; Wed, 9 Feb 2022 01:22:49 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1448971AbiBGNOG (ORCPT + 99 others); Mon, 7 Feb 2022 08:14:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1448552AbiBGNL4 (ORCPT ); Mon, 7 Feb 2022 08:11:56 -0500 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0858AC043189; Mon, 7 Feb 2022 05:11:56 -0800 (PST) From: Paul Cercueil To: Jonathan Cameron Cc: Michael Hennerich , Lars-Peter Clausen , =?UTF-8?q?Christian=20K=C3=B6nig?= , 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, Paul Cercueil Subject: [PATCH v2 04/12] iio: buffer-dmaengine: Enable write support Date: Mon, 7 Feb 2022 12:59:25 +0000 Message-Id: <20220207125933.81634-5-paul@crapouillou.net> In-Reply-To: <20220207125933.81634-1-paul@crapouillou.net> References: <20220207125933.81634-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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, -- 2.34.1