Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6993785rwr; Wed, 10 May 2023 02:13:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5s9XbmlzN5kE7hv/vV+nm03QJuiGLzrczv9SYSA4v4dCkfGEDo5FRksOcEOAi5hv9rVM/k X-Received: by 2002:a17:90a:c7cf:b0:247:7597:9382 with SMTP id gf15-20020a17090ac7cf00b0024775979382mr17441936pjb.47.1683710022755; Wed, 10 May 2023 02:13:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683710022; cv=none; d=google.com; s=arc-20160816; b=hltUx5//HKmSbyRndOQtAFy77eNTflSn7GJYklhziClMMqDNf57M+Nh5Y6G3a4BEX3 He8hqSGI+J28aLNOwWS20bu5jl9044Lbk6UTPV2Bnv37+xMLm4PuZepAeM5zujTdwzAR 69F+QpN7GDfOpL4A4EckgYG3clvAmgyXQSlaR+vvVlEB+A/21L4OfxFI89jlqU81H9qS bPiaeQrI7IkKFmdH9RGpyfmZxlHT3a5IWsUKS9hI76OIUE3eEclgaqDvT4fF2EfE+oLY xZ04VIrTCT+bcDdttMgfI1WysVBK+q3W0+YCkb8+wGs9pmCW6CdCeybvPeF2e2vnB/Q0 L4sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=hoZ8kkN1eS0yykkcRILWwhA511HYhnHiIl1p28gNBmc=; b=xwI3i7OYGiuCBuQweuefIfIUBQ0AlqbrWSccba9k+L3xM5tkXsKsOeCn5IKfh/KDZS o1anHQ8EebGSllUxn1DQswHrmoqJxWD+PnnR0IkIe7DksFz7q2+1/8zjav3a3oXTtsPu oCf4Q7SlqCyqIusoniAQ+zve5v92ShcU4J8avuOVatv6/9PNbRDK9HD+v4fhBnfG/rpM Dxy+HK1TWljRvJhhBWlw7GfWmGAjo0cqBveKtGLS7UE3WlQNyD9ysNH3iOT0yK8LbU6K 3XnZwyTxXTi82YLw9aXLkkwYJobRJ/pgUN6518Fh5Zc0KTAy5WWqEDvOe9D+et/U2u3P BeuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sE0SnGa6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id in16-20020a17090b439000b0024e13530c0dsi21349807pjb.38.2023.05.10.02.13.31; Wed, 10 May 2023 02:13:42 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=sE0SnGa6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236792AbjEJIz5 (ORCPT + 99 others); Wed, 10 May 2023 04:55:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236830AbjEJIzx (ORCPT ); Wed, 10 May 2023 04:55:53 -0400 Received: from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8ECDE54 for ; Wed, 10 May 2023 01:55:48 -0700 (PDT) Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-559de1d36a9so100666337b3.1 for ; Wed, 10 May 2023 01:55:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683708948; x=1686300948; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=hoZ8kkN1eS0yykkcRILWwhA511HYhnHiIl1p28gNBmc=; b=sE0SnGa6LPEDuvJL8kk7+DMF5cC3tWhw0haIWIWmyXXxyTFKhNOsSyOAllIZBFOW8h 1VoALPXuv4QRHUoSVmdbbICLEmRh/6WZzl0Z1fmcAIf8P8xQ3M8hid6ndSt36nE7xbE4 RFaeK452hgYr4Ugbg/8s2+AljLJ/uGdS5qn08eInvWf8PfeLOQCopqUoUkWGDJ2R+wfJ xXkxW806dxeq5UU5+dx/wSIcsqDtkgDNDUmMjfygj/UpsdTWZRKMDG9w9UqAknIZYmNx sYxb/vQ5ZX/HssoUg3z6Mu4gAD4OXZPyQFUXZF9+NqNm0hHryTsvaZlQphHUhhvuX4ZG NtZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683708948; x=1686300948; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hoZ8kkN1eS0yykkcRILWwhA511HYhnHiIl1p28gNBmc=; b=JKq03B9IkrQuw969vlj50EMLA91LLcrD1wWxmqefGeaha1ZJAqqS9noglOSqDFSp6a PGFXqz+qmMZU8zKu3xt6XXVHfbJgnPWQI4KGupxTVxeI2jnLdldbe9JgxgaS2lVh5uox b3s3n6v/SkX4J3FuBLCREqRUMcIeiUOa/kgjec2ANMhSYfwHPlwPzLRDOeHAOptQysSQ 4sm3B+hujGhn7phBdQHiHn2fQEVklytneH8WigmhwsusPJcwroS2X0+PgoRofNrfaQgE sAUs+9/0/IdQcUBZt+8twqgmd/N9EAwV+TXBd43bLdd1cVmhOqooW1RGjh1aO3RysJ0W 9HOA== X-Gm-Message-State: AC+VfDyUiLo2qL0bwbagi4eNFH6FZCXIE7jyOvH57pfgJzfJBxyb5jC2 5NIie8mtFA1wNZ7wRTd1s1ZsK/6hnSK11hCGUxaunQ== X-Received: by 2002:a81:8443:0:b0:54f:179:cef2 with SMTP id u64-20020a818443000000b0054f0179cef2mr19353393ywf.19.1683708948031; Wed, 10 May 2023 01:55:48 -0700 (PDT) MIME-Version: 1.0 References: <20230407-pm7250b-sid-v1-0-fc648478cc25@fairphone.com> <20230407-pm7250b-sid-v1-2-fc648478cc25@fairphone.com> In-Reply-To: From: Dmitry Baryshkov Date: Wed, 10 May 2023 11:55:37 +0300 Message-ID: Subject: Re: [PATCH 2/2] arm64: dts: qcom: pm7250b: make SID configurable To: Luca Weiss Cc: Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Konrad Dybcio , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Wed, 10 May 2023 at 11:34, Luca Weiss wrote: > > On Wed May 10, 2023 at 10:07 AM CEST, Dmitry Baryshkov wrote: > > On Wed, 10 May 2023 at 09:55, Krzysztof Kozlowski > > wrote: > > > > > > On 10/05/2023 08:47, Luca Weiss wrote: > > > > Hi Krzysztof, > > > > > > > > On Fri Apr 7, 2023 at 10:27 AM CEST, Krzysztof Kozlowski wrote: > > > >> On 07/04/2023 09:45, Luca Weiss wrote: > > > >>> Like other Qualcomm PMICs the PM7250B can be used on different addresses > > > >>> on the SPMI bus. Use similar defines like the PMK8350 to make this > > > >>> possible. > > > >>> > > > >>> Signed-off-by: Luca Weiss > > > >>> --- > > > >>> arch/arm64/boot/dts/qcom/pm7250b.dtsi | 23 ++++++++++++++++------- > > > >>> 1 file changed, 16 insertions(+), 7 deletions(-) > > > >>> > > > >>> diff --git a/arch/arm64/boot/dts/qcom/pm7250b.dtsi b/arch/arm64/boot/dts/qcom/pm7250b.dtsi > > > >>> index daa6f1d30efa..eeb476edc79a 100644 > > > >>> --- a/arch/arm64/boot/dts/qcom/pm7250b.dtsi > > > >>> +++ b/arch/arm64/boot/dts/qcom/pm7250b.dtsi > > > >>> @@ -7,6 +7,15 @@ > > > >>> #include > > > >>> #include > > > >>> > > > >>> +/* This PMIC can be configured to be at different SIDs */ > > > >>> +#ifndef PM7250B_SID > > > >>> + #define PM7250B_SID 2 > > > >> > > > >> Drop indentation, although anyway I am against this. Please don't bring > > > >> new patterns of this at least till we settle previous discussion. > > > >> > > > >> https://lore.kernel.org/linux-arm-msm/46658cbb-fff5-e98b-fdad-88fa683a9c75@linaro.org/ > > > > > > > > What's the outcome of the discussion? For this PMIC it's totally enough > > > > to have the SID configurable like in this patch, I don't think this PMIC > > > > will be included twice in a board - at least I'm not aware of such a > > > > configuration. > > > > > > We did not reach consensus and I still disagree with complex macros or > > > macros depending on order of inclusion. > > > > I still think we should find a way to parametrise PMIC dtsi, however I > > agree with Krzysztof that complex CPP is not a way to go. > > What about the macro already used in-tree and proposed with this patch? > I wouldn't say this is a "complex macro" since it's just a single number > being replaced in a few places. My 2c: in my opinion it is fine (and it follows parameterization that we already have for some PMICs). > Could we get this in now, and if we find a new & better way in the > future we can adjust all the dtsi upstream? And this depends on the decision of RobH and Krzysztof. -- With best wishes Dmitry