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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D89FDC43461 for ; Wed, 16 Sep 2020 15:47:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6CE65223E8 for ; Wed, 16 Sep 2020 15:47:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=jms.id.au header.i=@jms.id.au header.b="APvHQtV4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726316AbgIPPqr (ORCPT ); Wed, 16 Sep 2020 11:46:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726149AbgIPP3w (ORCPT ); Wed, 16 Sep 2020 11:29:52 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5994DC0A8885; Wed, 16 Sep 2020 05:39:50 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id lo4so10107624ejb.8; Wed, 16 Sep 2020 05:39:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I1cFEJyq7aWtTpGijIftYdHoOlrdR3OREnEePj95ylM=; b=APvHQtV42oDcvvxsC50ckX33r8XotGFDE9NjqI1448hod2JhlaAF/GMJVFpkCDoVb2 kVBhUfrVrc5WemMXInUtCZlgBoYobDUOAidkcxPS1crEHg4XpuSDlPdUaB1oE6sdYE8d IT7hUouxai0VXiuESQXq840dfgoW6cFfCDQ3o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I1cFEJyq7aWtTpGijIftYdHoOlrdR3OREnEePj95ylM=; b=TDMMZU1R+IQm2DzRbBSBrj3KA2HsDYCJzkzWgBqRuzhirCkyC3OHQ+9SNggiNhEAw8 eC0aZnfRt4QUlUX6NUDtCEXLszojb8DVlb0IkhdfRYQNZQBf1Tu9Rr0joDX2JDcxJuAF D4MReyFI2movFIVL9Q6jFNWmT9J0GifZLXyqVsaZuTsyeDFwSewUJDG/vHiI/fsr/dND Jm3n8RpIdPLVqJGKvdm1lJaQTFCohgxWCVjokSz6/SueYcovf/03KATcpxIv6vAq6yhf mNUxl05qB60wPZwrt6g4PL64G/RNpKdLnT5y07wvM71h6L+6tNb7P9RIqv+6hCVzcGdV 6uvA== X-Gm-Message-State: AOAM532SlY7No2O5yfCRom/0VUWB4VZrtf6VYkX9dw/Oz5rhmLlAN++v tV8giqtEcxTmLALjoav/Mklnc8RrX0qBBQIiMYM= X-Google-Smtp-Source: ABdhPJyJUdR1phUt4Z2aWUTlQ/9LFQhNTVdlh+azbLJjNikSb18UjVpmtluJLDsc3NTZBbHlpPnUIwhbkhOl5eJjepI= X-Received: by 2002:a17:906:8401:: with SMTP id n1mr24459464ejx.215.1600259988623; Wed, 16 Sep 2020 05:39:48 -0700 (PDT) MIME-Version: 1.0 References: <20200909175946.395313-1-jic23@kernel.org> <20200909175946.395313-5-jic23@kernel.org> <20200916113625.0000641e@Huawei.com> In-Reply-To: <20200916113625.0000641e@Huawei.com> From: Joel Stanley Date: Wed, 16 Sep 2020 12:39:36 +0000 Message-ID: Subject: Re: [PATCH v2 04/20] dt-bindings:iio:adc: aspeed,ast2400 yaml conversion To: Jonathan Cameron Cc: Jonathan Cameron , linux-iio@vger.kernel.org, Rob Herring , devicetree , Rick Altherr , Andrew Jeffery Content-Type: text/plain; charset="UTF-8" Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Wed, 16 Sep 2020 at 10:38, Jonathan Cameron wrote: > > On Thu, 10 Sep 2020 02:32:19 +0000 > Joel Stanley wrote: > > > On Wed, 9 Sep 2020 at 18:02, Jonathan Cameron wrote: > > > > > > From: Jonathan Cameron > > > > > > Simple txt to yaml conversion. Part of a general move to convert > > > all the IIO bindings over to yaml. > > > > > > Signed-off-by: Jonathan Cameron > > > Cc: Rick Altherr > > > Cc: Joel Stanley > > > Cc: Andrew Jeffery > > > > Acked-by: Joel Stanley > > > > > > > --- > > > .../bindings/iio/adc/aspeed,ast2400-adc.yaml | 54 +++++++++++++++++++ > > > .../bindings/iio/adc/aspeed_adc.txt | 22 -------- > > > 2 files changed, 54 insertions(+), 22 deletions(-) > > > > > > diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml > > > new file mode 100644 > > > index 000000000000..09018487d690 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml > > > > This naming doesn't make sense, as the bindings are for the ast2500 > > too (and they also apply for the ast2600). > > Convention is to name after a supported device and not use > wild cards or generic names because the chances of it going > wrong in future is far too high. Will every aspeed adc look the same? > Seems impossible to predict so best we can do safely is to pick a > part number. It already supports three different generations of SoC, which I was bringing to your attention. Therefore having the name '2400' is already incorrect. > > There are enormous numbers of examples of this in dt bindings and > for that matter driver naming. > > Thanks, > > Jonathan > > > > > > > @@ -0,0 +1,54 @@ > > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/iio/adc/aspeed,ast2400-adc.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: ADC that forms part of an ASPEED server management processor. > > > + > > > +maintainers: > > > + - Rick Altherr > > > + > > > +description: > > > + This device is a 10-bit converter for 16 voltage channels. All inputs are > > > + single ended. > > > + > > > +properties: > > > + compatible: > > > + enum: > > > + - aspeed,ast2400-adc > > > + - aspeed,ast2500-adc > > > + > > > + reg: > > > + maxItems: 1 > > > + > > > + clocks: > > > + description: > > > + Input clock used to derive the sample clock. Expected to be the > > > + SoC's APB clock. > > > + > > > + resets: true > > > + > > > + "#io-channel-cells": > > > + const: 1 > > > + > > > +required: > > > + - compatible > > > + - reg > > > + - clocks > > > + - resets > > > + - "#io-channel-cells" > > > + > > > +additionalProperties: false > > > + > > > +examples: > > > + - | > > > + #include > > > + adc@1e6e9000 { > > > + compatible = "aspeed,ast2400-adc"; > > > + reg = <0x1e6e9000 0xb0>; > > > + clocks = <&syscon ASPEED_CLK_APB>; > > > + resets = <&syscon ASPEED_RESET_ADC>; > > > + #io-channel-cells = <1>; > > > + }; > > > +... > > > diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt b/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt > > > deleted file mode 100644 > > > index 034fc2ba100e..000000000000 > > > --- a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt > > > +++ /dev/null > > > @@ -1,22 +0,0 @@ > > > -Aspeed ADC > > > - > > > -This device is a 10-bit converter for 16 voltage channels. All inputs are > > > -single ended. > > > - > > > -Required properties: > > > -- compatible: Should be "aspeed,ast2400-adc" or "aspeed,ast2500-adc" > > > -- reg: memory window mapping address and length > > > -- clocks: Input clock used to derive the sample clock. Expected to be the > > > - SoC's APB clock. > > > -- resets: Reset controller phandle > > > -- #io-channel-cells: Must be set to <1> to indicate channels are selected > > > - by index. > > > - > > > -Example: > > > - adc@1e6e9000 { > > > - compatible = "aspeed,ast2400-adc"; > > > - reg = <0x1e6e9000 0xb0>; > > > - clocks = <&syscon ASPEED_CLK_APB>; > > > - resets = <&syscon ASPEED_RESET_ADC>; > > > - #io-channel-cells = <1>; > > > - }; > > > -- > > > 2.28.0 > > > > >