Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp85402rdb; Thu, 16 Nov 2023 12:34:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IEKQMrFomuMSAl3Cf+O6he/Wq/ANd5YVibfoGe6PmkWU8aQOjOiCV4vykEC+xdhXtXbyAqQ X-Received: by 2002:a9d:7a8c:0:b0:6d6:567a:c83d with SMTP id l12-20020a9d7a8c000000b006d6567ac83dmr10408233otn.9.1700166860927; Thu, 16 Nov 2023 12:34:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700166860; cv=none; d=google.com; s=arc-20160816; b=IeCs3T9IBUDMdTueizD/5lVDnwEbDzwdtNkJIE9rPq12dH28CUGWYarQ96hidEWgUe D0107N6qxopYCc4qSlOABKLLLCCu/kKDkDS/0ov9dI3T5p5bPkarLMI5QiyRm7xJdf0T 8Kw5y+ksyWjeZBy44Peb+/X+2tf1KhUt6eOFv3dvnkJPApWKDfEbL+yOY3X8sZQoKkIj ivZrV4Muujrwerxjc40otFdZSmGcr6iV0uc8xy8H61zO73wOcBtupXYMHwSRcRIXF4Jb JMk5QnMMITHre24aQ3KKd7Sa4KFfpghq/YH3CDPi+XYGBiUuvGlBEfBPwdXEMloGEd43 XNdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ygnYS5mtjyeVJUCIxA1mes2ArLD5kUXPFbfK9SGXUSs=; fh=e4sSLUqy+Q0mqoC05MdBsFSYAkXffVhse4UJ/SP0How=; b=G1DVgJCQn/9n5GzONxaFzcDOnu8zjVCrojrnWZXKYd+dO5kH3gSm2Rb4+5en0Av9h0 nHvNAy+BxCmlIo5ZyMxjmj5YFM1QRiOzTMHTDx5l+kRqpUGoR2ttLDpqCrGghtUA7EQ9 oZOHVYBUJ6mjurnG1xl6WwdsHA7EvdS1ouSYDmcn+0+M2QKo5iGg33TcxtMIyLhECL0J fwMXgWtmI8b8MgiiR6GTdOwmgailPxm5/a8jyg0HD2Shza0AgoBLu7Anmy4jmhYbxPUd r1kGAWPCNMpJJxPYGxv7RE2BEV/5AuRCrd8YbLeWTiJJ1GXxjf8gbAbqQikXBiz1+mXq 9eCA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id m6-20020a632606000000b005c1cc536134si229615pgm.546.2023.11.16.12.34.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 12:34:20 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 2036E81B4572; Thu, 16 Nov 2023 12:34:18 -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 S229533AbjKPUeG (ORCPT + 99 others); Thu, 16 Nov 2023 15:34:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjKPUeG (ORCPT ); Thu, 16 Nov 2023 15:34:06 -0500 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 320C21A7; Thu, 16 Nov 2023 12:34:01 -0800 (PST) Received: from [194.95.143.137] (helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r3j3m-0005kq-K3; Thu, 16 Nov 2023 21:33:58 +0100 From: Heiko Stuebner To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski Cc: AngeloGioacchino Del Regno , Arnd Bergmann , Bjorn Andersson , Geert Uytterhoeven , Konrad Dybcio , Matthias Brugger , Michal Simek , Neil Armstrong , Nishanth Menon , Olof Johansson Subject: Re: [PATCH] docs: dt-bindings: add DTS Coding Style document Date: Thu, 16 Nov 2023 21:33:57 +0100 Message-ID: <7592981.EvYhyI6sBW@phil> In-Reply-To: References: <20231116181218.18886-1-krzysztof.kozlowski@linaro.org> <3266223.44csPzL39Z@phil> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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]); Thu, 16 Nov 2023 12:34:18 -0800 (PST) Am Donnerstag, 16. November 2023, 21:23:20 CET schrieb Krzysztof Kozlowski: > On 16/11/2023 21:03, Heiko Stuebner wrote: > > >>> I guess the only thing I do have questions about is the part > >>> > >>>> +4. All properties with values > >>>> +5. Boolean properties > >>> > >>> Is there a rationale for it? Because with it things like regulator-* > >>> properties then end up in two different blocks. > >> > >> Good point. It is only a matter of style that this: > >> > >> foo { > >> compatible = "foo"; > >> reg = <0x1>; > >> clocks = <&clk>; > >> wakeup-source; > >> key-autorepeat; > >> } > >> > >> looks better to me than: > >> > >> > >> foo { > >> compatible = "foo"; > >> reg = <0x1>; > >> key-autorepeat; > >> wakeup-source; > >> clocks = <&clk>; > >> } > >> > >> But you have good point that similar properties should be usually > >> grouped together. > >> > >> About which regulator properties are you thinking now? You mean the > >> supplies or the provider? > > > > I was thinking about the provider. There are > > regulator-min-microvolt = <>; > > and friends, but also > > regulator-boot-on; > > These are in regulator provider nodes and above guideline would keep > logical order: > > regulator-name = "vdd_kfc"; > regulator-min-microvolt = <800000>; > regulator-max-microvolt = <1500000>; > regulator-always-on; > regulator-boot-on; > > regulator-state-mem { > regulator-off-in-suspend; > }; > > What exactly would be here misordered? going with the vcc5v0_host regulator of the rk3588-quartzpro64 and +1. compatible +2. reg +3. ranges +4. All properties with values +5. Boolean properties +6. status (if applicable) +7. Child nodes we'd end up with vcc5v0_host: vcc5v0-host-regulator { /* 1. */ compatible = "regulator-fixed"; /* 4. */ gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&vcc5v0_host_en>; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-name = "vcc5v0_host"; vin-supply = <&vcc5v0_usb>; /* 5. */ enable-active-high; regulator-always-on; regulator-boot-on; }; which I find somewhat counter-intuitive ;-) . Heiko