From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 038C6C7EE2F for ; Mon, 12 Jun 2023 14:59:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231664AbjFLO7y (ORCPT ); Mon, 12 Jun 2023 10:59:54 -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-Google-Smtp-Source: ACHHUZ6KNQPN7jVXTXBkLnNdRrMFykMu72Ussv53FDlxV/WfKOF6aT/n3DU/YcGQQfoex66gY6aZAQ== 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> Precedence: bulk List-ID: X-Mailing-List: devicetree@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 >