Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3091193rdh; Mon, 27 Nov 2023 06:23:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IG4wOgMxLex17+1K6HG0bLBPZbmpLkuM84o1ia3j+oVfcVbdaqu8TTUBaw6ywoKo7OmP4Tr X-Received: by 2002:a05:6a20:e121:b0:18c:651:66cd with SMTP id kr33-20020a056a20e12100b0018c065166cdmr13454826pzb.60.1701094997284; Mon, 27 Nov 2023 06:23:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701094997; cv=none; d=google.com; s=arc-20160816; b=YDuFLOFuvTusLOlOqr0E/lSkmct7A+CdmH2hDz8WavuHQd44g5G/YcVgh6JJD5aR+c ElbveKcALFFSId1m9oaKEKwTAAWH7ZdU4Jk4SKvvzdziNMDPNmat0eF+0U3aICSKwsht yicNmMk6dWikaJNStyPy08XroItCjiTZDEjHEyaGO7ZBDIrchGyzD3L0qG51BuHdKbSq 8lu6vTDwRaW1YpyXFqmlyOrn739ea7ayxBc5MGHAOCcbnVznIkyXNs4S9UIdeDEaF0wl /P7LM8YL9QGcg4M2NozgeTrvxVReLJyK+YejCVltlKs1Zb5K28vy/RSM5pxFyh2n/2ni Db8g== 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=g+1Tf5cXDw+BImBMprXv2+KeiAl/SQF4Y6ay3GrKNzA=; fh=sRWzE6wObyE/8KpwvrQiJmIcXKSv/6f9XZiUXZajKWY=; b=eL2gw+aJxJXRoUcfZVFnJcoXXl8iboFAkbt3OvEMTV2oIBv9siQ64fCVl4z8CWCkqt HmDUsJy9YdMncp6PcO+H1OVlaJr5EdGkN8+xpZxsLzfSk4naelEH/oUIJCLoiekWdblf PxGzEA9lgCHNb/hjPN00hd3IjRnJKhIhx8yAQoH1nWvpLQzprj2JvyiqWwtolMH9v7ft zu0fFar+mQsS7fieNcFAmi9BF3BvxrNd1bDf8vA320dXZPB/vQhwOBY9e3ww1LdQeJjA lT67m3x2GjGdOO+bZN6jWuxvh71pOlXyd/LzACz59DxSXe8ppdiUmk+MYl7PAXdb1kX2 5W4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id s18-20020a635252000000b005b96d038729si9893467pgl.728.2023.11.27.06.23.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:23:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 712A9809026B; Mon, 27 Nov 2023 06:23:14 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233641AbjK0OW7 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 27 Nov 2023 09:22:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233630AbjK0OWp (ORCPT ); Mon, 27 Nov 2023 09:22:45 -0500 Received: from mail-yw1-f195.google.com (mail-yw1-f195.google.com [209.85.128.195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7B5D6FA2; Mon, 27 Nov 2023 06:20:06 -0800 (PST) Received: by mail-yw1-f195.google.com with SMTP id 00721157ae682-5cbcfdeaff3so42805607b3.0; Mon, 27 Nov 2023 06:20:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701094805; x=1701699605; 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=p8asMA5McnjUqiDsQhrdKj0am/206nD+kU8Fb3R8j7Q=; b=nwYLifb5c03uBSoGy08J+jk4kdSTzWG2HUdNOUK9Toymsx7FNnlAEISUAEKCULXlqi tA/+IdWgjUmuf/Rcij4uv0uwOOBWKluBdcZunKKqrcsnyjygTjxIyFi1i3/mwYIKw2ec 69gRtE+3z5VZKi5HxeuuMmqBnLNddnzNOKMAef6ZQEWXTkGgp+356vO7DyHZYDRGeGzx Fcnfy10u5U+afWNGkfOZljZWS5rP0KxPMZcLpKK+Xh2qX91ukBA//5X6WC9R6QOVmWGk kgk/uU/Kh4dGzL7I8WpMh0HQl7OoicB9QVarh4C8n5SVo1tdf6dd5V3Lzr1/Tj4c1oAW 8apQ== X-Gm-Message-State: AOJu0YwaJcDUgbz1R/iFhh5FhfWvOspgkqE3s8D1wfhBiv73/U7sU0Hj rKnsRD3tFThRLPKxtwZUE7KevIwRevWq0qoG X-Received: by 2002:a0d:d68c:0:b0:5a7:bfbf:691d with SMTP id y134-20020a0dd68c000000b005a7bfbf691dmr11601951ywd.42.1701094804463; Mon, 27 Nov 2023 06:20:04 -0800 (PST) Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com. [209.85.128.175]) by smtp.gmail.com with ESMTPSA id v126-20020a818584000000b005c08cfb7cadsm3310487ywf.57.2023.11.27.06.20.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Nov 2023 06:20:04 -0800 (PST) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-5cc66213a34so42655617b3.1; Mon, 27 Nov 2023 06:20:03 -0800 (PST) X-Received: by 2002:a0d:e207:0:b0:5a8:207b:48d with SMTP id l7-20020a0de207000000b005a8207b048dmr10958508ywe.11.1701094803713; Mon, 27 Nov 2023 06:20:03 -0800 (PST) MIME-Version: 1.0 References: <20231125184422.12315-1-krzysztof.kozlowski@linaro.org> In-Reply-To: <20231125184422.12315-1-krzysztof.kozlowski@linaro.org> From: Geert Uytterhoeven Date: Mon, 27 Nov 2023 15:19:52 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3] docs: dt-bindings: add DTS Coding Style document To: Krzysztof Kozlowski Cc: Rob Herring , 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 , Andrew Lunn , Arnd Bergmann , Bjorn Andersson , Chen-Yu Tsai , Dmitry Baryshkov , Geert Uytterhoeven , Heiko Stuebner , Jonathan Corbet , Konrad Dybcio , Michal Simek , Neil Armstrong , Nishanth Menon , Olof Johansson , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org, workflows@vger.kernel.org, linux-doc@vger.kernel.org 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 agentk.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 (agentk.vger.email [0.0.0.0]); Mon, 27 Nov 2023 06:23:14 -0800 (PST) Hi Krzysztof, On Sat, Nov 25, 2023 at 7:44 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. > > Cc: Andrew Davis > cc: Andrew Lunn > Cc: AngeloGioacchino Del Regno > Cc: Arnd Bergmann > Cc: Bjorn Andersson > Cc: Chen-Yu Tsai > Cc: Dmitry Baryshkov > Cc: Geert Uytterhoeven > Cc: Heiko Stuebner > Cc: Jonathan Corbet > Cc: Konrad Dybcio > Cc: Matthias Brugger > Cc: Michal Simek > Cc: Neil Armstrong > Cc: Nishanth Menon > Cc: Olof Johansson > Cc: Rafał Miłecki > Acked-by: Neil Armstrong > Acked-by: Heiko Stuebner > Signed-off-by: Krzysztof Kozlowski > > --- > > Merging idea: Rob/DT bindings > > Changes in v3 > ============= > 1. should->shall (Angelo) > 2. Comments // -> /* (Angelo, Michal) > 3. Use imaginary example in "Order of Properties in Device Node" > (Angelo) > 4. Added paragraphs for three sections with justifications of chosen > style. > 5. Allow two style of ordering overrides in board DTS: alphabetically or > by order of DTSI (Rob). > 6. I did not incorporate feedback about, due to lack of consensus and my > disagreement: > a. SoM being DTS without DTSI in "Organizing DTSI and DTS" Thanks for the update! > --- /dev/null > +++ b/Documentation/devicetree/bindings/dts-coding-style.rst > + /* SoC DTSI */ > + > + / { > + cpus { > + /* ... */ > + }; > + > + psci { > + /* ... */ > + }; > + > + soc@ { "soc@" is invalid, that should be "soc". As the "soc" node is special, you may want to elaborate: compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; ranges; > + dma: dma-controller@10000 { > + /* ... */ > + }; > + > + clk: clock-controller@80000 { > + /* ... */ > + }; > + }; > + }; > + > + /* Board DTS - alphabetical order */ > + > + &clk { > + /* ... */ > + }; > + > + &dma { > + /* ... */ > + }; > + > + /* Board DTS - alternative order, keep as DTSI */ > + > + &dma { > + /* ... */ > + }; > + > + &clk { > + /* ... */ > + }; IMO that alternative order is hard to review: you need to have multiple files open. It will also make validation hard, as you can only validate the end result, not individual files. Anyway, this is already quite usable so Reviewed-by: Geert Uytterhoeven 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