From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=148.163.135.77 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796311233; b=qmDRKLe7BY8RbPXJ39S7Xd0haoaGCneEYPTa57Ygb4vYs9VSJn9EdQvtlvT0/KOoGQM7 WmFy4NPIYQD9BoHY4YZuTQoqNtkH3GqhIcXFqMvjt1HR1R4V2ZSDyuVUWl9dR41J9G0SX JY25FebEB7RPAPVENC4cjFKyzGlF5b1IIHUqkCzNaxusM4VPEA/vRy7EBddGKKJnGqvRp k4I14zoa3RYetmbf80H0RDbXKTCb6JK2gpqoKqYEzwDLLUO0MCuasv1lO9XhrgIPz8mEz hRyTQPaQNDRgGMUjd7hU4P8Yjam5JcmDhZKyblkVrWxcQvGVDOP+BWXAJMCfdwDeTKQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796311233; h=DMARC-Filter:Received:DKIM-Signature:DKIM-Signature:Received: Received:Received:Received:Received:From:Date:Subject:MIME-Version: Content-Type:Content-Transfer-Encoding:Message-ID:References: In-Reply-To:To:CC:X-Mailer:X-Developer-Signature:X-Developer-Key: X-ADIRuleOP-NewSCL:X-Proofpoint-GUID:X-Proofpoint-ORIG-GUID: X-Proofpoint-Spam-Info:X-Proofpoint-Spam-Details-Enc: X-Authority-Analysis:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=U35OnhgNb/PjEyt860DczofaOSU26qMloXPtzvCMMm0=; b=b8WVhvEp9JsOCmRvHpp8O4e6dLXJV7um/CxAu3dmKWEDbkvbPFQDakbP+Hdgxo1kFjP+ 2fno2+NNy3XzKFzH1VCMMz27lNf1kQXbr8iCcMzM+plMR7k8ZuCYX/JhtYWN0RPhjaN+X QQIjmRNKJEz7uoOVXNPXDczrsOLgglt9o8DSVQb+Iwx8kz2PQTFLI3FEEOphAgpCDO3Eg xHCro4VZDJSxHnRghxCQ4MVx2NK8gfWbEXVbyfRghRGlLwj35r4qJIapgy2omMs79ENFg fXsuyIGGS7SPyz6dKrVcbr/lQR1tgBRw5dDS16wxxZfRabpg1wf/+p6r23OaTB8bSmw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass header.d=vtelectron.com header.i=@vtelectron.com header.a=rsa-sha256 header.s=DKIM header.b=RpEGSNfV; dkim=pass header.d=analog.com header.i=@analog.com header.a=rsa-sha256 header.s=DKIM header.b=MFTkq0bf; arc=none smtp.remote-ip=148.163.135.77 Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4719D606A33C; Thu, 3 Dec 2026 15:20:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4719D606A33C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=analog.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=vtelectron.com header.i=@vtelectron.com header.a=rsa-sha256 header.s=DKIM header.b=RpEGSNfV; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.a=rsa-sha256 header.s=DKIM header.b=MFTkq0bf Received: from pps.filterd (m0167089.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B3EuOKS2235773; Thu, 3 Dec 2026 10:20:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vtelectron.com; h=cc:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to; s= DKIM; bh=U35OnhgNb/PjEyt860DczofaOSU26qMloXPtzvCMMm0=; b=RpEGSNf VBeu3VFQiAGCjwruf0+XsiAPwuM3vJ1xQdbvCXgaKJzNO5zpU1WGemdGbVRGLrIC 9p6TukrMcbfuoh+8VlgeIIRTv/6ZnOlRXboA5ryY9FtCUGjbvj03odggQKfSO92c 53gHH01NL+mV1bklbnDJsFwXxvmhYfYQtR04cYPjXFus6mvOrEAy0OouB1mSGsAd 6sB7S304KDS8pyI/sK0Z+J/tv67xeXsdhnBvmgzn5KLkJpma222lDm4bGW4OvWtO PBh864FqQQSOVOVJHrBJDi9q3KD5nQMfFjmhbELaY7ry1qZpEelBAzzVNHR8dpHJ E5wbilBGCv+5hFw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=DKIM; bh=U35On hgNb/PjEyt860DczofaOSU26qMloXPtzvCMMm0=; b=MFTkq0bfnE7LtoAJeS+Bo SHBCXLr2ILK8jIPmpw0rUHQxYoESmD/Cmpi/ug8YELLxuRByvty+e0/XUr+rLDwR 33hr/hkzQdQziFRa4LfaPom7pPC9SFB+/QPM+1NNKOhVdLSH9IBnIDK3QQbnguSu sNL9YpRCSbZn5MgxRG+wU+u56AKd0IbeA9/wO3BjcNx0m9OApQxq+APAYFT93A5e Fz/u2uYIRoxfutCrDGUfomttaUNSI/aw1IYYG4MiIkd3QXSDWpkXeXwczGaGcvre QFLH7Szf9kMk2XdpBzuEHVQlkHtXx/4GCfd6oz4fGmqZZeJ/+iaqR7d7WGPtiBqM w== Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 4janpc6duy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Dec 2026 10:20:11 -0500 (EST) Received: from ASHBMBX9.ad.analog.com (ASHBMBX9.ad.analog.com [10.64.17.10]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 6B3FKAwe057961 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 3 Dec 2026 10:20:10 -0500 Received: from ASHBMBX8.ad.analog.com (10.64.17.5) 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.2562.56; Thu, 3 Dec 2026 10:20:09 -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.2562.56 via Frontend Transport; Thu, 3 Dec 2026 10:20:09 -0500 Received: from HYB-e1y2fvUQ3cx.ad.analog.com (HYB-e1y2fvUQ3cx.ad.analog.com [10.44.3.64]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 6B3FJrOl030373; Thu, 3 Dec 2026 10:20:03 -0500 From: Janani Sunil Date: Thu, 3 Dec 2026 16:19:42 +0100 Subject: [PATCH 02/18] dt-bindings: iio: adc: ad4170-4: Restrict channel inputs to valid codes X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20261203-ad419x-release-v1-2-18578ab50524@analog.com> References: <20261203-ad419x-release-v1-0-18578ab50524@analog.com> In-Reply-To: <20261203-ad419x-release-v1-0-18578ab50524@analog.com> To: Marcelo Schmitt , =?utf-8?q?Nuno_S=C3=A1?= , Michael Hennerich , Jonathan Cameron , David Lechner , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ana-Maria Cusco CC: Conor Dooley , , , , , Janani Sunil , Janani Sunil , Jonathan Cameron X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796311193; l=3888; i=janani.sunil@analog.com; s=20261203; h=from:subject:message-id; bh=kgMroepWvmyCle2Jsb/Uwyw/tVcHlpPSOPlHnESUCuQ=; b=i5MamezVfVPSFOmIjHfiDdKv8W/GXadCtg56oABLejOXI63EfmWVyzg9Cx5C8lUPu8id3oICx YW69LPfR09yBzkrZvp3dCnEacPHvV9ooFfBbLYK0DouLaQx6eh6vYR5 X-Developer-Key: i=janani.sunil@analog.com; a=ed25519; pk=h+uqDH4ldx3bt0zw9RZa0Mu1beWoTg6aZNNxzE7vim4= X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: oSbrVrSf09kgFKXlcfx6D2aISh9FPc-A X-Proofpoint-ORIG-GUID: oSbrVrSf09kgFKXlcfx6D2aISh9FPc-A X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAzMDA2MSBTYWx0ZWRfXzNsz/mVIki9S wMF3D4e7cB5RG07muDOtzx8UeOO5OhN6kHOzCiMLNmXvIhLej81V4XUXTDkMCAsJq0QxGgNBIG1 X+W1yNGrcWCWkzcMTbC9RA7uX1iIhngFDhn2Xdhcoyw3n75FI8J0 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAzMDA2MSBTYWx0ZWRfX+OuULjL/21+s JFYMnF2gm++JtgI1H3Wh8Ysd9jKr5EgIbpzvOvkFTMHpKu2TenF6fLpYiPpmtvkv4+Np/CXY6qJ 4lRBYqre/hJVT42i6YcmXSGzq31V4edijFEz2unv7pCxYlR9W/tXz0IY3GYGurYOPUW6KO8lbER V6vQUo8nMLxOLTaxIEQHiAuxdEx0jEX9ZzQj9yXlFMadgONKze7y+1Q6l5PFeYZ8f9jfONeJjTj ErPJzmJaQkZ1i0UEkPQuU8LxYwRvSHu9FPVeyfNFd8UT5QcRKCHum+KtB07Rqkmwoa3k7te+YYA Z/OTl4OHEv8N8LJykvJvorS+EgpZj9N9+5THMj3YEBl3yPlCjRyuaBBJXpX6sCxigntOpfWsaO3 PdcjGfCj9iWliERS+HTqkU6H6ZoYvfQP9Tfr7Ds1L/BhMQlvFecKsuGElYXMIyZheMIYJEx6HEG cGfZAkEq4K9xIcwpw3g== X-Authority-Analysis: v=2.4 cv=X9fHu2Te c=1 sm=1 tr=0 ts=6b1188ab cx=c_pps a=PpDZqlmH/M8setHirZLBMw==:117 a=PpDZqlmH/M8setHirZLBMw==:17 a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=0sLvza09kfJOxVLZPwjg:22 a=Z0pTeXoby7EwIRygza74:22 a=gAnH3GRIAAAA:8 a=GBJdYiTSo_XtMmiNduIA:9 a=QEXdDO2ut3YA:10 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-03_04,2026-12-03_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 clxscore=1011 spamscore=0 phishscore=0 adultscore=0 suspectscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612030061 single-channel and common-mode-channel select the CHANNEL_MAPn AINP_N and AINM_N inputs just like diff-channels does, but they are not constrained at all, so any number passes validation. Likewise, the adi,excitation-pin properties accept codes 9 to 16, which CURRENT_SOURCEn I_OUT_PIN marks reserved. Apply the diff-channels constraints to single-channel and common-mode-channel: AIN0 to AIN8 and the special inputs 17 to 29, with no DAC output on devices without an integrated DAC. Restrict the excitation pins to AIN0 to AIN8 and GPIO0 to GPIO3. Fixes: 1b3cee41235b ("dt-bindings: iio: adc: Add AD4170-4") Signed-off-by: Janani Sunil --- .../devicetree/bindings/iio/adc/adi,ad4170-4.yaml | 34 +++++++++++++++++----- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad4170-4.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad4170-4.yaml index ef5ca2ed8210..90ca4e39c216 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad4170-4.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad4170-4.yaml @@ -153,6 +153,14 @@ allOf: anyOf: - maximum: 19 - minimum: 21 + single-channel: + anyOf: + - maximum: 19 + - minimum: 21 + common-mode-channel: + anyOf: + - maximum: 19 + - minimum: 21 # Only AD4170-4 can be clocked by an external crystal. The other devices # have no XTAL1 and XTAL2 pins. @@ -283,6 +291,20 @@ patternProperties: enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] + single-channel: + description: + Positive input of a pseudo-differential channel. Uses the same input + numbers as diff-channels. + enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29] + + common-mode-channel: + description: + Negative input of a pseudo-differential channel. Uses the same input + numbers as diff-channels. + enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29] + adi,reference-select: description: | Select the reference source to use when converting on the @@ -323,8 +345,7 @@ patternProperties: Analog input to apply excitation current to while the channel is active. $ref: /schemas/types.yaml#/definitions/uint32 - minimum: 0 - maximum: 20 + enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20] default: 0 adi,excitation-pin-1: @@ -332,8 +353,7 @@ patternProperties: Analog input to apply excitation current to while the channel is active. $ref: /schemas/types.yaml#/definitions/uint32 - minimum: 0 - maximum: 20 + enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20] default: 0 adi,excitation-pin-2: @@ -341,8 +361,7 @@ patternProperties: Analog input to apply excitation current to while the channel is active. $ref: /schemas/types.yaml#/definitions/uint32 - minimum: 0 - maximum: 20 + enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20] default: 0 adi,excitation-pin-3: @@ -350,8 +369,7 @@ patternProperties: Analog input to apply excitation current to while the channel is active. $ref: /schemas/types.yaml#/definitions/uint32 - minimum: 0 - maximum: 20 + enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20] default: 0 adi,excitation-current-0-microamp: -- 2.43.0