Received: by 2002:ab2:2997:0:b0:1ec:cbc4:63fb with SMTP id n23csp487528lqb; Thu, 29 Feb 2024 06:50:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW74faGdhugVvODSwlwFiu5lk8+m/SZ3nBCbGn/0ZjCZ3jdq3htjfO3pI2ucTqBWrW8yr0ISu7RNxZ6L3cS32qcgQwWiSXxnEYYsruIsw== X-Google-Smtp-Source: AGHT+IFMZavpXAhq3hGq+Qw1aqYP7rM+G4R/eFctw0DWEP9055ghZ2W9Rl6cpfP6QFKLW1Q0834l X-Received: by 2002:a9d:3e45:0:b0:6e2:ea96:c9d8 with SMTP id h5-20020a9d3e45000000b006e2ea96c9d8mr2170949otg.32.1709218233079; Thu, 29 Feb 2024 06:50:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709218233; cv=pass; d=google.com; s=arc-20160816; b=j4DgNV5bwyyDw3mfIBZn28D85W8cxFU2j1mh51dNljhJRt01rhuyvz56T5AsRovyCw W5OcZi6iBmfPNhQZCR8rkU/ub9ejcTSiz1By8EjD4Ibnyyi4xoQ+bQ7wDmCY7MBAzNUh 6kVPg9DZLSpkNJvFjU0cske6GArouhB0h+fD7MVsTJIOXoC2xHHv3yIDhD0MGZAEct21 jOyciHDawH62+/hBOdfHwudZd0nlb3WrSPjb7nG5PtNn2/hByLHTlDXmfcG+RBKQ9L5S bh5GfullvFxIVZVjFzK83dDUaq/wB3Ck8w9QSS2Qac7L6KnDdiNi3bQJWTG0ylSBp+o+ V+YA== 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:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=AJ4Qksumo/xvPjCbp2pF2caHliNc3PEV2t+qzAnNalM=; fh=yrNEYQOKlFU/o0qs/g8rgRlEiYgCQj9V9cBLxAKsGkE=; b=pQVgClXonyf8G7Ia4TCuC34WFr5iy8kZUhuzqxuTM6+KWMGwNbZchNQX+hMxcL0//c ug5Vf/aBxa4Mfs15AKaDS6leo4mnBZwnTji2yEfvMlFjxwmitihTPTaoQfCf5+quyuDO EHU7rYJ5zuhK+5AY/E+v2+1+0hZNCsfISoTLMd8mZUrbpS0oLqjuIMqqtCcneYToJmMw ZFcjp01FCHY+c+smvTZb+rA7oPrWaGduB1l+SYzrTqLwNMsb4LQ875VdZf4sjgpZWS6s ZIlqvaJc+svMQRuxWOD1QbfhYynwZBijp6X5EWOLfyBCmp68OYqnCprxBbuMkFAxwn4+ P/mg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KL4iNqGu; 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-86870-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86870-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id bk2-20020a05620a1a0200b00787b809a427si1624684qkb.483.2024.02.29.06.50.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 06:50:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86870-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; dkim=pass header.i=@linaro.org header.s=google header.b=KL4iNqGu; 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-86870-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86870-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id AEDEB1C20A8E for ; Thu, 29 Feb 2024 14:50:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8497C1384A8; Thu, 29 Feb 2024 14:49:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="KL4iNqGu" Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (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 9B5D0137754 for ; Thu, 29 Feb 2024 14:49:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709218165; cv=none; b=YYG8/Wgmy9xaWBERd/rRTjmRPKNUI+pXRrQ9wGTBPY5WdC87eQZ4vP7WhUL8M3O6BBHppqolvMvfJmKiHP4ZWmi5ujpApmxjpDESbxmNSZgyG4ARrhAikiiGFqC0/KzO4zt8kZ453tApqW18Q5MS5/A7db4n2C3SlOk9wLih0ZY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709218165; c=relaxed/simple; bh=GViMnL50GchptpANlTzi5YnZjVuIK8J7/2kEV7Nci5s=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=bSuHt60rW80PwW6v/C7QjFVMD+GFVCdsvMyF80kLnLBCrdKhu/8ywqJKNzNlTUKit1atnX5a1X+5zMSek7L95AyuElv8D+hTeaKNZl04iFNvDoFq230kOu3plLgyB02752Q01TdTpFf5We1pXetkdeUmRkE6SLBTdrsYor7jJ90= 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=KL4iNqGu; arc=none smtp.client-ip=209.85.218.42 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-ej1-f42.google.com with SMTP id a640c23a62f3a-a28a6cef709so159495366b.1 for ; Thu, 29 Feb 2024 06:49:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709218162; x=1709822962; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=AJ4Qksumo/xvPjCbp2pF2caHliNc3PEV2t+qzAnNalM=; b=KL4iNqGuhPLd5on3l0OxC6XCzZCmjTDGtKb3MkegT4OxwUtP7jae51Zdm5RQzaJKMX TV8GJFfYGZmvd8kKcx432pEdXUFhuKusorbKZ2yIIMnO3X4Kj1jZOEOj/sc7QXjsRUsV QY+edMAyUt8AkPFe+Yg5ECNFOPyRnXem732AbDQ8waOt9zpuJhLvNc2DOQkKZF7VQ1w2 P7ca3Cp83eepa17puHSsMgnZxIAKIiMEhXHwuIqeQFaRBQmusPHpF3UZCEsKyvCOXCMa AuKU8GB3Wjxuy4x/KIoyAYL75Qe7ibzDqLLb0IsvH+4hJI51WNIQYxDA8iDAwzq39mCK HZ6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709218162; x=1709822962; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AJ4Qksumo/xvPjCbp2pF2caHliNc3PEV2t+qzAnNalM=; b=PUeN8c+FhKT5+Jt7GwFY8NTbVd0T85ED1w3r6Fb5LJU9OzHXlP6qAw8wxx2VzvSK+H DGR8AZsTIYHjYYcWoeMyXSkUbgfuNIB8N5++Mwoxr/3N9CsRYYdNqL85OJyToZu0GT18 97ln6Uj1iYIXhjbh5F7C9VVsEQ3t537eAH7/reaH/VCH5w0B6xlgMTWKbR5fKFYOWjsF Fe2vi5/i7qESC2AE4VFduFi1SdCEL6Ij7fKlFH5uRltzjEwKqfiebM7dGi2xqzLmsKp7 o2wW7nzZQ7H5XPj4EBq8vpHB4URXEpbxGwFVZO7BOMBdifMgCzM3yucyslV+MezKF46L ckGA== X-Forwarded-Encrypted: i=1; AJvYcCW29az9PfKRw3l1WCj7jEjBAloKyZNgho5w090DADbp9JiUw1C4J7siRGTGIxcrPk00H3lT0r5+MQnbymUr2quuD/Zhn4vy68HNLMhZ X-Gm-Message-State: AOJu0YwL7x/JE3amyC/dAVzwBjlM7TnQqGlslMGICqcEDzR3PqbkevKR Tz2S4lb3PmdM8DLqrEMH2pvBmkuYfirYUzK2DYUM5fzL5He2xndEFGGQRNFMrCs= X-Received: by 2002:a17:906:4914:b0:a43:af0b:ec31 with SMTP id b20-20020a170906491400b00a43af0bec31mr1771533ejq.53.1709218161966; Thu, 29 Feb 2024 06:49:21 -0800 (PST) Received: from [192.168.1.20] ([178.197.222.97]) by smtp.gmail.com with ESMTPSA id jg29-20020a170907971d00b00a4412406741sm749113ejc.131.2024.02.29.06.49.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Feb 2024 06:49:21 -0800 (PST) Message-ID: <9f3e461a-0b79-470f-b599-bba45cda006a@linaro.org> Date: Thu, 29 Feb 2024 15:49:20 +0100 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 v2 1/2] dt-bindings: adc: ad7173: add support for additional models Content-Language: en-US To: Dumitru Ceclan Cc: Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , David Lechner , Ceclan Dumitru , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240228135532.30761-1-mitrutzceclan@gmail.com> <20240228135532.30761-2-mitrutzceclan@gmail.com> 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+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1N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ViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <20240228135532.30761-2-mitrutzceclan@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 28/02/2024 14:54, Dumitru Ceclan wrote: > Add support for: AD7172-2, AD7175-8, AD7177-2. > AD7172-4 does not feature an internal reference, check for external > reference presence. > > Signed-off-by: Dumitru Ceclan > --- > .../bindings/iio/adc/adi,ad7173.yaml | 39 +++++++++++++++++-- > 1 file changed, 36 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml > index 36f16a325bc5..7b5bb839fc3e 100644 > --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml There is no such file in next-20240229. > @@ -21,17 +21,23 @@ description: | > > Datasheets for supported chips: > https://www.analog.com/media/en/technical-documentation/data-sheets/AD7172-2.pdf > + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7172-4.pdf > https://www.analog.com/media/en/technical-documentation/data-sheets/AD7173-8.pdf > https://www.analog.com/media/en/technical-documentation/data-sheets/AD7175-2.pdf > + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7175-8.pdf > https://www.analog.com/media/en/technical-documentation/data-sheets/AD7176-2.pdf > + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7177-2.pdf > > properties: > compatible: > enum: > - adi,ad7172-2 > + - adi,ad7172-4 > - adi,ad7173-8 > - adi,ad7175-2 > + - adi,ad7175-8 > - adi,ad7176-2 > + - adi,ad7177-2 > > reg: > maxItems: 1 > @@ -136,8 +142,10 @@ patternProperties: > refout-avss: REFOUT/AVSS (Internal reference) > avdd : AVDD /AVSS > > - External reference ref2 only available on ad7173-8. > - If not specified, internal reference used. > + External reference ref2 only available on ad7173-8 and ad7172-4. > + Internal reference refout-avss not available on ad7172-4. > + > + If not specified, internal reference used (if available). > $ref: /schemas/types.yaml#/definitions/string > enum: > - vref > @@ -157,12 +165,15 @@ required: > allOf: > - $ref: /schemas/spi/spi-peripheral-props.yaml# > > + # Only ad7172-4 and ad7173-8 support vref2 > - if: > properties: > compatible: > not: > contains: > - const: adi,ad7173-8 > + anyOf: That's enum... or you want to make something more complicated because I see there not:... > + - const: adi,ad7172-4 > + - const: adi,ad7173-8 > then: > properties: > vref2-supply: false > @@ -177,6 +188,28 @@ allOf: > reg: > maximum: 3 > > + # Model ad7172-4 does not support internal reference > + # mandatory to have an external reference > + - if: > + properties: > + compatible: > + contains: > + const: adi,ad7172-4 > + then: > + patternProperties: > + "^channel@[0-9a-f]$": > + properties: > + adi,reference-select: > + enum: > + - vref > + - vref2 > + - avdd > + required: > + - adi,reference-select Are you defining properties here? I cannot verify because this file does not exist in next. > + oneOf: > + - required: [vref2-supply] > + - required: [vref-supply] Best regards, Krzysztof