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 D8715C77B7A for ; Fri, 2 Jun 2023 08:38:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234518AbjFBIia (ORCPT ); Fri, 2 Jun 2023 04:38:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234421AbjFBIi3 (ORCPT ); Fri, 2 Jun 2023 04:38:29 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6014718C for ; Fri, 2 Jun 2023 01:38:27 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-9745c5fed21so107673366b.3 for ; Fri, 02 Jun 2023 01:38:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685695106; x=1688287106; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=pPYsqCw+S4frzdamGly3+8lmKwz0DvRF1BFqk4pDJOk=; b=OAdnQ1kBlBpFTnXu6dS3B59LrW5AVp8ZcAJsAfNCUqiphvo3vuLfQ2jQojKHK8uIu+ mkYHn25y1tDmdVsZEYIACwOPC1mChfuvNucUnrQPPJYoWH90zfogqm1WlPjHFhLiHvDn zUejvooWWmDBxSVkq1+jelu+5yBDbIxrA7qptcGtSrCXHkPoMcGKltkB6InEmFYlqKip qVkl3R/iTD3QMkpIskH6E5HD5IpLSLYkBnXw33jvZnnPkTX21eTThiXpXwAOcZA4tuSD yHV3IG9eobPhR60HzBNIBtqxsECxUBM6oLTe+nAgdWiMxlGTuKuud6NJA5A2fJHNyieV MBhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685695106; x=1688287106; h=content-transfer-encoding:in-reply-to: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=pPYsqCw+S4frzdamGly3+8lmKwz0DvRF1BFqk4pDJOk=; b=A/zNxohuhPlJc9w2bfsv2eYRIodfpf43y7hgcrRbnTDjSacnl6LD/RjV6mD+OtWYbM +Mpk1pehkIQHEYD3laz5mnts6EWsTeD+KcG4Dn0IXRX4NM28yCLnEWougI7fTgkX7IXv Nsu2Q1vaZdKBFYtMWbNZqYZ2f1xZ93Hn9blowWnyLTwIBB+LzcVNNNBWcGcpdqDELLqu 4e22Ac+os9eOfOQWlOFX2QEeGskP14l5suKEuXTQZaUwn6SRfxfr09JUD5R74MNeldeE R5yfB4wjqR5QFKWHHGfij9EKIVL+iDjfrCZwvPFLsgXbxKmnBaTK/b27t1T0eO2C58Qj yEIQ== X-Gm-Message-State: AC+VfDwdK4CrrmVO1evBxtnxJXT5eBfpitKTNeA29L3oRG2NuXI7xP+8 Pa/Z4jBpQleL/l1EJZoi6+Vyig== X-Google-Smtp-Source: ACHHUZ7U7Nk9Xfw9ScoLkNnQ7voAB8/uUOjSN+gFT7/29x62vxLDRSi2u8Ebdcr4cCP2ctPddFy3iw== X-Received: by 2002:a17:907:3f14:b0:96a:5e38:ba49 with SMTP id hq20-20020a1709073f1400b0096a5e38ba49mr12594130ejc.2.1685695105825; Fri, 02 Jun 2023 01:38:25 -0700 (PDT) Received: from [192.168.1.20] ([178.197.199.204]) by smtp.gmail.com with ESMTPSA id h19-20020a17090619d300b0096f641a4c01sm472053ejd.179.2023.06.02.01.38.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Jun 2023 01:38:25 -0700 (PDT) Message-ID: Date: Fri, 2 Jun 2023 10:38:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v2 2/3] dt-bindings: iio: adc: Add Allwinner D1/T113s/R329/T507 SoCs GPADC Content-Language: en-US To: Maksim Kiselev , linux-iio@vger.kernel.org Cc: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , 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 , Stephen Boyd , Arnd Bergmann , William Breathitt Gray , Hugo Villeneuve , Mike Looijmans , ChiYuan Huang , Ramona Bolboaca , Ibrahim Tilki , Caleb Connolly , AngeloGioacchino Del Regno , ChiaEn Wu , 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 References: <20230601223104.1243871-1-bigunclemax@gmail.com> <20230601223104.1243871-3-bigunclemax@gmail.com> From: Krzysztof Kozlowski In-Reply-To: <20230601223104.1243871-3-bigunclemax@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 02/06/2023 00:30, 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. Except that it wasn't tested... > > Signed-off-by: Maxim Kiselev > --- > .../iio/adc/allwinner,sun20i-d1-gpadc.yaml | 79 +++++++++++++++++++ > 1 file changed, 79 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..94f15bb48231 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml > @@ -0,0 +1,79 @@ > +# SPDX-License-Identifier: GPL-2.0 dual license Please run scripts/checkpatch.pl and fix reported warnings. Some warnings can be ignored, but the code here looks like it needs a fix. Feel free to get in touch if the warning is not clear. > +%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 > + > +properties: > + "#io-channel-cells": > + const: 1 > + > + clocks: > + maxItems: 1 > + > + compatible: > + enum: > + - allwinner,sun20i-d1-gpadc compatible is first property > + > + interrupts: > + maxItems: 1 > + > + reg: > + maxItems: 1 > + > + resets: > + maxItems: 1 > + > +required: > + - "#io-channel-cells" > + - clocks > + - compatible > + - interrupts > + - reg > + - resets required: block goes after all properties. > + > +patternProperties: > + "^channel@([0-15])$": > + $ref: adc.yaml > + type: object > + description: | Do not need '|' unless you need to preserve formatting. > + Represents the internal channels of the ADC. > + > + properties: > + reg: > + description: | Do not need '|' unless you need to preserve formatting. > + The channel number. > + Up to 16 channels, numbered from 0 to 15. Don't repeat constraints in free form text. > + items: > + minimum: 0 > + maximum: 15 > + > + required: > + - reg > + > + additionalProperties: false Hm? So you do not allow anything from adc.yaml related? Are you sure this is your intention? > + > +additionalProperties: false > + > +examples: > + - | > + gpadc: adc@2009000 { > + compatible = "allwinner,sun20i-d1-gpadc"; > + reg = <0x2009000 0x1000>; > + clocks = <&ccu 80>; > + resets = <&ccu 32>; > + interrupts = <0 57 4>; Use proper defines > + #io-channel-cells = <1>; > + > + channel@0 { > + reg = <0>; Broken indentation. Use 4 spaces for example indentation. > + }; > + > + channel@1 { > + reg = <1>; > + }; > + }; > + > +... Best regards, Krzysztof