Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2113618pxb; Thu, 11 Feb 2021 04:54:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJw46CZTbGIYTpZlrrddmZKe/E4IPbnasV4FAxPXTyQ9eXkH7espyiBLgJUTsYLX7l2Z1Ry1 X-Received: by 2002:aa7:c80a:: with SMTP id a10mr8235979edt.141.1613048049678; Thu, 11 Feb 2021 04:54:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613048049; cv=none; d=google.com; s=arc-20160816; b=tm17FKS87Sr912AEiRMHgaQPjtJPg3/tFu2h9nROdWWFWixZTGWIu0X6O+z4Dj9qE0 VL0F6mo8Guu/2Am8BK+1gbuORNxE73NF5guiEzSq4CKeyVwW0uwJjMpeAe3fx8FGumRB 9dnfhUsUZKiyoDa0MayueVq4/l20S27sBnUL0gSlU/uylZs1cGJuGm7CRLqaVGMbrW/Y q2njz0diS2z1ne70MKxlTvkY2EVWLq/lBzN8g1F3kWAfu1NVIJuyae2fYvMjazBa22bm FcUkzyO5ymVMiGu/2q6w/etQJhqUZ/Jab6zdoiyljuyPTNsT2UFo/HWzcvz59ic4DVr1 jiKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=gn0L/gdOSJ1d51pCYqzE/EJC5LYFt9tBHoBQ2YqU+kI=; b=DpjYFyIhuJbCJjI7py7tQuMJbO0v5gPgKHerYQnavyXMWkKKHOftsVRkPNSV/IgBO6 RRsdNigoWM9IwKrbc6b5vk8N1pmHWSKf2M5yexAwpS0/V53w3kd+RdWZLUbQYhu/MH9C 1IAK1kYMrYqyTv5UfiyJ+/VDwNz7aTbETeyhcEc03aD0AIZVK4sIplWueqxiklJ4YRju dq7J0R0QuwtSCv2GpkV7q4u/j2pXO6RSWRBKfaP1C2wt9bBZ3ejydoNyE38N4ghzVZvC 4x8dm1mpwRSqOh6945IWnS6ICyo5967ZRLpKEsSaKE33ICokx6QviL46WQexZo1RvvFz sv6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v26si819637ejy.97.2021.02.11.04.53.45; Thu, 11 Feb 2021 04:54:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231533AbhBKMxM (ORCPT + 99 others); Thu, 11 Feb 2021 07:53:12 -0500 Received: from mx0a-00128a01.pphosted.com ([148.163.135.77]:48462 "EHLO mx0a-00128a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231531AbhBKMcZ (ORCPT ); Thu, 11 Feb 2021 07:32:25 -0500 Received: from pps.filterd (m0167089.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11BCPLVm030484; Thu, 11 Feb 2021 07:31:32 -0500 Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0a-00128a01.pphosted.com with ESMTP id 36hrw905xc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Feb 2021 07:31:32 -0500 Received: from ASHBMBX9.ad.analog.com (ASHBMBX9.ad.analog.com [10.64.17.10]) by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 11BCVVQL004799 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Thu, 11 Feb 2021 07:31:31 -0500 Received: from ASHBMBX9.ad.analog.com (10.64.17.10) by ASHBMBX9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Thu, 11 Feb 2021 07:31:30 -0500 Received: from zeus.spd.analog.com (10.66.68.11) by ASHBMBX9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server id 15.1.1779.2 via Frontend Transport; Thu, 11 Feb 2021 07:31:30 -0500 Received: from localhost.localdomain ([10.48.65.12]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 11BCVRdl011921; Thu, 11 Feb 2021 07:31:28 -0500 From: Alexandru Ardelean To: , CC: , , , , , Alexandru Ardelean Subject: [PATCH 0/3] iio: core,buffer-dma: add mmap support Date: Thu, 11 Feb 2021 14:33:50 +0200 Message-ID: <20210211123353.78963-1-alexandru.ardelean@analog.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.737 definitions=2021-02-11_06:2021-02-10,2021-02-11 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 clxscore=1015 adultscore=0 priorityscore=1501 bulkscore=0 mlxscore=0 phishscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102110111 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is basically Lars' work adapted from branch: https://github.com/larsclausen/linux/commits/iio-high-speed-5.10 [hopefully i got the stuff correctly from that branch] What is different, is that this one is adapted on top of the multibuffer support (currently at v5) discussed here: https://lore.kernel.org/linux-iio/20210211122452.78106-1-alexandru.ardelean@analog.com/T/#t Also, adapted an example for high-speed/mmap support in 'tools/iio/iio_generic_buffer.c' The example is adapted from libiio: https://github.com/analogdevicesinc/libiio/blob/master/local.c#L51 but will all the ioctl()s organized after the one that are reserved (hopefully) for IIO Tested that mmap() works. Moved (artifically) valid buffer0 as buffer2 and the operation still works. Alexandru Ardelean (1): tools: iio: add example for high-speed buffer support Lars-Peter Clausen (2): iio: core: Add mmap interface infrastructure iio: buffer-dma: Add mmap support drivers/iio/buffer/industrialio-buffer-dma.c | 314 ++++++++++++++++-- .../buffer/industrialio-buffer-dmaengine.c | 22 +- drivers/iio/industrialio-buffer.c | 158 +++++++++ include/linux/iio/buffer-dma.h | 25 +- include/linux/iio/buffer_impl.h | 11 + include/uapi/linux/iio/buffer.h | 27 ++ tools/iio/iio_generic_buffer.c | 184 +++++++++- 7 files changed, 694 insertions(+), 47 deletions(-) -- 2.17.1