Received: by 2002:a05:7412:8d23:b0:f7:29d7:fb05 with SMTP id bj35csp328413rdb; Sat, 16 Dec 2023 09:45:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHkUctisFF51LIXFQ1Hu6YNAR4M2kI/a9g0fnuhdqAGnIJUNrDcg2NY/TCMlLMTjVLpD1Me X-Received: by 2002:ac8:7e88:0:b0:425:9ff2:fafd with SMTP id w8-20020ac87e88000000b004259ff2fafdmr20968248qtj.5.1702748740217; Sat, 16 Dec 2023 09:45:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702748740; cv=none; d=google.com; s=arc-20160816; b=vLElGoqBKtbgyVeBmxNomCsSthNBAZ0608mO3hQRYKlb5AtuIdKyQCk1I3S6i7dXQZ diC8gP1gI5nlTQ0cpZoU+FAefFdjLU3gFWzwd/TIJiAJ8PIKldOP0VBDWs/0Vuk0DgSr f3V6Y1UMIC7uAchRFcCqzNjiPrzVmVy8gNUlvEcLDbaCCjCINZGAewc10aOTmxqfwyh8 WM/rpVOHBOTlq8zW7yjtkuN148RzDW+BBFbt0o32fBqdBjQYH+28ubQadNxvlwunpCFp 7uaTiR2fWkxDZih5F8G9Da/3v5ZpIe13nnZfvFAEAB7jRTMflrWewoQveEH10v5Yck7G jWfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=HKmARO17Kl0F/S/liAeweANBWJl0P2MqdrzcZuKJ6kk=; fh=QwEOK/MZnBUTBQAzGwecl0DPfALWXdlHbxPQlQn9VIw=; b=YhMQtgYa7JuUnIimiFQR6pxe5DgD03D+s266yqCZvQ2E69umXfKVikye3RLT3bWP3I pQ8JI38shf8bVeSW/2WoZnN1IWpftW998pXu1B4JZRgxHx6SuNWvjuP0PaobdTHqzXUK srA6g6ffl7xcE9+f9v6sC5FcSkdNM7LMnzHZDxzJQ6fznMY7K8OWZnk3wpvObBwivcVs Ifrq1mlOJymDypAKwnK4mkb08qmz6dpznDsTIqQPyHy2bX5Hz8+SRDsE0ZCFK2EEhlby Pu8rvF6RedXNvrR7CZ4e+GTMJ86wnr3Ez6TpULFEPtgKacZ4PE1TreUc+jqJIi+w9UiZ m02Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-2298-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2298-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id i13-20020ac8488d000000b00423916f2a80si19010719qtq.706.2023.12.16.09.45.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Dec 2023 09:45:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2298-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-2298-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2298-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id F25901C218B9 for ; Sat, 16 Dec 2023 17:45:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A7C0230FA1; Sat, 16 Dec 2023 17:45:32 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mx0b-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B173F2C192; Sat, 16 Dec 2023 17:45:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com Received: from pps.filterd (m0375855.ppops.net [127.0.0.1]) by mx0b-00128a01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BGEYQka002174; Sat, 16 Dec 2023 12:45:07 -0500 Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0b-00128a01.pphosted.com (PPS) with ESMTPS id 3v1526spe1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 16 Dec 2023 12:45:06 -0500 (EST) Received: from ASHBMBX8.ad.analog.com (ASHBMBX8.ad.analog.com [10.64.17.5]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 3BGHj5lw033801 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 16 Dec 2023 12:45:05 -0500 Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by ASHBMBX8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Sat, 16 Dec 2023 12:45:04 -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; Sat, 16 Dec 2023 12:45:04 -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 3BGHikIr015700; Sat, 16 Dec 2023 12:44:48 -0500 From: Marcelo Schmitt To: , , , , , , , , , , , , , CC: , , Subject: [PATCH v4 00/15] Add support for AD7091R-2/-4/-8 Date: Sat, 16 Dec 2023 14:44:43 -0300 Message-ID: X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: ZteL9u2eUe3dogRbUEce-DRqXKLVF4DJ X-Proofpoint-ORIG-GUID: ZteL9u2eUe3dogRbUEce-DRqXKLVF4DJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-02_01,2023-11-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 priorityscore=1501 phishscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 bulkscore=0 suspectscore=0 mlxscore=0 adultscore=0 clxscore=1011 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312160136 From: Marcelo Schmitt ----------------- Updates ----------------- Applied changes suggested to the previous set. Change log v3 -> v4: - Patch 1: checkpatch patch * Changed __aligned regex string. - Patch 2: alert handling fix * Applied David's suggestion [1] to pass iio_dev on to IRQ thread handler. - Patches 6, 7, 9 * Removed ad7091r prefix from callback function names. - New Patch 7: Remove uneeded probe parameters * Removed id->name and regmap from probe paramenters. - Patch 8 (now Patch 9): Enable internal vref * Not expecting NULL return from regulator_get_optional() anymore; * Reverted to previous probe defer handling. - Patch 10 (now Patch 11): dt doc * Extending existing ad7091r5 dt doc instead of creating a new one; * Added VDD and VDRIVE supplies to dt doc; * Removed channel property from dt doc; * Interrupt description, interrupt constraint check, example indentation improvements. - Patch 12 (now Patch 13): add ad7091r8 patch * Neats to macros, gpio setups, and probe parameters. - Patch 13 (now Patch 14): * Made use of wild cards in MAINTAINERS file. - New Patch (Patch 15): event configuration callbacks [1]: https://lore.kernel.org/linux-iio/CAMknhBHCYicEL_xhumBQMUm=HBVb=7dLrYsK8Zj2o7RodvMarw@mail.gmail.com/ Thank you all for the help with this set, Marcelo ----------------- Context ----------------- 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. Changes have been tested with raspberrypi and eval board on raspberrypi kernel 6.7-rc3 from raspberrypi fork. Link: https://wiki.analog.com/resources/tools-software/linux-drivers/iio-adc/ad7091r8 Marcelo Schmitt (15): scripts: checkpatch: Add __aligned to the list of attribute notes iio: adc: ad7091r: Pass iio_dev to event handler iio: adc: ad7091r: Set alert bit in config register iio: adc: ad7091r: Align arguments to function call parenthesis iio: adc: ad7091r: Move generic AD7091R code to base driver and header file iio: adc: ad7091r: Move chip init data to container struct iio: adc: ad7091r: Remove unneeded probe parameters iio: adc: ad7091r: Set device mode through chip_info callback iio: adc: ad7091r: Enable internal vref if external vref is not supplied iio: adc: ad7091r: Add chip_info callback to get conversion result channel iio: adc: Split AD7091R-5 config symbol dt-bindings: iio: Add AD7091R-8 iio: adc: Add support for AD7091R-8 MAINTAINERS: Add MAINTAINERS entry for AD7091R iio: adc: ad7091r: Allow users to configure device events .../bindings/iio/adc/adi,ad7091r5.yaml | 82 +++++- MAINTAINERS | 8 + drivers/iio/adc/Kconfig | 16 ++ drivers/iio/adc/Makefile | 4 +- drivers/iio/adc/ad7091r-base.c | 255 +++++++++++------ drivers/iio/adc/ad7091r-base.h | 81 +++++- drivers/iio/adc/ad7091r5.c | 120 ++++---- drivers/iio/adc/ad7091r8.c | 257 ++++++++++++++++++ scripts/checkpatch.pl | 1 + 9 files changed, 682 insertions(+), 142 deletions(-) create mode 100644 drivers/iio/adc/ad7091r8.c -- 2.42.0