Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp116661rdb; Thu, 16 Nov 2023 13:35:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IGgqi0AoKSpllkNNA+oTSMZNWi2/zQtBgjvVm0gXHy8H3TzjoasYZzd05nwBEDrQ4FlKW3v X-Received: by 2002:a05:6a21:a591:b0:16b:74db:8fe1 with SMTP id gd17-20020a056a21a59100b0016b74db8fe1mr22534819pzc.29.1700170523608; Thu, 16 Nov 2023 13:35:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700170523; cv=none; d=google.com; s=arc-20160816; b=BHTO6H3brHfVMw8YIFE7eEsao85VWkQVO3auT+2AWpQanAyU+nKZ7kqNrIz9xMCNbs 2YplEYdTy11LeRII0Moxqugc78nnFLM++2sntvmUNvCSIFNQqwh42oS368WGhraR0gaJ ljlYcKcmVCEPipZlsLCAQESznt43LolTpR1BV3jKLBAUlNnvUpjm+j7IvtfiKIOMA8O5 6APr39w3Z5kiFkt0nW2UOUmvPQJDcYxnVVKZrT2OP5uDo2hTu6KbCenthULW/z5e+Kut HukxwWx74ms4rzIs7tnYyJUJXEyH9Nd/W+/SPF/Uumu6iAtx7wpjLAGc9xJ5UbJ3ALFk RGMQ== 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; bh=y2ZHLhPE5rWqVMstChgPLElJrcQKpMe2VVIZh5Y3bIE=; fh=BQdnFNfsKW6MfHArIanFV5orW0h/l+tz+XEnG17Bmo0=; b=QIWlweKliOKBHZSUxVHtVobPuffGsGNwKQJSfZf2vl2Tu2r+2eRSg0AABxN79tbKFZ cIlX2zz5R3ugSOKN+NP4/GD1E3Fxvyd7q+GHOz3xuyRvMOHHcDP5Ibavaxetpv1ovsup sHe27lBLjuC8Ix6B1zi5C/7F/2QuzVYpbwjdTxD5HOgR8IsT33IAaqoRLtuny7Dy6w1i MGnAJRh9CJfrJ4rwqr7fhTDGms6v8XdOwEdWRuO+IJiNKU6JoAzOH2SigaN6TZpxlMhH KAo9k3KjxflIPdzbK9y81ERe/I7Lc3PM7cU/BAcLKQLoXXpTDuPq5yV5D/BXxHALZnDw rw3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id fh9-20020a056a00390900b006c049d08778si402826pfb.188.2023.11.16.13.35.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 13:35:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id AF1358260F5D; Thu, 16 Nov 2023 13:35:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344378AbjKPVcg convert rfc822-to-8bit (ORCPT + 99 others); Thu, 16 Nov 2023 16:32:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231307AbjKPVce (ORCPT ); Thu, 16 Nov 2023 16:32:34 -0500 Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 951DC189; Thu, 16 Nov 2023 13:32:31 -0800 (PST) Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-5be6d6c04bfso14058387b3.3; Thu, 16 Nov 2023 13:32:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700170350; x=1700775150; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v2aL2QW+QmknQfAps94TnRW94rO/JgjpGWzTSPmskVY=; b=fqMvYZffIJQ4okt/Ai7QlqpdoQpDVIbv3gkeWj245rxYrXCtGHdnbStODiBUx0wgZH Pm2aH7Q1xvnFWPnGn1sTC4ztvgKmAKwU/R3lhGDWAWvTBKHU1M0lhqIT3O76L2/FIlOU 3WewYRTiOqGU04prOY+Iu2QXVf9Hfb13vy4LpE0KU0NyWsIbjlOPTfpnHnIUep4fflum YttW/K/AaBWEdqluLgw94zUJX3Bo8BL+FAgEipVNLBKOUXPQ138+TByN7UnydI0JMlDL zvorr8Vs9iZT76fNVKKpwVH4PY4rZxheCUSvNN43Fi9oOm+2zN3Bc5m38Pznh7/k0qdr aq6A== X-Gm-Message-State: AOJu0YyqemzQXckybOi8WhLy1hWRj6fOg7TS4yc/eYT5b4H7emY+IXA2 LY6XoWwHZqKSYyzmp+NrnZGtWkf8VAe8nQ== X-Received: by 2002:a81:4f91:0:b0:5a5:575:b222 with SMTP id d139-20020a814f91000000b005a50575b222mr16478260ywb.23.1700170350637; Thu, 16 Nov 2023 13:32:30 -0800 (PST) Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com. [209.85.219.175]) by smtp.gmail.com with ESMTPSA id m141-20020a0dca93000000b0059f5d686479sm112547ywd.16.2023.11.16.13.32.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Nov 2023 13:32:30 -0800 (PST) Received: by mail-yb1-f175.google.com with SMTP id 3f1490d57ef6-daead9cde1eso1304203276.2; Thu, 16 Nov 2023 13:32:29 -0800 (PST) X-Received: by 2002:a25:4643:0:b0:da0:3b6c:fc22 with SMTP id t64-20020a254643000000b00da03b6cfc22mr12442981yba.31.1700170349776; Thu, 16 Nov 2023 13:32:29 -0800 (PST) MIME-Version: 1.0 References: <20231116181218.18886-1-krzysztof.kozlowski@linaro.org> In-Reply-To: <20231116181218.18886-1-krzysztof.kozlowski@linaro.org> From: Geert Uytterhoeven Date: Thu, 16 Nov 2023 22:32:17 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] docs: dt-bindings: add DTS Coding Style document To: Krzysztof Kozlowski Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, AngeloGioacchino Del Regno , Arnd Bergmann , Bjorn Andersson , Heiko Stuebner , Konrad Dybcio , Matthias Brugger , Michal Simek , Neil Armstrong , Nishanth Menon , Olof Johansson Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, 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 groat.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 (groat.vger.email [0.0.0.0]); Thu, 16 Nov 2023 13:35:21 -0800 (PST) Hi Krzysztof, On Thu, Nov 16, 2023 at 7:12 PM Krzysztof Kozlowski wrote> > Document preferred coding style for Devicetree sources (DTS and DTSI), > to bring consistency among all (sub)architectures and ease in reviews. > Signed-off-by: Krzysztof Kozlowski Thanks for your patch! > --- a/Documentation/devicetree/bindings/index.rst > +++ b/Documentation/devicetree/bindings/index.rst > +Order of Nodes > +-------------- > + > +1. Nodes within any bus, thus using unit addresses for children, shall be > + ordered incrementally by unit address. In Renesas DTS files, we have an (unwritten) additional rule: when there are multiple nodes of the same type, they do not follow the global ordering by unit-address, but are grouped together. E.g. the second and any subsequent serial ports are always listed immediately after the first serial port. > +2. Nodes without unit addresses should be ordered alpha-numerically. > + > +3. When extending nodes in board DTS via &label, the entries should be ordered > + alpha-numerically. > +Order of Properties in Device Node > +---------------------------------- > + > +Following order of properties in device nodes is preferred: > + > +1. compatible > +2. reg > +3. ranges > +4. All properties with values > +5. Boolean properties > +6. status (if applicable) There must be a lank line between properties and child nodes? And once we have a documented coding style, the next long-standing item from our wishlist would be a script to sort the contents of a DTS file according to the rules ;-) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds