From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CC47C433DB for ; Mon, 11 Jan 2021 07:51:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1A14022A83 for ; Mon, 11 Jan 2021 07:51:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727666AbhAKHvV convert rfc822-to-8bit (ORCPT ); Mon, 11 Jan 2021 02:51:21 -0500 Received: from gloria.sntech.de ([185.11.138.130]:46496 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727652AbhAKHvV (ORCPT ); Mon, 11 Jan 2021 02:51:21 -0500 Received: from ip5f5aa64a.dynamic.kabel-deutschland.de ([95.90.166.74] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kyryE-0004Eb-3j; Mon, 11 Jan 2021 08:50:34 +0100 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Chen-Yu Tsai Cc: Johan Jonker , Chen-Yu Tsai , Rob Herring , "open list:ARM/Rockchip SoC..." , linux-kernel , linux-arm-kernel , devicetree Subject: Re: [PATCH 3/3] arm64: dts: rockchip: rk3328: Add Radxa ROCK Pi E Date: Mon, 11 Jan 2021 08:50:33 +0100 Message-ID: <2633022.BEx9A2HvPv@diego> In-Reply-To: References: <20210110035846.9155-1-wens@kernel.org> <2241380.NG923GbCHz@diego> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Am Montag, 11. Januar 2021, 04:27:47 CET schrieb Chen-Yu Tsai: > On Mon, Jan 11, 2021 at 4:06 AM Heiko Stübner wrote: > > > > Hi, > > > > Am Sonntag, 10. Januar 2021, 16:37:15 CET schrieb Chen-Yu Tsai: > > > > > + vcc_sd: sdmmc-regulator { > > > > > + compatible = "regulator-fixed"; > > > > > + gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; > > > > > + pinctrl-names = "default"; > > > > > + pinctrl-0 = <&sdmmc0m1_pin>; > > > > > > > > > + regulator-boot-on; > > > > > + regulator-name = "vcc_sd"; > > > > > > > > regulator-name above other regulator properties > > > > > > That is actually what I was used to, but some other rockchip dts files > > > have all the properties sorted alphabetically. So I stuck with what I > > > saw. > > > > I try to keep it alphabetical except for the exceptions :-D . > > > > regulator-name is such an exception. Similar to compatibles, the > > regulator-name is an entry needed to see if you're at the right node, > > so I really like it being the topmost regulator-foo property - just makes > > reading easier. > > > > (same for the compatible first, then regs, interrupts parts, as well > > as "status-last") > > > > But oftentimes, I just fix the ordering when applying - but seem to have > > missed this somewhere in those "other Rockchip dts files" ;-) . > > I was slightly confused. I looked again and yes regulator-name is always the > first regulator related property. What's off is that in some cases min/max > voltage comes before always-on/boot-on, and in others vice versa. > > For example in the Rock64 and ROC-RK3328-CC device trees, in the fixed > regulators, always-on/boot-on come before min/max voltage, while in the > PMIC the other order is used. That's likely undecidednes on my part ;-) There could be an argument for a "name, voltages, flags" sorting, but on the other hand just keeping it alphabetical with the naming on top creates less special cases. Heiko