Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3901171pxb; Mon, 1 Feb 2021 07:32:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQb8CeRmWEb0rmf9MmcLJ2UNqvIKaA1PjRXRWLA921Zm5Xghs9l82AbW3rw9LyR6o10+kK X-Received: by 2002:a17:906:eb87:: with SMTP id mh7mr10516153ejb.10.1612193521411; Mon, 01 Feb 2021 07:32:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612193521; cv=none; d=google.com; s=arc-20160816; b=HYwgFQ4wVkPB8v1PutatCP+QYVCNyXsiGX/latAl41po5rghcPU1yvzSjHn89dvOHb /Oe49OZR3I1eooJY0vvg/0si3lq4i90gEjWOGaD6nfXJ5KX+bBV2ozLBEExxdHd2XV9a tWM1wDeE+vNpdAhO3jQGCpfUeGUJcvMrnel0P+xRkKdkJS0BArXn1MjyJOj1K0oGjQxF Z8MPxowLSk0jj+UeoocofVPC5T1ufYMIy4lA6I5gTJ7S65I6MP3n2XurHKHEgwZ8KqjO Ab6d6GGzlsrg7g8CE/FlH4vVAHaA3JH2emlBs9iWRvLKjc9h8qkP5tkd0GZFH0pSjEjy 191Q== 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=TYMpwsmEjLq+YpUKawqcS8WRF1HnPWhgge0db8+YwV0=; b=eYyqYyqzfzTRS8COCYP1q8AVU/bZyNHuvIK9xOhNtVEGkL4l49WqND9+IV062/wW7c DMKbhxix/dM4OTuzmKV7t9qfQZgyemI/QDHse/IGLAAaq7jz4ox7GYHUDXc4Rnj/x0Jr Gqk7lxsMHOGwpPAb2p7x8l5i82A4eMNSl7dOGcvypRy+stikpq8DmYxVG4OBsr6yzBvj 9n6ENOGlk1Jyx2gwvY4y2YLmHHEDhtK5y0CbXBqiSSZb+4v5GZ3VliNJIVVLmHRhCfIS w3uJSRH0fkW4U5btwsSte9Kmkkp9sxsC8zeAqM4ProLXyNh6walbxaxPTZFQP2lJdFL4 TIJg== 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 j22si2857538ejv.680.2021.02.01.07.31.35; Mon, 01 Feb 2021 07:32:01 -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 S231743AbhBAPaR (ORCPT + 99 others); Mon, 1 Feb 2021 10:30:17 -0500 Received: from mx0a-00128a01.pphosted.com ([148.163.135.77]:27574 "EHLO mx0a-00128a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229984AbhBAOt1 (ORCPT ); Mon, 1 Feb 2021 09:49:27 -0500 Received: from pps.filterd (m0167088.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 111El4L0009549; Mon, 1 Feb 2021 09:48:30 -0500 Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0a-00128a01.pphosted.com with ESMTP id 36d26a4h74-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 01 Feb 2021 09:48:30 -0500 Received: from SCSQMBX10.ad.analog.com (SCSQMBX10.ad.analog.com [10.77.17.5]) by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 111EmSVo060970 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 1 Feb 2021 09:48:28 -0500 Received: from SCSQMBX11.ad.analog.com (10.77.17.10) by SCSQMBX10.ad.analog.com (10.77.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.721.2; Mon, 1 Feb 2021 06:48:27 -0800 Received: from zeus.spd.analog.com (10.66.68.11) by SCSQMBX11.ad.analog.com (10.77.17.10) with Microsoft SMTP Server id 15.1.1779.2 via Frontend Transport; Mon, 1 Feb 2021 06:48:27 -0800 Received: from localhost.localdomain ([10.48.65.12]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 111EmNu6027350; Mon, 1 Feb 2021 09:48:23 -0500 From: Alexandru Ardelean To: , CC: , , , , , , , Alexandru Ardelean Subject: [PATCH v3 00/11] iio: core,buffer: add support for multiple IIO buffers per IIO device Date: Mon, 1 Feb 2021 16:50:54 +0200 Message-ID: <20210201145105.20459-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-01_06:2021-01-29,2021-02-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1011 suspectscore=0 priorityscore=1501 malwarescore=0 bulkscore=0 adultscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102010079 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changelog v2 -> v3: * added commit 'docs: ioctl-number.rst: reserve IIO subsystem ioctl() space' reserving 'i' 0x90-0x9F ioctls for IIO I did not see any conflicts with others (in the doc) - related to this, the new IIO_BUFFER_GET_FD_IOCTL is now at 'i' 0x91 * changed approach for creating sysfs buffer directories; - they are now created as groups on the IIO device; that also means that the groups array needs to be krealloc-ed and assign later in the registration - merged bufferX/ and scan_elementsX/ directories into a single bufferX/ directory - for legacy the buffer/ & scan_elements/ directories are kept; but they're groups objects have been moved on the iio_dev_opaque object - internally, the iio_dev_attr type is being extended to hold a reference for an IIO buffer; = this is great for scan_elements attributes = and for the rest of the iio_buffer attributes, it means we need to wrap them into iio_dev_attr One thing to be determined: if IIO_BUFFER_GET_FD_IOCTL for buffer0 should return an FD or not. Right now, it's returning 0. Alexandru Ardelean (11): docs: ioctl-number.rst: reserve IIO subsystem ioctl() space iio: core: register chardev only if needed iio: core-trigger: make iio_device_register_trigger_consumer() an int return iio: core: rework iio device group creation iio: buffer: group attr count and attr alloc iio: core: merge buffer/ & scan_elements/ attributes iio: add reference to iio buffer on iio_dev_attr iio: buffer: wrap all buffer attributes into iio_dev_attr iio: core: wrap iio device & buffer into struct for character devices iio: buffer: introduce support for attaching more IIO buffers iio: buffer: add ioctl() to support opening extra buffers for IIO device .../userspace-api/ioctl/ioctl-number.rst | 1 + drivers/iio/iio_core.h | 10 + drivers/iio/iio_core_trigger.h | 4 +- drivers/iio/industrialio-buffer.c | 420 +++++++++++++++--- drivers/iio/industrialio-core.c | 87 +++- drivers/iio/industrialio-event.c | 6 +- drivers/iio/industrialio-trigger.c | 6 +- include/linux/iio/buffer.h | 4 +- include/linux/iio/buffer_impl.h | 21 +- include/linux/iio/iio-opaque.h | 14 + include/linux/iio/iio.h | 5 - include/linux/iio/sysfs.h | 3 + include/uapi/linux/iio/buffer.h | 10 + 13 files changed, 487 insertions(+), 104 deletions(-) create mode 100644 include/uapi/linux/iio/buffer.h -- 2.17.1