Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp1148985rdf; Wed, 22 Nov 2023 06:57:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFxu00NPazVAqopsv/P7XU0jxNoQHTXVSi9NETm/ASJeDzdVmMFODDH189CRlXUqHxKYfQe X-Received: by 2002:a17:903:22d1:b0:1cf:6453:b24c with SMTP id y17-20020a17090322d100b001cf6453b24cmr2572551plg.42.1700665046337; Wed, 22 Nov 2023 06:57:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700665046; cv=none; d=google.com; s=arc-20160816; b=naDNOagip0pCV2yHTlyqI6yGyVLULxk4oGo9CYhQZtck5dRb2eEDDYvbaYokfRSu/5 SRntS1UAzP5qZT8Mi3MQJg4jLgY2rBzHy044Z3YL86FqvfYAy3t8zC5LEdi0llfsapVf b3yVGZBi/iTuaYWMpuPVxJkLJ6MHur/+/jFBjuwLpAIRX5s+VEFPJFVKqAfSXue40o1r YxUCTKhZDKmWfBdvgQDQ0akgxUIoNXNUXypbDxx5A/aOry/3OaNJ60IHN0L1AQdPYZd5 /IOaODKHxReAd7rdd6DJHyQHupWdQC+itHsTGSSNKwLvzWGBz12WJkV+QEknkSbGfDZ6 /b4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=DohKjEGbANqOIwtlp0thtS5jfJs3ErxUnipdG2SdgrA=; fh=rOb0wMOoxfhtdbqqP9NHI1q2erHSoDppJ8Al5p5KCFc=; b=H6JSzGHB8BTokyASkBDpSHYHuMsFxzbWUmEkM5oyl1f1Wi1+P2GXiXKOkM4gh+Ex8T KrLnIFQEyPTVri22enwnNpuq5nMHvMr9cDTYoXt31WjMMNvMzP177Cd9hE5dIA5cwN+R xDYOgZ8i9e5IDacEKK3Zg6XwZWxF1hbux7LM91gzfJYnHtRBASRYpjqdU4VU1ikX+GH5 DJ5tvFXPfbNgIvNqSkbGdrB5ScEywPz7DRN/2oiX6lVK+xF5eQ3+qF1JAfMu5YptEVg1 02S+6qJn/IHi7FW+dBKoUUlZ2B30QSdCDqSFT9xhfpWfCtdE1/PA6ay/LWebohhkyq8t i02g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jMWFROHs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id n4-20020a170902f60400b001c383a64ebesi13576098plg.319.2023.11.22.06.57.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 06:57:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jMWFROHs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 1E41E809FED7; Wed, 22 Nov 2023 06:56:15 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234611AbjKVO4G (ORCPT + 99 others); Wed, 22 Nov 2023 09:56:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231683AbjKVO4F (ORCPT ); Wed, 22 Nov 2023 09:56:05 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 812C292 for ; Wed, 22 Nov 2023 06:56:01 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 284D4C433CB; Wed, 22 Nov 2023 14:56:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700664961; bh=KtNL8iqiwxX+GpchCheqctmEAkNmwKSHMEBfjYdIYfA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=jMWFROHsemWBLYudu+R0KFIYjkxN+OYS38HYbkxT6hliS5CGuPtvyqBwurcxMxfnQ /iN3YL36okDmIdjncXf6CWKc4rf8O5RV02aYb9qWyDrKmqvqm/vNIu3HkhuWeT/byG gMFBvzQQ6JD+1VBQrIuZOTTBeZZ/pdLn6QIYXb/xDRVedL3Nk2GeL9oQ/FJUpiPx4c NTAbUbdzD3N8IaaRzLSzjZMsx/fmb+z9cl6/NGCBsjj2C+2oWU0F1q6PRSkc4Xgm+C RTVI4Py6HBGOEj3GlcUX2Dd9p6BnVMRypZVEJ82an8lWtodpAFFeQ5Pw7rxk9TlwFk WARyK/6iZiACw== Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-507b9408c61so9468334e87.0; Wed, 22 Nov 2023 06:56:01 -0800 (PST) X-Gm-Message-State: AOJu0YyH9B40FgS5+H85uU+KG97DNj5AQ4NMED8XMuC7K5ru7Qd8p8fk LsJnqj+IX9KEe009PR5BVaC/0vVxxwBstP0neg== X-Received: by 2002:ac2:5e8d:0:b0:500:b63f:4db3 with SMTP id b13-20020ac25e8d000000b00500b63f4db3mr1826037lfq.35.1700664959349; Wed, 22 Nov 2023 06:55:59 -0800 (PST) MIME-Version: 1.0 References: <20231120084044.23838-1-krzysztof.kozlowski@linaro.org> <6b288a2e-d147-4bd3-b1d4-daf56295d939@gmail.com> <01f9ce3b-e6e5-4b05-bf7f-0b3a5f74910a@linaro.org> In-Reply-To: <01f9ce3b-e6e5-4b05-bf7f-0b3a5f74910a@linaro.org> From: Rob Herring Date: Wed, 22 Nov 2023 07:55:46 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] docs: dt-bindings: add DTS Coding Style document To: Krzysztof Kozlowski Cc: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Andrew Davis , Arnd Bergmann , Bjorn Andersson , Geert Uytterhoeven , Heiko Stuebner , Konrad Dybcio , Michal Simek , Neil Armstrong , Nishanth Menon , Olof Johansson , linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 22 Nov 2023 06:56:15 -0800 (PST) On Wed, Nov 22, 2023 at 1:05=E2=80=AFAM Krzysztof Kozlowski wrote: > > On 21/11/2023 14:50, Rafa=C5=82 Mi=C5=82ecki wrote: > >> +Order of Nodes > >> +-------------- > >> + > >> +1. Nodes within any bus, thus using unit addresses for children, shal= l be > >> + ordered incrementally by unit address. > >> + Alternatively for some sub-architectures, nodes of the same type c= an be > >> + grouped together (e.g. all I2C controllers one after another even = if this > >> + breaks unit address ordering). > >> + > >> +2. Nodes without unit addresses should be ordered alpha-numerically b= y the node > >> + name. For a few types of nodes, they can be ordered by the main p= roperty > >> + (e.g. pin configuration states ordered by value of "pins" property= ). > >> + > >> +3. When extending nodes in the board DTS via &label, the entries shou= ld be > >> + ordered alpha-numerically. > > > > Just an idea. Would that make (more) sense to make &label-like entries > > match order of nodes in included .dts(i)? > > > > Adventages: > > 1. We keep unit address incremental order that is unlikely to change > > > > Disadventages: > > 1. More difficult to verify > > Rob also proposed this and I believe above disadvantage here is crucial. > If you add new SoC with board DTS you are fine. But if you add only new > board, the order of entries look random in the diff hunk. Reviewer must > open SoC DTSI to be able to review the patch with board DTS. > > If review is tricky and we do not have tool to perform it automatically, > I am sure submissions will have disordered board DTS. I'm certainly in favor of only (or mostly?) specifying things we can check with tools. I don't need more to check manually... It wouldn't be too hard to get path from labels. dtc generates that with -@ already. So I don't buy "we don't have a tool" if a tool to check seems feasible. Rob