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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DD24C001B0 for ; Wed, 5 Jul 2023 10:43:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232016AbjGEKnS (ORCPT ); Wed, 5 Jul 2023 06:43:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231545AbjGEKnS (ORCPT ); Wed, 5 Jul 2023 06:43:18 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE5C310CF for ; Wed, 5 Jul 2023 03:43:14 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-4f86e6e4038so754512e87.0 for ; Wed, 05 Jul 2023 03:43:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688553793; x=1691145793; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=12A9qcUVJY2HjTp99aSPBCbjL3RJ6iwTw28gJjZZd5I=; b=maLNQ7kVki8KKtj9rXkDPl0YLHRDT2SzUZQxgQ04P6nRQTNf9aMfk59zaRwYRBZCG9 ni8rtwdFGDibilatQ4az5XJvPypiqCCCXGx8fRtqZinJ+3Oa6Gb8/hNwGkpCRLDTOXcO Awbwkh5zMygJoh5wX+Y/FveBTHQBgSaBemz88mlaSWFhb5VBJZ0yzvfWKeVDF6a6YAgL LNEx40Pwr3Ichr2pVfUOm13ReDYKnzGUP+O1zZbM756DqeEu+8FZYHDC/kH1jWdeiRqo hq9Bkq+25oLHiEaKiKk9X6wn6nDNYYV7b3NeMbajI/a6hFO6jcM/v/Nw2aD/zHGTuBYz Ga2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688553793; x=1691145793; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=12A9qcUVJY2HjTp99aSPBCbjL3RJ6iwTw28gJjZZd5I=; b=jUxHnwFCNOvNyZ83k5yODw++idZpiaCADW6eYSo/TaBzqhDIYOrJ5P6XjBe/wLgNeb yVq/91JojvTyLxYVLvgY5DcqQ+IcqMsm/ob5U4qPT/JpuJzQFCvi+PhqdlOyFOWtXssA J8WeRpVWljUyBPVQ1/fW9ffzIiR+9EgT3Y7J5cLMRnxF3Z0ukeMXACCp44jMLtdb/wVy Z7Ksuf/z4uLJWcHiocaX7fCyzRy6MnDRrnZnXMqN9GpCkem52Sy2tXPJBNjr/qBUHmcq F5WkuAUcn1DgxFmLSP3wOF3DwO0gbPu3CIJzxKc6ffz+8GPv+Mhcma+seZMAUw5Dm0x7 c7Ag== X-Gm-Message-State: ABy/qLaE1wZYp89nkTcHDXv/y1n3D/gdKPKpIDuD7cqmTf3mwuqQrcO1 oRrIBjSWl1LdYDqK1H5rVWeLbA== X-Google-Smtp-Source: APBJJlFl4J5Bz/jVEqr/boTDXtZr5d6EOFdZrFDRQJguSRxRTxcwf03MCbEG98IUqQVthdUKAZjqGg== X-Received: by 2002:a05:6512:e86:b0:4fb:7624:85a5 with SMTP id bi6-20020a0565120e8600b004fb762485a5mr799188lfb.0.1688553792793; Wed, 05 Jul 2023 03:43:12 -0700 (PDT) Received: from [192.168.1.101] (abyj26.neoplus.adsl.tpnet.pl. [83.9.29.26]) by smtp.gmail.com with ESMTPSA id x8-20020ac24888000000b004fba4e27abesm2988053lfc.241.2023.07.05.03.43.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Jul 2023 03:43:12 -0700 (PDT) Message-ID: <553bd028-aaf3-b128-ae4c-7f938c23e889@linaro.org> Date: Wed, 5 Jul 2023 12:43:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH 02/10] dt-bindings: power: Add rpm power domains for SDX75 Content-Language: en-US To: Rohit Agarwal , agross@kernel.org, andersson@kernel.org, lee@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linus.walleij@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, sboyd@kernel.org Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org References: <1688395346-3126-1-git-send-email-quic_rohiagar@quicinc.com> <1688395346-3126-3-git-send-email-quic_rohiagar@quicinc.com> <0d468d08-6410-e424-b4f3-5245cdb0334a@linaro.org> <85456057-c4ef-68a6-4fc5-c9fd03b01b71@quicinc.com> <06506ed7-f861-0bca-8b87-e2da6a6bc789@quicinc.com> From: Konrad Dybcio In-Reply-To: <06506ed7-f861-0bca-8b87-e2da6a6bc789@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On 5.07.2023 10:54, Rohit Agarwal wrote: > > On 7/4/2023 11:47 AM, Rohit Agarwal wrote: >> >> On 7/3/2023 8:29 PM, Konrad Dybcio wrote: >>> On 3.07.2023 16:42, Rohit Agarwal wrote: >>>> Add RPM power domain bindings for the SDX75 SoC. >>>> >>>> Signed-off-by: Rohit Agarwal >>>> --- >>>>   Documentation/devicetree/bindings/power/qcom,rpmpd.yaml | 1 + >>>>   include/dt-bindings/power/qcom-rpmpd.h                  | 8 ++++++++ >>>>   2 files changed, 9 insertions(+) >>>> >>>> diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml >>>> index afad313..58e1be8 100644 >>>> --- a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml >>>> +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml >>>> @@ -40,6 +40,7 @@ properties: >>>>         - qcom,sdm845-rpmhpd >>>>         - qcom,sdx55-rpmhpd >>>>         - qcom,sdx65-rpmhpd >>>> +      - qcom,sdx75-rpmhpd >>>>         - qcom,sm6115-rpmpd >>>>         - qcom,sm6125-rpmpd >>>>         - qcom,sm6350-rpmhpd >>>> diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h >>>> index 1bf8e87..8092d0d 100644 >>>> --- a/include/dt-bindings/power/qcom-rpmpd.h >>>> +++ b/include/dt-bindings/power/qcom-rpmpd.h >>>> @@ -57,6 +57,14 @@ >>>>   #define SDX65_CX_AO    4 >>>>   #define SDX65_MXC    5 >>>>   +/* SDX75 Power Domain Indexes */ >>>> +#define SDX75_CX    0 >>>> +#define SDX75_CX_AO    1 >>>> +#define SDX75_MSS    2 >>>> +#define SDX75_MX    3 >>>> +#define SDX75_MX_AO    4 >>>> +#define SDX75_MXC    5 >>> Please instead introduce a set of defines without the SoC prefix >>> (i.e. CX, CX_AO, MX etc.). We've been putting this off for too long >>> and you're the first unlucky guy that submitted new RPMhPD support after >>> we've concluded it'd be the way to go! :D Sadly, we can't replace the >>> existing ones retroactively.. >> Surely No issues. Will update it. > > I have a doubt here. Cant we completely omit the #defines here and directly index this as 0,1,... > because if the intention of this #defines is to understand the name of the pd then we can get > it from the .name attribute in rpmhpd as well, right? > > The problems with a common set of #define would be, lets say if we define CX_AO as 1 and some platform > doesn't have CX_AO then wouldnt it leave a null entry in the driver entry of that platform? Yes. We already do this in the rpmh clock driver, as: 1. there are domains that all chips share (like CX etc.) 2. wasting a couple of bytes lets us massively save on convolution Konrad > > Thanks, > Rohit. > >> >> Thanks, >> Rohit. >>> Konrad >>>> + >>>>   /* SM6350 Power Domain Indexes */ >>>>   #define SM6350_CX    0 >>>>   #define SM6350_GFX    1