Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp461093rdh; Thu, 23 Nov 2023 08:29:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IF+mwTeE3ypzbUm+3EP7QfC44rsJPbA22K/dPSxFILwXIGb91ItPt7DtLb89LQsMzPeMlhy X-Received: by 2002:a05:6808:497:b0:3b6:cb4b:4799 with SMTP id z23-20020a056808049700b003b6cb4b4799mr6191529oid.56.1700756993613; Thu, 23 Nov 2023 08:29:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700756993; cv=none; d=google.com; s=arc-20160816; b=VUheRbU8A+kZrHhfnVrxSgEHp5thSPIg/YpbtqxOHZpjXU6R7VQo8Hh8VgGaHy2ZeE LdpzwuFwQ0OHTreLFPsIKyh+dRr/iT0UfmUGVdfu2X6f0C/PxefgSr5aGr3UyfhOi2Gu V6YhmsBEV2Qv/Fd594nwX4ziujvFgVDghfeL+3mlHI62CxakI6PoN74cxOJcZPU2CZm/ X4Y9Bo+IPJt1neLgfXmqIPRO9OBSKPImrfsjNYhM5aNXrFvad7Gx52CLbqmWZn3iyqtn oLXq3XphbNz1LbXkN03STZUb3q5Ji+ex3sYHhvgP2/7Pm6pmDvQ4t1mx+iwWeg2l4rx9 qMAA== 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 :message-id:date:subject:cc:to:from; bh=FQydBurmC2MYi304OfSmAdrU2CbA4czTdvPh5HuwJjM=; fh=fmIPjB+vuB/gGI1Nd1TRUx/4p9pHkToNuIxmR42DyC4=; b=iEHaeStsKuaoagZsM1gbqJDlVvsMHwi6CQG+Ea0Ea160gKyfgzTtyV/97ebkHld8hR DvAvKV3p3C0/fTOmLAaCzqUaxZDZXIdMo1/aeXucJvtlCAm8SSYqNdKD+vw5K6A727Q+ 4UqAD7VMAwBTdaDe58l9bmsm4vx7Lp4fvzmns7Dezstk+ef0MydRIk6q+UFw4FGps6Cu 5vOx4DkehWcYPDF8PaS2G5D1LyC57ZjnEvq8Sbgdqhxoo1Ed58rQHwWl24pNucwXBOK9 guMAk2qLbKFJDs+mpwg72aemGet13id219An8c4G3suhoOrhSOIG1Qf7P+MvHLZA5rMo 0eIQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id cl20-20020a056a02099400b005ace065e529si1727708pgb.333.2023.11.23.08.29.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 08:29:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 390C180BC515; Thu, 23 Nov 2023 08:29:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229811AbjKWQ3l (ORCPT + 99 others); Thu, 23 Nov 2023 11:29:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjKWQ3j (ORCPT ); Thu, 23 Nov 2023 11:29:39 -0500 Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A93910CF; Thu, 23 Nov 2023 08:29:46 -0800 (PST) Received: from pps.filterd (m0167088.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 3ANFk7a3030777; Thu, 23 Nov 2023 11:29:32 -0500 Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3uhxk5tg30-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Nov 2023 11:29:31 -0500 (EST) 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 3ANGTUwf045614 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 23 Nov 2023 11:29:30 -0500 Received: from ASHBCASHYB4.ad.analog.com (10.64.17.132) by ASHBMBX9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Thu, 23 Nov 2023 11:29:29 -0500 Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by ASHBCASHYB4.ad.analog.com (10.64.17.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Thu, 23 Nov 2023 11:29:29 -0500 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Thu, 23 Nov 2023 11:29:29 -0500 Received: from work.ad.analog.com (HYB-hERzalRezfV.ad.analog.com [10.65.205.129]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 3ANGTEJK019364; Thu, 23 Nov 2023 11:29:17 -0500 From: Marcelo Schmitt To: , , , , , , , , CC: , , Subject: [PATCH v2 0/7] Add support for AD7091R-2/-4/-8 Date: Thu, 23 Nov 2023 13:29:12 -0300 Message-ID: X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: er7PkQiZ7KzDAh-QEj3JkAQIeXeO2wxd X-Proofpoint-ORIG-GUID: er7PkQiZ7KzDAh-QEj3JkAQIeXeO2wxd X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-23_12,2023-11-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 impostorscore=0 priorityscore=1501 malwarescore=0 spamscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 lowpriorityscore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311060001 definitions=main-2311230120 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 23 Nov 2023 08:29:52 -0800 (PST) From: Marcelo Schmitt This series adds support for AD7091R-2/-4/-8 ADCs which can do single shot or sequenced readings. Threshold events are also supported. Overall, AD7091R-2/-4/-8 are very similar to AD7091R-5 except they use SPI interface. This has been tested with raspberrypi and eval board on kernel 6.1 from ADI fork. Link: https://wiki.analog.com/resources/tools-software/linux-drivers/iio-adc/ad7091r8 I ran get_maintainers on driver files but completely forgot to run it on the yaml doc, my bad. I made the changes requested so far. For v2, I also ran dt_binding_check on iio testing branch to check out for any additional dt-schema issues. None reported. Didn't see any other warn after running Sparse, Smatch, and Coccicheck. I get a warn from checkpatch about IIO_DMA_MINALIGN which I don't know how to fix :( Change log v1 -> v2: - Added device tree related To/Cc recipients. - Removed extra print of error code - $ref: "adc.yaml" -> $ref: adc.yaml - Fixed defined but not used build warn - Moved dt documentation of required properties to after patternProperties. - Removed incorrect return before regmap_update_bits(). Marcelo Schmitt (7): iio: adc: ad7091r-base: Set alert config and drvdata MAINTAINERS: Add MAINTAINERS entry for AD7091R iio: adc: ad7091r: Move defines to header file iio: adc: ad7091r: Alloc IIO device before generic probe dt-bindings: iio: Add binding documentation for AD7091R-8 iio: adc: Add support for AD7091R-8 iio: adc: ad7091r-base: Add debugfs reg access .../bindings/iio/adc/adi,ad7091r8.yaml | 101 +++++++ MAINTAINERS | 12 + drivers/iio/adc/Kconfig | 16 ++ drivers/iio/adc/Makefile | 4 +- drivers/iio/adc/ad7091r-base.c | 114 +++++--- drivers/iio/adc/ad7091r-base.h | 64 ++++- drivers/iio/adc/ad7091r5.c | 55 ++-- drivers/iio/adc/ad7091r8.c | 270 ++++++++++++++++++ 8 files changed, 549 insertions(+), 87 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7091r8.yaml create mode 100644 drivers/iio/adc/ad7091r8.c -- 2.42.0