Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2221774pxa; Mon, 3 Aug 2020 10:23:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymRgXtt8qcHbbO1Hu3CTrVyS+xkKFdy0YDeT467u34UI3TwFtaPKnf27PoYNGko/jzPeyE X-Received: by 2002:a17:906:9382:: with SMTP id l2mr17121995ejx.513.1596475435298; Mon, 03 Aug 2020 10:23:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596475435; cv=none; d=google.com; s=arc-20160816; b=EwpsKvySvY33QwSeaTaC+H/6qkINFYk3phr/Fobdm5vaToEgQP0w6JpLEkNzmXy0gS kguB1oUvcWlXkKkQf9imdqkHsQ0S+UMBLfDEDdwQC+OgWw2xBETNJ7nLsR6wNcNP/Sd3 tTYIjv7LAbJcKPxYaVFo1ncMyFFcqRzXnC6mdtQnJkP/w6zXtwD6siEvC+GuRLbKmlv6 /HC8PJ3QENUnhZ6PEpzEBdDTfvF9+X9oYf1O/n+ApBOjhIuHcxqJFLMCgnfrlnsJQliP D63gUci6jJMaAsaMQD2qEbOwIK4OAbS5uWDkauGVyO6Idg47eLWqBc1Nr2eEQcl1IjSn ZHvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=MFtFB2Zz6mdFlQWkXtbKVzFuI0TWH89xtPB6lt/Kqtc=; b=lnTwpLG12cbe7bMYzAb8pY+75vF9zdgfmyNP71VqRk8TtYB3qVqTFqobGrid9olZBb 2KLAygZk2v9Zw5WGn18c53xNFbjf06hbtoXGqfuEk9/s+LIrvMy/OYk1HGgf/wZCCc7G Uyz+mHXL5qqaK95r32nLAZLzK9WiZiN9aviESn2W2zayqCddA6w92VWUIUkxN6o3iUNx p9u46t+cevTi3nYhWh4Lby9Rf7WeoVqWhKQ80pMBzcFFJLeZr7Aw5SO81MI76qhAFBIz hbsD1mNYrp9FZu6LaxBI82eekqgkCHgeK0aBiXjlmRcny/7YYB4LPfSjdZeLMoFus6BB nwdw== 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 dn20si16046865ejc.111.2020.08.03.10.23.32; Mon, 03 Aug 2020 10:23:55 -0700 (PDT) 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 S1728112AbgHCRUy (ORCPT + 99 others); Mon, 3 Aug 2020 13:20:54 -0400 Received: from mx0a-00128a01.pphosted.com ([148.163.135.77]:10752 "EHLO mx0a-00128a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727803AbgHCRUy (ORCPT ); Mon, 3 Aug 2020 13:20:54 -0400 Received: from pps.filterd (m0167088.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 073H4tdq023250; Mon, 3 Aug 2020 13:20:52 -0400 Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com with ESMTP id 32n69efbae-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Aug 2020 13:20:52 -0400 Received: from SCSQMBX11.ad.analog.com (scsqmbx11.ad.analog.com [10.77.17.10]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 073HKokS063783 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Mon, 3 Aug 2020 13:20:51 -0400 Received: from SCSQCASHYB7.ad.analog.com (10.77.17.133) by SCSQMBX11.ad.analog.com (10.77.17.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Mon, 3 Aug 2020 10:20:49 -0700 Received: from SCSQMBX11.ad.analog.com (10.77.17.10) by SCSQCASHYB7.ad.analog.com (10.77.17.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Mon, 3 Aug 2020 10:20:49 -0700 Received: from zeus.spd.analog.com (10.64.82.11) by SCSQMBX11.ad.analog.com (10.77.17.10) with Microsoft SMTP Server id 15.1.1779.2 via Frontend Transport; Mon, 3 Aug 2020 10:20:49 -0700 Received: from localhost.localdomain ([10.48.65.12]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 073HKlag008684; Mon, 3 Aug 2020 13:20:48 -0400 From: To: , CC: Subject: [PATCH v4 0/3] iio: accel: adxl372: add peak mode Date: Mon, 3 Aug 2020 20:22:16 +0300 Message-ID: <20200803172219.33911-1-alexandru.tachici@analog.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-ADIRoutedOnPrem: True X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-03_15:2020-08-03,2020-08-03 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 spamscore=0 clxscore=1015 mlxscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008030123 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexandru Tachici This series adds the possibility to configure the device, from sysfs, to work in peak mode. This enables adxl372 to capture only over threshold accelerations. 1. Create sysfs files for falling_period/rising_period and thresh_falling_value/thresh_rising_value in events/ dir. Set INT1 reg for activity/inactivity and push event code in events fifo on irq. 2. Document use of iio events sysfs files. Alexandru Tachici (2): iio: accel: adxl372: add event interface docs: iio: Add adxl372 documentation 1. Device FIFO can now be set in peak mode and only over the threshold accelerations will be stored. Driver sets adxl372 FIFO in peak mode when the peak iio:trigger is selected. Stefan Popa (1): iio: accel: adxl372: Add support for FIFO peak mode Changelog v3 -> v4: - add mutex for threshold write so that writing the two registers becomes atomic - added a trigger for peak mode, when selected in the trigger user interface, adxl372 will start recording only peak acceleration data in the fifo - added a adxl372.rst doc file explaining the use of iio events sysfs Documentation/iio/adxl372.rst | 46 +++++ Documentation/iio/index.rst | 1 + drivers/iio/accel/adxl372.c | 328 +++++++++++++++++++++++++++++++++- 3 files changed, 367 insertions(+), 8 deletions(-) create mode 100644 Documentation/iio/adxl372.rst -- 2.20.1