Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5662117rwd; Mon, 12 Jun 2023 08:05:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7wy/IS90TeoXS/4iJK1Qu+5KU6n6i+un0tI/FxxJTyxp7hFYukCkQeptn/EFkonNoNG++F X-Received: by 2002:a05:6a00:1804:b0:662:5146:c761 with SMTP id y4-20020a056a00180400b006625146c761mr14392549pfa.17.1686582342752; Mon, 12 Jun 2023 08:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686582342; cv=none; d=google.com; s=arc-20160816; b=JtRUE/AVnwOwzHhs9wqq1FrQ6xTOcE62L6blYS3X342pePOOcIsG0B1AKEIoCFDLL9 14pCAiclGP5VgzqOylou1nSKPoF35YdvKGPh/9pUS5a2hsLNQXOSdb1JLSWZ5tw4bAHy sbiRq2OQbljdSnyJNLhFcmYr0HPmXG01Cz6mCOnvf312jSqdRvez2icpl540Y4/hT6ol VMykm9XooJD0lwIhv/8UfHaT++9rcC4haYSnftUVW6Q7CrYXB2UBec3T/zqG+HyXXf13 MPgdh7t2kMQFIoYXpb3yOG7qurWcHBaw9nrSXEtmcryTh3gLobyztrDhdm/rRgUuaz1H Cx7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=07dB69ZZGyTHxP/KSd9bxJ1LwTeCS3J4mCqoCOU8mcc=; b=GKZzHmDyMkE60VGW419x9L32oMsGlad14WKuJzagevPIpeWat62XcmjumRqUnUM1Tz HuCHZDgkuDbDGtZmuGVN7yM/Gzb9AO1IaxDbDiAk6R7yUrBmQu2kRZSPD2Kqwf6MExtj yyLR0a5ETOuvCFSFVbIDXG3Nf1EKLy/NRHJ7u2gUFYYf4BWxSN60aWECo9+zYtZv2KRv EQU/DQTi9nWKOXlvMZqOAtmmAzFppT0+xnQYhRvlE84qVvSHFY4rlnS8SYxZ26Blrlmn D4fqeGLLoXFxPhDjERRvnFwjK7zH35TM59Do5cIAZ/fcNRgvj6F6AENkmPb5X35R19Jc /9Iw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t22-20020a639556000000b0053f2516faccsi7326257pgn.334.2023.06.12.08.05.30; Mon, 12 Jun 2023 08:05:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238375AbjFLO7z (ORCPT + 99 others); Mon, 12 Jun 2023 10:59:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234603AbjFLO7x (ORCPT ); Mon, 12 Jun 2023 10:59:53 -0400 Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D199CC; Mon, 12 Jun 2023 07:59:53 -0700 (PDT) Received: by mail-io1-f49.google.com with SMTP id ca18e2360f4ac-777b922466dso285238339f.3; Mon, 12 Jun 2023 07:59:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686581992; x=1689173992; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=07dB69ZZGyTHxP/KSd9bxJ1LwTeCS3J4mCqoCOU8mcc=; b=glmqxiiHMC9msK9rOtgQWSisDRVu71qCdf+3uFM52okJ42ussb0WXS4jP3j6IbVlZU igmWk2P/yDu1aKJkYabHTOeB+PGVXrabIs0q5phGeMsO7Coymi0W2pM23mf0naS0eV4e hDZsyrrAWroUutYQ6AZlyzFkdRHZtg3e2TXniBWcGBK4tFJipogpzhqDqmg4bxVMBzkJ kpLNEgDRRgW6tzZTiZ+mPJTuK8uMAusn4GBDU+l8+wvRCxB2nyaZon4HaEaBsf4sud54 rIYd8PQrkT5XK4si/i7k4U46rDLn3PEpNpK+1+cSNpi7p/VtVQq45zHKhzzdkMwlYlQd bT5Q== X-Gm-Message-State: AC+VfDy3D7NMGcqAwFHdhE+AZEzxSPN4EBy2Rer2XyIeevMMxP5ya1vJ GUSg4PWJczs7liw5j/u5Mw== X-Received: by 2002:a6b:a05:0:b0:777:b531:eb56 with SMTP id z5-20020a6b0a05000000b00777b531eb56mr8460626ioi.7.1686581992169; Mon, 12 Jun 2023 07:59:52 -0700 (PDT) Received: from robh_at_kernel.org ([64.188.179.250]) by smtp.gmail.com with ESMTPSA id a24-20020a6b6618000000b00752f62cd3bdsm3260506ioc.12.2023.06.12.07.59.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 07:59:51 -0700 (PDT) Received: (nullmailer pid 39495 invoked by uid 1000); Mon, 12 Jun 2023 14:59:47 -0000 Date: Mon, 12 Jun 2023 08:59:47 -0600 From: Rob Herring To: Maksim Kiselev Cc: linux-iio@vger.kernel.org, Jonathan Cameron , Lars-Peter Clausen , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Philipp Zabel , Cristian Ciocaltea , Heiko Stuebner , Andy Shevchenko , Cosmin Tanislav , Hugo Villeneuve , Ulf Hansson , Arnd Bergmann , ChiaEn Wu , Ibrahim Tilki , ChiYuan Huang , Ramona Bolboaca , William Breathitt Gray , =?UTF-8?Q?Leonard_G=C3=B6hrs?= , Caleb Connolly , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v5 2/3] dt-bindings: iio: adc: Add Allwinner D1/T113s/R329/T507 SoCs GPADC Message-ID: <20230612145947.GA37083-robh@kernel.org> References: <20230610202005.1118049-1-bigunclemax@gmail.com> <20230610202005.1118049-3-bigunclemax@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230610202005.1118049-3-bigunclemax@gmail.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Sat, Jun 10, 2023 at 11:19:49PM +0300, Maksim Kiselev wrote: > From: Maxim Kiselev > > Allwinner's D1/T113s/R329/T507 SoCs have a new general purpose ADC. > This ADC is the same for all of this SoCs. The only difference is > the number of available channels. > > Signed-off-by: Maxim Kiselev > --- > .../iio/adc/allwinner,sun20i-d1-gpadc.yaml | 91 +++++++++++++++++++ > 1 file changed, 91 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml > > diff --git a/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml b/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml > new file mode 100644 > index 000000000000..43256ad2b7ed > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml > @@ -0,0 +1,91 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/adc/allwinner,sun20i-d1-gpadc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Allwinner D1 General Purpose ADC > + > +maintainers: > + - Maksim Kiselev > + > +properties: > + compatible: > + enum: > + - allwinner,sun20i-d1-gpadc > + > + "#io-channel-cells": > + const: 1 > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 > + > + clocks: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + reg: > + maxItems: 1 > + > + resets: > + maxItems: 1 > + > +patternProperties: > + "^channel@([0-15])$": 0-15? That's not how regex's work. Unit-addresses are in hex as well. "^channel@[0-9a-f]$" > + $ref: adc.yaml > + type: object > + description: > + Represents the internal channels of the ADC. > + > + properties: > + reg: > + items: > + minimum: 0 > + maximum: 15 > + > + required: > + - reg > + > + unevaluatedProperties: false > + > +required: > + - "#io-channel-cells" > + - clocks > + - compatible > + - interrupts > + - reg > + - resets > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + #include > + > + gpadc: adc@2009000 { > + compatible = "allwinner,sun20i-d1-gpadc"; > + reg = <0x2009000 0x1000>; > + clocks = <&ccu CLK_BUS_GPADC>; > + resets = <&ccu RST_BUS_GPADC>; > + interrupts = <73 IRQ_TYPE_LEVEL_HIGH>; > + #io-channel-cells = <1>; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + channel@0 { > + reg = <0>; > + }; > + > + channel@1 { > + reg = <1>; > + }; > + }; > +... > -- > 2.39.2 >