Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp707826rwb; Sun, 6 Nov 2022 12:27:09 -0800 (PST) X-Google-Smtp-Source: AMsMyM63Um4gYPNrcp0k1PCIov7+ZP1u33gKXvVSJEe0dt/iIW+boaVXto4oQV3xCal/dKcYXz51 X-Received: by 2002:a17:907:3188:b0:741:4bf7:ec1a with SMTP id xe8-20020a170907318800b007414bf7ec1amr45818599ejb.448.1667766429083; Sun, 06 Nov 2022 12:27:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667766429; cv=none; d=google.com; s=arc-20160816; b=G45yV2dOUF3KduxsQW0vpy5tY30aCjbjYMDcmtaLVG9kpo8jGDif3Q561tZuNIoshg fFAVcDkO/jRY6gK84+xAbhk4Qz+vfENSlnziZM4DEs6iFSfnhLTAyu1hrtt2+gH342H0 XbV82xl3dU4PnUptJbWg5Cu3VAxaSyQiSoG/xJCojC47VsFsibV4hS6yQY3i/JJw7eOn RMtb0tJn+Yh6gT0PJ8J4VjdqnIsPiGSsXxlJrtY9UXYGEAnBsUY8gTaFaFNWFVbSd1h4 0WUxJfVDZH4Xwkg0T+abtXtb0y2qOBGbThKS4SFU+wlhl8c1jYp0dK0oEpRkqJDhTKRi VFPQ== 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=ihkpvF0E1q2lcV8lw6m5s2jhfKtQ21IKBvUgaJ3Qmy8=; b=JVUkHHYKHBX0BfecFd+p6pUM34k1C9QSQ9PHrrWUYjLQzBUDOSx9r29OJqeLtfepAi +i84oAesRjQqfe5ItVS7j++BkVcLVIRnKZBUE0mekjnu0AbJDpmJUBP8Fm7CTCN9Vk3F Ff1fMMpQVPTCWd7iRgabb7CyUKVX623V0XQEca0dADyzVkFOZ8xr8sI7S6F5z975NtA4 EYtI46QnHq2S/DfSy7UIj1fwQ+R1kEVkqfxa/AdebaMLTVHiqYDRrlOT+OEgvnDDNWwR K+uAiAy96N8cWcm36pZGZ6ZnujZkPeKXRNHPIK6OC3gFti5JkRnzyCdDUhum1jV1Cd7N Rq/A== 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 o18-20020a170906359200b00780a3097d20si4454790ejb.180.2022.11.06.12.26.46; Sun, 06 Nov 2022 12:27:09 -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 S230127AbiKFTh1 (ORCPT + 95 others); Sun, 6 Nov 2022 14:37:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229947AbiKFTh0 (ORCPT ); Sun, 6 Nov 2022 14:37:26 -0500 Received: from relay01.th.seeweb.it (relay01.th.seeweb.it [5.144.164.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95972E02C for ; Sun, 6 Nov 2022 11:37:25 -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 CB7411F4F6; Sun, 6 Nov 2022 20:37:23 +0100 (CET) Date: Sun, 6 Nov 2022 20:37:22 +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 Subject: Re: [PATCH v3 2/2] arm64: dts: qcom: Add configuration for PMI8950 peripheral Message-ID: <20221106193722.j64xrhitdencrjxy@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 References: <20221101161801.1058969-1-luca@z3ntu.xyz> <20221101161801.1058969-2-luca@z3ntu.xyz> <20221104234435.xwjpwfxs73puvfca@SoMainline.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221104234435.xwjpwfxs73puvfca@SoMainline.org> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham 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-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). - Marijn