Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2031454rdh; Sat, 25 Nov 2023 10:45:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFenyMHDlF+MLkM3tlEDPtRQd/QAPesqi01dCBGZNel6FeDo9jJaHSTmK4YfFbvNMPBJ0ti X-Received: by 2002:a05:6808:2017:b0:3b8:643f:934b with SMTP id q23-20020a056808201700b003b8643f934bmr259648oiw.46.1700937941695; Sat, 25 Nov 2023 10:45:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700937941; cv=none; d=google.com; s=arc-20160816; b=Qi8uIIzGLUlUzRcTHQNpVU1Z5UtOgBQSQYQxP7Mv+FEhK5alD0nfB/R3HrmowJ6ZYd CKOc8DY1mo3JEqZepngfAzY7HD7LJpl4NlPXNgVyRXd3X8HsO8LWSCKPRal0TGOVpIjh uUB+n121EspuMmJJKVM3UIVGAjK9SySu/btsq4iree29Mnu8l49MiSP9gAhem/+UmgkL 5j3bPfJe5VfB3yg63lbuYNuLB8u2CpJzZc9wmQsiYR5OPt8Ju89kpyCIOC6jxYlcwyoa pKlbVTywuz8Z6IEYGZEmcn+aYjWSbA1GOUrvN+0SGM6TknF+aSNWaha5SolX8eIvBkvm 4NVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=apOXTcWKWpkE4SfJHSscK7soaBBzpXCbTsflcfpPDQc=; fh=qF6TcO/lV1qP0WCXPzCH2OWoTxbbZ5tkSv6UgE9iDgk=; b=BQgHS/0HyX2uJXNcfTDEz6iXJBRpYIRcWd2jqW9TGPgdRE+4bSPqgRejGRjypzQ/RY XWrEcAhooCnTrZp5fmT3o1A/L2m7Ftfhh1OFlgHbJvJ0SFjCmRByjrnVWoSjfTfixcx+ GSZhH4tn5Pl5uwEk4aT0NSdgB7Yn9PKP7QvnNVaRs23ZnSvX3dX664t8uempqiwYVEHv FEGUxlYeivlgjhE+FNmn+hvbO6AJJuAqar6+s+jkpZxoXNHdOa4nyuygDuF7P1obXT0H ubW2DqkD4qe8GbuFRkrywvrQbk9Bc7tEGK58M37JTGyZsQACAEBh2xycTwTykkgw0PVx v8Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ah8CH1+n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id x128-20020a636386000000b005bdc49d22a4si6295063pgb.103.2023.11.25.10.45.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 10:45:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ah8CH1+n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D001A807D688; Sat, 25 Nov 2023 10:45:11 -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 S231901AbjKYSon (ORCPT + 99 others); Sat, 25 Nov 2023 13:44:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjKYSom (ORCPT ); Sat, 25 Nov 2023 13:44:42 -0500 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E000129 for ; Sat, 25 Nov 2023 10:44:48 -0800 (PST) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a00a9d677fcso402605066b.0 for ; Sat, 25 Nov 2023 10:44:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700937887; x=1701542687; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=apOXTcWKWpkE4SfJHSscK7soaBBzpXCbTsflcfpPDQc=; b=Ah8CH1+npWY0Ylt1I5VQ2yIly8hC0g67wtCQhkQ4LVGQJ3fx4AWcDwAfSzGCSPVmiT IClxcOkrvpOpBohzkwyz5uQMtQ/8GHBRQ5GPg3CEAW4l2tt6x8I4pdHkl9x/m6iOHqIg u4FAILHwohTo3hEBczfc7sU4v4Hio+FqZRak7/tjHtcaSVSHrcJYc4L625OqUtZzU7HH VpWPH/imjG5/Qf7SAMbkJEJWZ+NlX5gO2ATLCXTKXdxVwt95ByFS1a6Jv+DSyhc/yzVv 2HhlDIcdKbdhvAUuz8acAsU367krmJWv4zwWty9sWNetsu0ALnFcsgW75hM54AT0FpZY cHxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700937887; x=1701542687; h=content-transfer-encoding:in-reply-to:autocrypt: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=apOXTcWKWpkE4SfJHSscK7soaBBzpXCbTsflcfpPDQc=; b=hxtnCZBkcJ9KOFXHBYSsVHZKMkufy1uWOSWErLaHon7RBCWpKFbjQIhRmFNru9L8OS 1+/fvSRGrLejDkpfztGMYOgaqMbB+iMUABVE9cjrstqi9uMyUTYbyONsT02ObmxbxXWV bE1aad9+yQHIEGMELjGoBMLHDqGPrn6RsGBK3cfA4yb6NxOdCh83hm9BqrcrQMXJfNl0 Ozu/5K5EHYPstlifNBc3NtuEMEn8SoSxlBFsbzYyMENFCsZ1e1/Ppsy5cVPcZlwZPA+E LMpx1Pstp0oLtyyeTv3Cf4Sjh/IxTLkLy8b4dwDJFg+IH8Oh9PxYhzTpq1HbyU9RsRVk /Z3Q== X-Gm-Message-State: AOJu0YwyhggZpPn/raLXVHJCIOdQghxqOfkSgPUPr6AD6RDx4Edea21+ Aixg9IC/U/NwjNroqGY1onWAeg== X-Received: by 2002:a17:906:d28b:b0:a00:47fa:2251 with SMTP id ay11-20020a170906d28b00b00a0047fa2251mr5041743ejb.32.1700937886891; Sat, 25 Nov 2023 10:44:46 -0800 (PST) Received: from [192.168.1.20] ([178.197.223.109]) by smtp.gmail.com with ESMTPSA id mf12-20020a170906cb8c00b009a13fdc139fsm3797155ejb.183.2023.11.25.10.44.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 Nov 2023 10:44:46 -0800 (PST) Message-ID: <89b2f3ae-52df-4304-9e51-5af73d52ea4c@linaro.org> Date: Sat, 25 Nov 2023 19:44:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] docs: dt-bindings: add DTS Coding Style document Content-Language: en-US To: Rob Herring 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 References: <20231120084044.23838-1-krzysztof.kozlowski@linaro.org> <6b288a2e-d147-4bd3-b1d4-daf56295d939@gmail.com> <01f9ce3b-e6e5-4b05-bf7f-0b3a5f74910a@linaro.org> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLcnp5c3p0b2Yg S296bG93c2tpIDxrcnp5c3p0b2Yua296bG93c2tpQGxpbmFyby5vcmc+wsGUBBMBCgA+FiEE m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ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 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]); Sat, 25 Nov 2023 10:45:12 -0800 (PST) On 22/11/2023 15:55, Rob Herring wrote: > On Wed, Nov 22, 2023 at 1:05 AM Krzysztof Kozlowski > wrote: >> >> On 21/11/2023 14:50, Rafał Miłecki wrote: >>>> +Order of Nodes >>>> +-------------- >>>> + >>>> +1. Nodes within any bus, thus using unit addresses for children, shall be >>>> + ordered incrementally by unit address. >>>> + Alternatively for some sub-architectures, nodes of the same type can 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 by the node >>>> + name. For a few types of nodes, they can be ordered by the main property >>>> + (e.g. pin configuration states ordered by value of "pins" property). >>>> + >>>> +3. When extending nodes in the board DTS via &label, the entries should 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. OK, then tool is not an argument. In Qualcomm and Samsung we already use alphabetical order in board DTS, so keeping that existing style could be an argument. I don't have strong preference, except the need to re-shuffle all DTS files which would be a quite disastrous for future stable-backports. I can mention both styles. Best regards, Krzysztof