Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1845415rwb; Fri, 2 Dec 2022 01:48:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf5q/QsALOV8S+n34fIDinp+QU9JU2H4e3iXwE60dfdthEGHlpBa/B9+cAfX1hVBqJGyf8xd X-Received: by 2002:a17:906:1106:b0:7be:833e:d242 with SMTP id h6-20020a170906110600b007be833ed242mr23521051eja.405.1669974507001; Fri, 02 Dec 2022 01:48:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669974506; cv=none; d=google.com; s=arc-20160816; b=fnF8xhth9zllmZ5OcyR6t2m8rQAZJQ5L52ZZounTBxZKz3lbNLtGrdC9se8mp99ynp XtBnFV7bx1cjI3tglKzwb4oAhsAgXozoLMUgWcKHpKyvzRajYsNskJBQcmzPL6hufMiV PMQd6jkGqRisVp2UbnrQ2lK4hAjiCLRgckShE5P8v138mk2+4Bc4AaxPXV+YxN5cE+Fg 8uSEE6zWLnkDgAo4YBqwybYM6+vslfYaVH2gqbiV2h1jk27uxDXdt8Sn+Ti/cxB2UWmP FuOLGUnB64YzswibK7kCQ/mgGj1J8udDZm0ktgRNDFAe/p3KYqw2V346DbM4YDmz+bD2 iOgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:to:from:date; bh=K7gipdhz7qm8uF1oLfEI1d0QaockMFa/wIXijSymFN4=; b=VoCKiqmSW+1Q6NBFhP016/e08yKpLjtA5/8lNFqmOVBgoUvsS7i2S//FuG8AvXTgl2 itCph/p3l+RC3oRaSSXC0kDx3MdrKzuGNoCPdv3CD3WKyUOMHOttdIQ01dr2fN1non4X HlznhnH8WAiMIc9QluiiW4okFzMT8IVoiBCirrHfU739zY1PLoXSCHByOqgd8DdnfLla KcwHJ+DM4vX/Z4B+I2f4C009/eV2hKM6CanXZI4iWDh6sLuo/GqZCynw6TP4AG+dHXOE VJtk4VUEz2akIRoDYm+xfZEOrlSyz6fwGhycjIeMvVQzeICX83J7VdjPNMRqzocJYYZ2 53pA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mp14-20020a1709071b0e00b007707ab4be28si6324846ejc.972.2022.12.02.01.48.05; Fri, 02 Dec 2022 01:48:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232819AbiLBJhQ (ORCPT + 84 others); Fri, 2 Dec 2022 04:37:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232637AbiLBJhM (ORCPT ); Fri, 2 Dec 2022 04:37:12 -0500 Received: from m-r1.th.seeweb.it (m-r1.th.seeweb.it [IPv6:2001:4b7a:2000:18::170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E537DFAE0; Fri, 2 Dec 2022 01:37:03 -0800 (PST) Received: from SoMainline.org (94-209-172-39.cable.dynamic.v4.ziggo.nl [94.209.172.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 244C41F87B; Fri, 2 Dec 2022 10:37:00 +0100 (CET) Date: Fri, 2 Dec 2022 10:36:58 +0100 From: Marijn Suijten To: Luca Weiss , linux-arm-msm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, AngeloGioacchino Del Regno , Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Cameron Subject: Re: [PATCH v3 2/2] arm64: dts: qcom: Add configuration for PMI8950 peripheral Message-ID: <20221202093658.vg6t2ptar2arh7hn@SoMainline.org> Mail-Followup-To: Marijn Suijten , Luca Weiss , linux-arm-msm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, AngeloGioacchino Del Regno , Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Cameron References: <20221101161801.1058969-1-luca@z3ntu.xyz> <20221101161801.1058969-2-luca@z3ntu.xyz> <20221104234435.xwjpwfxs73puvfca@SoMainline.org> <20221106193722.j64xrhitdencrjxy@SoMainline.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221106193722.j64xrhitdencrjxy@SoMainline.org> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-11-06 20:37:24, Marijn Suijten wrote: > On 2022-11-05 00:44:37, Marijn Suijten wrote: > > On 2022-11-01 17:18:00, Luca Weiss wrote: > > > From: AngeloGioacchino Del Regno > > > > > > The PMI8950 features integrated peripherals like ADC, GPIO controller, > > > MPPs and others. > > > > > > [luca@z3ntu.xyz: remove pm8950, style changes for 2022 standards, add wled] > > > Signed-off-by: AngeloGioacchino Del Regno > > > Signed-off-by: Luca Weiss > > > --- > > > Changes since v2: > > > * Pick up patch, and adjust as mentioned above sign-offs > > > > > > arch/arm64/boot/dts/qcom/pmi8950.dtsi | 97 +++++++++++++++++++++++++++ > > > 1 file changed, 97 insertions(+) > > > create mode 100644 arch/arm64/boot/dts/qcom/pmi8950.dtsi > > > > > > diff --git a/arch/arm64/boot/dts/qcom/pmi8950.dtsi b/arch/arm64/boot/dts/qcom/pmi8950.dtsi > > > new file mode 100644 > > > index 000000000000..32d27e2187e3 > > > --- /dev/null > > > +++ b/arch/arm64/boot/dts/qcom/pmi8950.dtsi > > > @@ -0,0 +1,97 @@ > > > +// SPDX-License-Identifier: GPL-2.0 > > > +// Copyright (c) 2019, AngeloGioacchino Del Regno > > > + > > > +#include > > > +#include > > > +#include > > > + > > > +&spmi_bus { > > > + pmic@2 { > > > + compatible = "qcom,pmi8950", "qcom,spmi-pmic"; > > > + reg = <0x2 SPMI_USID>; > > > + #address-cells = <1>; > > > + #size-cells = <0>; > > > + > > > + pmi8950_vadc: adc@3100 { > > > + compatible = "qcom,spmi-vadc"; > > > + reg = <0x3100>; > > > + interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>; > > > + #address-cells = <1>; > > > + #size-cells = <0>; > > > + #io-channel-cells = <1>; > > > + > > > + adc-chan@0 { > > > + reg = ; > > > + qcom,pre-scaling = <1 4>; > > > + label = "usbin"; > > > > I've previously sent a patch with labels in the node name instead [1], > > what's the preferred way nowadays? > > > > [1]: https://lore.kernel.org/linux-arm-msm/20220926190148.283805-4-marijn.suijten@somainline.org/ > > As it turns out that patch relied on the ADC5 driver propagating the DT > node name (and label name if set) to IIO, which doesn't happen for the > legacy VADC driver used here. I sent an RFC to that effect, with a > large discussion whether or not we should use node names, labels, or > rely on hardcoded names in the drivers entirely. The recent migration > to fwnode made the node name include the `@xx` suffix which makes for > unpleasant reading in sysfs, so that's at least one reason to have > generic node names *and skip node names in these drivers altogether*. > > https://lore.kernel.org/linux-arm-msm/20221106193018.270106-1-marijn.suijten@somainline.org/T/#u > > In short: we may want to hold off changing these patches until a > clear-cut decision has been made (but I think your patch here is the > right approach in the end: generic node name *with label*, when the > label is more clear than the name hardcoded in the driver). We came to the conclusion in [1] that using labels is the way to go so that the name doesn't get all mangled, then we can opt for generic node names here as well. This does mean I'll have to send a followup for [2] and have to revise [3] again to use generic node names and labels. - Marijn [1]: https://lore.kernel.org/linux-arm-msm/20221112162719.0ac87998@jic23-huawei/ [2]: https://lore.kernel.org/linux-arm-msm/20220926190148.283805-4-marijn.suijten@somainline.org/ [3]: https://lore.kernel.org/linux-arm-msm/20221111120156.48040-10-angelogioacchino.delregno@collabora.com/