Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp674340lqp; Sat, 13 Apr 2024 14:19:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX8ohU6C4OoCxa0reP3IwDNztLmADsQ1dbZftpnevVYmbyvarmR6wy23+BA+Zs+xDyKCtDUal0pWQevy85YrC9p8TzH0L1otnUz5PJvqw== X-Google-Smtp-Source: AGHT+IGG+Q/HJxer4UH33LNo5fNVm7j5isg29iu6+RlGV3JmjPkXX2dUIDWbZeAFnyI1KkgEc89s X-Received: by 2002:a17:906:1589:b0:a51:b1b1:b772 with SMTP id k9-20020a170906158900b00a51b1b1b772mr3337788ejd.65.1713043165220; Sat, 13 Apr 2024 14:19:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713043165; cv=pass; d=google.com; s=arc-20160816; b=mwYrmVOXiX4K52X3DKbq3LJzHpoCV+WZnjGxZ0VJO+RjcpWLM13zdXM0/b0vL7QRF7 5qiDt3r5yChhUXbRGulciEEfCj9ULueE3Ihmij2cRsB7FJlCmkoUVxdQC+WZ7HZKJ4Tj 80gcr1ZlOSfZ5iqJGkK2BC4bmKtMuEsvfF+vJpjHcRP1JJJFiDJndRtz6m8oFnHsWZeQ 6Tl5Wvf0cW19Jzy5CucCxGZ5V8RGc+B3/CQgZ41xIbjdgYhXs+JQrDCcLJFezXKHQOF+ NfVwrZqZmzlKhnaSRD07o6UQdowxSi+Iy/WKZhleN9IqjxKsIbwIESNTbk+glP1P/Blg pl+g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=c/t4RoIebmHtQnR1i/xtxOlbaIAoGHKLclvovPcq0xw=; fh=lrIrnEgXRnILHg4wuyebeM0xt/l2vhsTL/fRhxVOg28=; b=g3i5CxOsQESVHFgX7OtPzPHfEHduwDdmEHdzVor8lk9HV018hQZEfBrCAsfaI2rIR3 W0toZYWrvZTiL5FZFpYeci1cjsbp13kz+achMNjJyQQ9YxNO5N7mxJl7M0kiwHdjEyZz p6QjRJMdgcfRnKS1iahdAN7HNURXimDWZBOmmK/trY5VW1aYFc4ijux6UupaUAqn0Crh /MMBhUYN2MWqF2pn1nk3s8ks0LAkyN5+LDbuyZL7ZIksA+KlizKIT/lHGkgU12AwFuCm R4Z3z/+3hjcHZ3SCIdatLDSzJ0bjrppF7sYTFhBTEXsomlvkhvGh1PbPyDahBv2WlWl/ PxBQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="cerVMa/5"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-143880-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143880-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id f11-20020a17090624cb00b00a524339d040si1223725ejb.159.2024.04.13.14.19.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 14:19:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143880-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="cerVMa/5"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-143880-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143880-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id C44BC1F21632 for ; Sat, 13 Apr 2024 21:19:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D65B254747; Sat, 13 Apr 2024 21:19:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="cerVMa/5" Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BBD0B1758B for ; Sat, 13 Apr 2024 21:19:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713043152; cv=none; b=Ln3A/VjiC/QlA6R6vpNCTtyFHlPaP5VEqodDyasCl7P4owd0T+PxezUFaPce1uCFOTUVKtN47v1RNkMSkMx0sLT951/FNBiVNJIqVpONIYwvA2s7+TLiM7MZlMExJUP2cGc4HtJJcADZ9JGDqomUERUueexe0mFQFF2zqvfH8gk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713043152; c=relaxed/simple; bh=f5WpgDyI5RH4w8+qTrxQQLmHeovh7aUIMRBXq45KDFQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=THeyQFVxFE9A4cpw1KEj/z/ABRm2xlsld1TvaUXP5K0irfUC+jJPlVyAij6pyQu8FHM5Nd9Fy7MrVbkTqKkMC1ri7IcUbRB7spxjIbM/F5BlXJnePlqdyD7EQLZCbRQqHWhkCdpmL54xNwdI9Q7Cgaj34mA+JQqotacvFbdwZqs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=cerVMa/5; arc=none smtp.client-ip=209.85.208.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2d895138d0eso16286661fa.1 for ; Sat, 13 Apr 2024 14:19:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713043149; x=1713647949; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=c/t4RoIebmHtQnR1i/xtxOlbaIAoGHKLclvovPcq0xw=; b=cerVMa/5hzIU+1CskjIT/YEU4S02Ul9/CPomQQEUbSgsVcGmLX9Gj4ZpmRoXszhSB5 NaCJO5qEpmXKXePkPcKVM/NVkadNXgRSfWnLcjbh8YnVSLGIGYWWg/TddB0724uD17JM vz+w8g5X+fZF+h7dTWFtk0Gutu/BkXmadZXb+x6lBKJxOZtxyHxuQG5mRlsm6FX9bLy1 q4qDIBB/iKv6pfV6A1mDaeHrY+8qOPH+OodYLOppBF6AQizSohW1OMSRyTM/x1bJvDwQ yBObj6QJqt+xq+cCiJ16kj11mkJB0Bqn2uNjMCYVBMFtMFdXahAlDbm75XhfJv7CK6/B 8hVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713043149; x=1713647949; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=c/t4RoIebmHtQnR1i/xtxOlbaIAoGHKLclvovPcq0xw=; b=EEb31L/7OOMAhKaKI8pheI0q9LKfDIdQWSaHUouncrXcR55AuZ3E1so89AEZyeFYvd 6NYc6PcPLMyhZnLqesKe6WTh9ZWl5+bCJJUXZlXsH9pcX6W5a8SWI7T3IgolaofRYfhg SOXDnSZLvICJ2/Cv/nyX1Ay0XxMsaf6uDbfnCeQWqabUlrdhdoQcsivRIkJZYYyxbCDs /Xi7RrVB1DNmvr+PMf+AEkIWQ9reyrEOeDC05uQehd4YM50lWuXs6zUCvf2zR3lUOqXn HdkcDrotBx13khK9HfoAH3byyT90aZdVb1tDPAuog5g2qwtkGnBsbgx6r4Ul1pCrO7+e fFJg== X-Forwarded-Encrypted: i=1; AJvYcCVxVChRmSk8BUILmwlUAK7fiB0skQFu8T+FSidh9DD4P2hzVRbzfB9gQl5fFDnOd6ShGlKWtCGyydIVvxSYfu3lt/OTbKh7NKFqUm1Y X-Gm-Message-State: AOJu0YzQR11+m4yA3OIpREJYz9cFWq7mNr1Ytk0OI9c/oJR7USZ7mBju 4Cqb6SmXopQwKL0ues16rrLFPTc6P1EQS+OBAezgwGTZt+6ota6KvpA9LSnkncw= X-Received: by 2002:a2e:9cc2:0:b0:2d9:fde1:dcf1 with SMTP id g2-20020a2e9cc2000000b002d9fde1dcf1mr3401347ljj.41.1713043148768; Sat, 13 Apr 2024 14:19:08 -0700 (PDT) Received: from [192.168.1.20] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id q5-20020aa7d445000000b0056b7ed75a46sm2942843edr.27.2024.04.13.14.19.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 13 Apr 2024 14:19:08 -0700 (PDT) Message-ID: <2ad06ea8-220f-4d09-bbe7-c4dd12d0d8bd@linaro.org> Date: Sat, 13 Apr 2024 23:19:05 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 4/5] dt-bindings: iio: adc: ad7192: Add AD7194 support To: Alisa-Dariana Roman , michael.hennerich@analog.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: alexandru.tachici@analog.com, lars@metafoo.de, jic23@kernel.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, andy@kernel.org, nuno.sa@analog.com, marcelo.schmitt@analog.com, bigunclemax@gmail.com, dlechner@baylibre.com, okan.sahin@analog.com, fr0st61te@gmail.com, alisa.roman@analog.com, marcus.folkesson@gmail.com, schnelle@linux.ibm.com, liambeguin@gmail.com References: <20240413151152.165682-1-alisa.roman@analog.com> <20240413151152.165682-5-alisa.roman@analog.com> Content-Language: en-US From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQ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2LPmptPE9Rb9yCTAbSUlzgjiyyjuXhcwM qf3lzsm02y7Ooq+ERVKiJzlvLd9tSe4jRx6Z6LMXhB21fa5DGs/tHAcUF35hSJrvMJzPT/+u /oVmYDFZkbLlqs2XpWaVCo2jv8+iHxZZ9FL7F6AHFzqEFdqGnJQqmEApiRqH6b4jRBOgJ+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <20240413151152.165682-5-alisa.roman@analog.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 13/04/2024 17:11, Alisa-Dariana Roman wrote: > Unlike the other AD719Xs, AD7194 has configurable differential > channels. The user can dynamically configure them in the devicetree. > > Also add an example for AD7194 devicetree. > > Signed-off-by: Alisa-Dariana Roman > --- > .../bindings/iio/adc/adi,ad7192.yaml | 74 +++++++++++++++++++ > 1 file changed, 74 insertions(+) > > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml > index ba506af3b73e..855f0a2d7d75 100644 > --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml > @@ -21,8 +21,15 @@ properties: > - adi,ad7190 > - adi,ad7192 > - adi,ad7193 > + - adi,ad7194 > - adi,ad7195 > > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 > + > reg: > maxItems: 1 > > @@ -104,8 +111,43 @@ required: > - spi-cpol > - spi-cpha > > +patternProperties: This goes after properties:, so before required: block. > + "^channel@[0-9]+$": Why restricting the pattern? If you have 256 channels, how are you going to encode it? > + type: object > + $ref: adc.yaml > + unevaluatedProperties: false > + > + properties: > + reg: > + description: The channel index. > + minimum: 1 > + maximum: 256 > + > + diff-channels: > + description: | > + Both inputs can be connected to pins AIN1 to AIN16 by choosing the > + appropriate value from 1 to 16. > + items: > + minimum: 1 > + maximum: 16 > + > + required: > + - reg > + - diff-channels > + > allOf: > - $ref: /schemas/spi/spi-peripheral-props.yaml# > + - if: > + properties: > + compatible: > + enum: > + - adi,ad7190 > + - adi,ad7192 > + - adi,ad7193 > + - adi,ad7195 > + then: > + patternProperties: > + "^channel@[0-9]+$": false > > unevaluatedProperties: false > > @@ -136,3 +178,35 @@ examples: > adi,burnout-currents-enable; > }; > }; > + - | > + spi { > + #address-cells = <1>; > + #size-cells = <0>; > + > + adc@0 { > + #address-cells = <1>; > + #size-cells = <0>; > + compatible = "adi,ad7194"; > + reg = <0>; compatible is always the first property. reg is second. Best regards, Krzysztof