From patchwork Wed Jan 25 03:27:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 48004 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp71999wrn; Tue, 24 Jan 2023 19:28:18 -0800 (PST) X-Google-Smtp-Source: AK7set/EW1+Va7LNzp+CmXTFtqiGH17kRzpDM8BtGzcHXSGBQr7vdIrqMxjZZDo1OTp1/gDiq8z9 X-Received: by 2002:a17:90a:1984:b0:22c:38:5a66 with SMTP id 4-20020a17090a198400b0022c00385a66mr2145128pji.47.1674617298640; Tue, 24 Jan 2023 19:28:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674617298; cv=none; d=google.com; s=arc-20160816; b=XXS6hAPUIBI3X1cl3gMjW2MoPi/ZDEHfflNyp+ZsWJZhS5yyJSfH4AZ5HSHiHsHwGm lQCuvC4L4hKQ7ho1JUutS9q86yAZvrR2B4sEi+LUJ6MiufX2yHqFwtMccqq8kcQ9KVsC 4vm5XA9QAtPzNJyEZhgSjqhdOE+qYWE4JA9bvpSTbarqCwA63RYK8hrM3phW2dE2VJJk nb0Fu8IvbEeALaK06AGqhU4t07nZSdt8r5Zxz4YkfsArs2GyWy5Gyl61Gz5EybjelDwy m+M2vE/Zv3FsG+/TAcaYTVbvpIwTbdqfzOz5Jj2vsZKp36F5DGRafj4zffGK5sFjNNuo nJsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=i7Y1NMPalpxUqHha/UwoSVK0emmKu+W/+Z588Ntdk2I=; b=wvWq1RJ8iSn6OtK6J6JHx1IH5X+7cFdvPClSWbmqQSS1chTDMedHbpgVgGRIEG2oan 2i44VOrzKqK3bcvUlUgxkzncJlSp0hV3I+LUI+kbqQ6cjGoJjayMVGNmPnqGZqOcpYxZ z8XjQWaitrnJ1C6NvlA29+xUWic82z0ls/7qrbxZ4h2NSg+BdvOLMdN/idmmJ1Xuu6Zo dPLfs56ammAFVcB5It41rkax/8+ctaMet5WYUMZRf3OnWO7bepHIV9RhJmcQ2T7rpv4b QODeXkgkJ6TTtKHL66pS44db9QU0E7/KHcU3kRIvd9NxNoJdJjRIiSFCSajx+yvtVEH0 iyRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nLQmn75x; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 73-20020a17090a0fcf00b00218cf92fc62si798346pjz.89.2023.01.24.19.28.07; Tue, 24 Jan 2023 19:28:18 -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; dkim=pass header.i=@linaro.org header.s=google header.b=nLQmn75x; 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 S233330AbjAYD1l (ORCPT + 99 others); Tue, 24 Jan 2023 22:27:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233265AbjAYD1i (ORCPT ); Tue, 24 Jan 2023 22:27:38 -0500 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0098353E5B for ; Tue, 24 Jan 2023 19:27:34 -0800 (PST) Received: by mail-ej1-x62c.google.com with SMTP id rl14so40876869ejb.2 for ; Tue, 24 Jan 2023 19:27:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=i7Y1NMPalpxUqHha/UwoSVK0emmKu+W/+Z588Ntdk2I=; b=nLQmn75xC7aFlT12AfAw26byvRV4dfkXnB5rWHF8lYMVc+oJ+8nljixdej51o44EVg pfqa1gh5y4p49eExD0etdS6I6urx+Fxto9w3N29GEdW75kewQQ8Hdo5ARMJ2mBbZj64l zIgJvusAFgnqmG4SQntKRwqsTFhBRfz5kMvPUbIa1moLixEC/ZlPmbqAdykH0TtpWAal tby0GGmf7WqXPxJI43RN6FFol1foBxJ/6kOOM9nU0vFV6CBz4m1Kadpo/u7tMuaO6mQk tYoseWmPYKZmieCcNSqOy7Mz2C94q+Svjj3mITqx6kwY5JXVJ6qgANV5UEwunmkKNFDb AAkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i7Y1NMPalpxUqHha/UwoSVK0emmKu+W/+Z588Ntdk2I=; b=5XpeOLuchBVtPmeKi71unDcQePZs1Ll8twxdD7ZQt3STJtKhTjAVRc6980zkjYevm+ yveTrqTD2gsZIL3ViZfS4GGnFNlDyeLnj7/5FIhBCMvYImSU5gMKJ/FxKwy/xZ41kJlg Eb5f8pRBVcvA+6y2hpVfUf1N+gA3H+Ibr0kF5jvA/NXGxKVOO7aLLI5vdhwWOCJ1/KhZ 8QxZpvl7IQWURTQZQBTxfza4gsWu/WXJoxxIt4Yrg1GF3tZXRVquc1Qo0CF0z/NnE05w YPdgDFQJW4NnHe750p/V72RORTikx+9LxM6JwCjYJeDkkY3a732fP8dZ6uA2xEh8FgeJ 4Vdg== X-Gm-Message-State: AFqh2kpn8sJ614e0RL0fDE6vJGqAV2hEFosSax3ZhuLVhym5dP/z0v4x zjBl0Fy89HnIT7JPQzBOBTrJdA== X-Received: by 2002:a17:906:dfe1:b0:870:e946:7241 with SMTP id lc1-20020a170906dfe100b00870e9467241mr31455389ejc.11.1674617253015; Tue, 24 Jan 2023 19:27:33 -0800 (PST) Received: from localhost.localdomain (abyl109.neoplus.adsl.tpnet.pl. [83.9.31.109]) by smtp.gmail.com with ESMTPSA id if10-20020a170906df4a00b00738795e7d9bsm1742913ejc.2.2023.01.24.19.27.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 19:27:32 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , linux-kernel@vger.kernel.org Subject: [PATCH 1/7] soc: qcom: rpmpd: Add parent PD support Date: Wed, 25 Jan 2023 04:27:22 +0100 Message-Id: <20230125032728.611640-2-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230125032728.611640-1-konrad.dybcio@linaro.org> References: <20230125032728.611640-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755963508545192950?= X-GMAIL-MSGID: =?utf-8?q?1755963508545192950?= In some cases (like with the GPU core clock on GMU-less SoCs) it's required that we scale more than one voltage domain. This can be achieved by linking them in a parent-child relationship. Add support for specifying a parent PD, similarly to what has been done in the RPMhPD driver. Signed-off-by: Konrad Dybcio --- drivers/soc/qcom/rpmpd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 337b1ad1cd3b..0c2d930ab38f 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -99,6 +99,7 @@ struct rpmpd_req { struct rpmpd { struct generic_pm_domain pd; + struct generic_pm_domain *parent; struct rpmpd *peer; const bool active_only; unsigned int corner; @@ -673,6 +674,15 @@ static int rpmpd_probe(struct platform_device *pdev) data->domains[i] = &rpmpds[i]->pd; } + /* Add subdomains */ + for (i = 0; i < num; i++) { + if (!rpmpds[i]) + continue; + + if (rpmpds[i]->parent) + pm_genpd_add_subdomain(rpmpds[i]->parent, &rpmpds[i]->pd); + } + return of_genpd_add_provider_onecell(pdev->dev.of_node, data); } From patchwork Wed Jan 25 03:27:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 48007 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp72255wrn; Tue, 24 Jan 2023 19:29:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXsSfdbseSzgx+Pr705oAmUxTfzIgAKp41Y1GrB1CZjqGe7ams08uUb4Dz/3wq1Y7eZ5qNUp X-Received: by 2002:a62:3181:0:b0:58d:90aa:6039 with SMTP id x123-20020a623181000000b0058d90aa6039mr26126033pfx.32.1674617345884; Tue, 24 Jan 2023 19:29:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674617345; cv=none; d=google.com; s=arc-20160816; b=gB3LYXppVD+Ex2D4Kh4VXIRfmpKljBLqULJH4lilkBIxyocrfoe+FUeEeh+fxQ3mrx imXsVwkVBdvNHKMA8XnfV7rpoMULXAYvf0zn95R2m0c87JRsGp+sD5eSSxx0xi4cIHI9 nYwgXtGeTtZWKDSwI19pB0iHHxGQbhvG8t29tr0WVpXjwMK6fCyaIv/UQiRqY/pGxFh2 W+kM7nuvLGTaEax5q0Pv2eDR8zhmA/lcen6p9l8uTA2K4G934le/mdMPbcucbXrrfczc FV1CrR/4icNFZe8jBddRo8/op2MAv17XWF54sSAi7keWE7YGC7wiVgR2Akhk8Ur8Mdt7 fLDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4dKcE4jHccZOMOJ076LzEOV5Ke8TJRcTIiVilxyXl8k=; b=I8zv16r3CFwFaqXfQhKwgmzW1JpZL0rkfgeDdBRs45P0hyvp/mYVEcghP9kBWo81Ds weW3FeXvDFQyfdYlDYujvSt60jrbE5rM7wRkwSaKTsaAloeI+nwugf6L6ExYNoSsWtF+ WvHvSdlFijQTupdGdMD8NgT6dp0skp/1xVDivSgSobUwnT2Eb5k7JGS0TKDls7Iz3RoH XooXH71dpzGlHN0VVbxVAkIfeIpGnR0LhhdrFrh8Td8SjSuP+W4z6+jlWqfxVBljv37b 79ayB5RPhnxpptCrybKTzNEZrMYiGsHfyjSGy4CmtrJC4p6HxatZoCoC9hUZDDsuGdwm +c+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AImo6y1Z; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m27-20020a62a21b000000b005803c45cc2dsi4138276pff.48.2023.01.24.19.28.54; Tue, 24 Jan 2023 19:29:05 -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; dkim=pass header.i=@linaro.org header.s=google header.b=AImo6y1Z; 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 S233619AbjAYD1o (ORCPT + 99 others); Tue, 24 Jan 2023 22:27:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233488AbjAYD1l (ORCPT ); Tue, 24 Jan 2023 22:27:41 -0500 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4014653B26 for ; Tue, 24 Jan 2023 19:27:36 -0800 (PST) Received: by mail-ej1-x62a.google.com with SMTP id tz11so44278460ejc.0 for ; Tue, 24 Jan 2023 19:27:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4dKcE4jHccZOMOJ076LzEOV5Ke8TJRcTIiVilxyXl8k=; b=AImo6y1Z8UxHMOS1/tplDK9LI1FZujfXlVXjsTxYSt0UTqrShXB1oZN2W5UdWsGhkA HwYGPNDy6/a9LJGN+M2uBtlyf4oj2P9BXv+U4nlA9wpnVJcz/vJejkGwVB0R32tgYcec ddPaY4XD9UDL9RyNW+wR0IBwaGzxULXG7kIxW616lMzihRXzinpZSNHuGTp/JI8s1pXn 6bbE870cpAznaaw6iDY2g0VDjhzoRRG5bMs1SBVI0HhtklMm63tbO1+nPZRAzCnzFtGf yptsHMp2RWtnwxicLCBB6v9p2pcdlw0lCqZ4vLJllxfpcZfWllcyMMiMW08mBlJMp74B IuoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4dKcE4jHccZOMOJ076LzEOV5Ke8TJRcTIiVilxyXl8k=; b=YP6MVn6YE5AXdELFIuitjBVpKCxX37AKj3YP8E82PO6Ih/XdwdZdBmuGz/pXt+fgto vtXsYyUv0N2GD6DfnR7/jfoOTwSPIs4vUI14Hr6C61g0ZJtLLjuwZhm/Y1FVhm1eVHei YQbMciegOACULE8r0ttWiAty2cAKKxSJX3wyUyrKatxgWy9QOPLhDRg3BvHojBKG8WJs 5bdJpcQl6jk0K0T2hPYQ7vXjuklS0v6v4vtvyQjCSMllCyetPiTEu3A0KJZFFobJKma/ OkszOR+VGYTv2pGZ+Oj/hMeHJKwUHMVuBghf1YKrBUMpIrITia8YeOf8zLXWrvifSalL Z/Ow== X-Gm-Message-State: AFqh2kqHQetqO/cSShOlt1yxr9NBCbhABFC3iNtIIx9w68LxPWhFQwus MnLiZgExUEjrA7m8trckKnpLEQ== X-Received: by 2002:a17:906:f6ce:b0:877:9b5a:bd51 with SMTP id jo14-20020a170906f6ce00b008779b5abd51mr22683001ejb.72.1674617254744; Tue, 24 Jan 2023 19:27:34 -0800 (PST) Received: from localhost.localdomain (abyl109.neoplus.adsl.tpnet.pl. [83.9.31.109]) by smtp.gmail.com with ESMTPSA id if10-20020a170906df4a00b00738795e7d9bsm1742913ejc.2.2023.01.24.19.27.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 19:27:34 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , linux-kernel@vger.kernel.org Subject: [PATCH 2/7] soc: qcom: rpmpd: Expand #defines into structs Date: Wed, 25 Jan 2023 04:27:23 +0100 Message-Id: <20230125032728.611640-3-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230125032728.611640-1-konrad.dybcio@linaro.org> References: <20230125032728.611640-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755963558032816773?= X-GMAIL-MSGID: =?utf-8?q?1755963558032816773?= Expand preprocessor macros into human-readable structs for easier reference. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- drivers/soc/qcom/rpmpd.c | 839 +++++++++++++++++++++++++++++++++------ 1 file changed, 722 insertions(+), 117 deletions(-) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 0c2d930ab38f..9a7da7cead9e 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -40,57 +40,6 @@ #define MAX_CORNER_RPMPD_STATE 6 -#define DEFINE_RPMPD_PAIR(_platform, _name, _active, r_type, r_key, \ - r_id) \ - static struct rpmpd _platform##_##_active; \ - static struct rpmpd _platform##_##_name = { \ - .pd = { .name = #_name, }, \ - .peer = &_platform##_##_active, \ - .res_type = RPMPD_##r_type, \ - .res_id = r_id, \ - .key = KEY_##r_key, \ - }; \ - static struct rpmpd _platform##_##_active = { \ - .pd = { .name = #_active, }, \ - .peer = &_platform##_##_name, \ - .active_only = true, \ - .res_type = RPMPD_##r_type, \ - .res_id = r_id, \ - .key = KEY_##r_key, \ - } - -#define DEFINE_RPMPD_CORNER(_platform, _name, r_type, r_id) \ - static struct rpmpd _platform##_##_name = { \ - .pd = { .name = #_name, }, \ - .res_type = RPMPD_##r_type, \ - .res_id = r_id, \ - .key = KEY_CORNER, \ - } - -#define DEFINE_RPMPD_LEVEL(_platform, _name, r_type, r_id) \ - static struct rpmpd _platform##_##_name = { \ - .pd = { .name = #_name, }, \ - .res_type = RPMPD_##r_type, \ - .res_id = r_id, \ - .key = KEY_LEVEL, \ - } - -#define DEFINE_RPMPD_VFC(_platform, _name, r_type, r_id) \ - static struct rpmpd _platform##_##_name = { \ - .pd = { .name = #_name, }, \ - .res_type = RPMPD_##r_type, \ - .res_id = r_id, \ - .key = KEY_FLOOR_CORNER, \ - } - -#define DEFINE_RPMPD_VFL(_platform, _name, r_type, r_id) \ - static struct rpmpd _platform##_##_name = { \ - .pd = { .name = #_name, }, \ - .res_type = RPMPD_##r_type, \ - .res_id = r_id, \ - .key = KEY_FLOOR_LEVEL, \ - } - struct rpmpd_req { __le32 key; __le32 nbytes; @@ -120,11 +69,56 @@ struct rpmpd_desc { static DEFINE_MUTEX(rpmpd_lock); /* mdm9607 RPM Power Domains */ -DEFINE_RPMPD_PAIR(mdm9607, vddcx, vddcx_ao, SMPA, LEVEL, 3); -DEFINE_RPMPD_VFL(mdm9607, vddcx_vfl, SMPA, 3); +static struct rpmpd mdm9607_vddcx_ao; +static struct rpmpd mdm9607_vddcx = { + .pd = { .name = "vddcx", }, + .peer = &mdm9607_vddcx_ao, + .res_type = RPMPD_SMPA, + .res_id = 3, + .key = KEY_LEVEL, +}; + +static struct rpmpd mdm9607_vddcx_ao = { + .pd = { .name = "vddcx_ao", }, + .peer = &mdm9607_vddcx, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 3, + .key = KEY_LEVEL, +}; + +static struct rpmpd mdm9607_vddcx_vfl = { + .pd = { .name = "vddcx_vfl", }, + .res_type = RPMPD_SMPA, + .res_id = 3, + .key = KEY_FLOOR_LEVEL, +}; + +static struct rpmpd mdm9607_vddmx_ao; +static struct rpmpd mdm9607_vddmx = { + .pd = { .name = "vddmx", }, + .peer = &mdm9607_vddmx_ao, + .res_type = RPMPD_LDOA, + .res_id = 12, + .key = KEY_LEVEL, +}; + +static struct rpmpd mdm9607_vddmx_ao = { + .pd = { .name = "vddmx_ao", }, + .peer = &mdm9607_vddmx, + .active_only = true, + .res_type = RPMPD_LDOA, + .res_id = 12, + .key = KEY_LEVEL, +}; + +static struct rpmpd mdm9607_vddmx_vfl = { + .pd = { .name = "vddmx_vfl", }, + .res_type = RPMPD_LDOA, + .res_id = 12, + .key = KEY_FLOOR_LEVEL, +}; -DEFINE_RPMPD_PAIR(mdm9607, vddmx, vddmx_ao, LDOA, LEVEL, 12); -DEFINE_RPMPD_VFL(mdm9607, vddmx_vfl, LDOA, 12); static struct rpmpd *mdm9607_rpmpds[] = { [MDM9607_VDDCX] = &mdm9607_vddcx, [MDM9607_VDDCX_AO] = &mdm9607_vddcx_ao, @@ -141,8 +135,30 @@ static const struct rpmpd_desc mdm9607_desc = { }; /* msm8226 RPM Power Domains */ -DEFINE_RPMPD_PAIR(msm8226, vddcx, vddcx_ao, SMPA, CORNER, 1); -DEFINE_RPMPD_VFC(msm8226, vddcx_vfc, SMPA, 1); +static struct rpmpd msm8226_vddcx_ao; +static struct rpmpd msm8226_vddcx = { + .pd = { .name = "vddcx", }, + .peer = &msm8226_vddcx_ao, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_CORNER, +}; + +static struct rpmpd msm8226_vddcx_ao = { + .pd = { .name = "vddcx_ao", }, + .peer = &msm8226_vddcx, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_CORNER, +}; + +static struct rpmpd msm8226_vddcx_vfc = { + .pd = { .name = "vddcx_vfc", }, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_FLOOR_CORNER, +}; static struct rpmpd *msm8226_rpmpds[] = { [MSM8226_VDDCX] = &msm8226_vddcx, @@ -157,13 +173,73 @@ static const struct rpmpd_desc msm8226_desc = { }; /* msm8939 RPM Power Domains */ -DEFINE_RPMPD_PAIR(msm8939, vddmd, vddmd_ao, SMPA, CORNER, 1); -DEFINE_RPMPD_VFC(msm8939, vddmd_vfc, SMPA, 1); +static struct rpmpd msm8939_vddmd_ao; +static struct rpmpd msm8939_vddmd = { + .pd = { .name = "vddmd", }, + .peer = &msm8939_vddmd_ao, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_CORNER, +}; + +static struct rpmpd msm8939_vddmd_ao = { + .pd = { .name = "vddmd_ao", }, + .peer = &msm8939_vddmd, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_CORNER, +}; + +static struct rpmpd msm8939_vddmd_vfc = { + .pd = { .name = "vddmd_vfc", }, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_FLOOR_CORNER, +}; -DEFINE_RPMPD_PAIR(msm8939, vddcx, vddcx_ao, SMPA, CORNER, 2); -DEFINE_RPMPD_VFC(msm8939, vddcx_vfc, SMPA, 2); +static struct rpmpd msm8939_vddcx_ao; +static struct rpmpd msm8939_vddcx = { + .pd = { .name = "vddcx", }, + .peer = &msm8939_vddcx_ao, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_CORNER, +}; + +static struct rpmpd msm8939_vddcx_ao = { + .pd = { .name = "vddcx_ao", }, + .peer = &msm8939_vddcx, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_CORNER, +}; + +static struct rpmpd msm8939_vddcx_vfc = { + .pd = { .name = "vddcx_vfc", }, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_FLOOR_CORNER, +}; -DEFINE_RPMPD_PAIR(msm8939, vddmx, vddmx_ao, LDOA, CORNER, 3); +static struct rpmpd msm8939_vddmx_ao; +static struct rpmpd msm8939_vddmx = { + .pd = { .name = "vddmx", }, + .peer = &msm8939_vddmx_ao, + .res_type = RPMPD_LDOA, + .res_id = 3, + .key = KEY_CORNER, +}; + +static struct rpmpd msm8939_vddmx_ao = { + .pd = { .name = "vddmx_ao", }, + .peer = &msm8939_vddmx, + .active_only = true, + .res_type = RPMPD_LDOA, + .res_id = 3, + .key = KEY_CORNER, +}; static struct rpmpd *msm8939_rpmpds[] = { [MSM8939_VDDMDCX] = &msm8939_vddmd, @@ -183,10 +259,48 @@ static const struct rpmpd_desc msm8939_desc = { }; /* msm8916 RPM Power Domains */ -DEFINE_RPMPD_PAIR(msm8916, vddcx, vddcx_ao, SMPA, CORNER, 1); -DEFINE_RPMPD_PAIR(msm8916, vddmx, vddmx_ao, LDOA, CORNER, 3); +static struct rpmpd msm8916_vddcx_ao; +static struct rpmpd msm8916_vddcx = { + .pd = { .name = "vddcx", }, + .peer = &msm8916_vddcx_ao, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_CORNER, +}; + +static struct rpmpd msm8916_vddcx_ao = { + .pd = { .name = "vddcx_ao", }, + .peer = &msm8916_vddcx, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_CORNER, +}; + +static struct rpmpd msm8916_vddmx_ao; +static struct rpmpd msm8916_vddmx = { + .pd = { .name = "vddmx", }, + .peer = &msm8916_vddmx_ao, + .res_type = RPMPD_LDOA, + .res_id = 3, + .key = KEY_CORNER, +}; -DEFINE_RPMPD_VFC(msm8916, vddcx_vfc, SMPA, 1); +static struct rpmpd msm8916_vddmx_ao = { + .pd = { .name = "vddmx_ao", }, + .peer = &msm8916_vddmx, + .active_only = true, + .res_type = RPMPD_LDOA, + .res_id = 3, + .key = KEY_CORNER, +}; + +static struct rpmpd msm8916_vddcx_vfc = { + .pd = { .name = "vddcx_vfc", }, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_FLOOR_CORNER, +}; static struct rpmpd *msm8916_rpmpds[] = { [MSM8916_VDDCX] = &msm8916_vddcx, @@ -203,11 +317,66 @@ static const struct rpmpd_desc msm8916_desc = { }; /* msm8953 RPM Power Domains */ -DEFINE_RPMPD_PAIR(msm8953, vddmd, vddmd_ao, SMPA, LEVEL, 1); -DEFINE_RPMPD_PAIR(msm8953, vddcx, vddcx_ao, SMPA, LEVEL, 2); -DEFINE_RPMPD_PAIR(msm8953, vddmx, vddmx_ao, SMPA, LEVEL, 7); +static struct rpmpd msm8953_vddmd_ao; +static struct rpmpd msm8953_vddmd = { + .pd = { .name = "vddmd", }, + .peer = &msm8953_vddmd_ao, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_LEVEL, +}; -DEFINE_RPMPD_VFL(msm8953, vddcx_vfl, SMPA, 2); +static struct rpmpd msm8953_vddmd_ao = { + .pd = { .name = "vddmd_ao", }, + .peer = &msm8953_vddmd, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_LEVEL, +}; + +static struct rpmpd msm8953_vddcx_ao; +static struct rpmpd msm8953_vddcx = { + .pd = { .name = "vddcx", }, + .peer = &msm8953_vddcx_ao, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_LEVEL, +}; + +static struct rpmpd msm8953_vddcx_ao = { + .pd = { .name = "vddcx_ao", }, + .peer = &msm8953_vddcx, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_LEVEL, +}; + +static struct rpmpd msm8953_vddmx_ao; +static struct rpmpd msm8953_vddmx = { + .pd = { .name = "vddmx", }, + .peer = &msm8953_vddmx_ao, + .res_type = RPMPD_SMPA, + .res_id = 7, + .key = KEY_LEVEL, +}; + +static struct rpmpd msm8953_vddmx_ao = { + .pd = { .name = "vddmx_ao", }, + .peer = &msm8953_vddmx, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 7, + .key = KEY_LEVEL, +}; + +static struct rpmpd msm8953_vddcx_vfl = { + .pd = { .name = "vddcx_vfl", }, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_FLOOR_LEVEL, +}; static struct rpmpd *msm8953_rpmpds[] = { [MSM8953_VDDMD] = &msm8953_vddmd, @@ -226,11 +395,55 @@ static const struct rpmpd_desc msm8953_desc = { }; /* msm8976 RPM Power Domains */ -DEFINE_RPMPD_PAIR(msm8976, vddcx, vddcx_ao, SMPA, LEVEL, 2); -DEFINE_RPMPD_PAIR(msm8976, vddmx, vddmx_ao, SMPA, LEVEL, 6); +static struct rpmpd msm8976_vddcx_ao; +static struct rpmpd msm8976_vddcx = { + .pd = { .name = "vddcx", }, + .peer = &msm8976_vddcx_ao, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_LEVEL, +}; -DEFINE_RPMPD_VFL(msm8976, vddcx_vfl, RWSC, 2); -DEFINE_RPMPD_VFL(msm8976, vddmx_vfl, RWSM, 6); +static struct rpmpd msm8976_vddcx_ao = { + .pd = { .name = "vddcx_ao", }, + .peer = &msm8976_vddcx, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_LEVEL, +}; + +static struct rpmpd msm8976_vddmx_ao; +static struct rpmpd msm8976_vddmx = { + .pd = { .name = "vddmx", }, + .peer = &msm8976_vddmx_ao, + .res_type = RPMPD_SMPA, + .res_id = 6, + .key = KEY_LEVEL, +}; + +static struct rpmpd msm8976_vddmx_ao = { + .pd = { .name = "vddmx_ao", }, + .peer = &msm8976_vddmx, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 6, + .key = KEY_LEVEL, +}; + +static struct rpmpd msm8976_vddcx_vfl = { + .pd = { .name = "vddcx_vfl", }, + .res_type = RPMPD_RWSC, + .res_id = 2, + .key = KEY_FLOOR_LEVEL, +}; + +static struct rpmpd msm8976_vddmx_vfl = { + .pd = { .name = "vddmx_vfl", }, + .res_type = RPMPD_RWSM, + .res_id = 6, + .key = KEY_FLOOR_LEVEL, +}; static struct rpmpd *msm8976_rpmpds[] = { [MSM8976_VDDCX] = &msm8976_vddcx, @@ -248,13 +461,63 @@ static const struct rpmpd_desc msm8976_desc = { }; /* msm8994 RPM Power domains */ -DEFINE_RPMPD_PAIR(msm8994, vddcx, vddcx_ao, SMPA, CORNER, 1); -DEFINE_RPMPD_PAIR(msm8994, vddmx, vddmx_ao, SMPA, CORNER, 2); -/* Attention! *Some* 8994 boards with pm8004 may use SMPC here! */ -DEFINE_RPMPD_CORNER(msm8994, vddgfx, SMPB, 2); +static struct rpmpd msm8994_vddcx_ao; +static struct rpmpd msm8994_vddcx = { + .pd = { .name = "vddcx", }, + .peer = &msm8994_vddcx_ao, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_CORNER, +}; + +static struct rpmpd msm8994_vddcx_ao = { + .pd = { .name = "vddcx_ao", }, + .peer = &msm8994_vddcx, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_CORNER, +}; -DEFINE_RPMPD_VFC(msm8994, vddcx_vfc, SMPA, 1); -DEFINE_RPMPD_VFC(msm8994, vddgfx_vfc, SMPB, 2); +static struct rpmpd msm8994_vddmx_ao; +static struct rpmpd msm8994_vddmx = { + .pd = { .name = "vddmx", }, + .peer = &msm8994_vddmx_ao, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_CORNER, +}; + +static struct rpmpd msm8994_vddmx_ao = { + .pd = { .name = "vddmx_ao", }, + .peer = &msm8994_vddmx, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_CORNER, +}; + +static struct rpmpd msm8994_vddgfx = { + .pd = { .name = "vddgfx", }, + /* SMPC if your board has a PM8004! */ + .res_type = RPMPD_SMPB, + .res_id = 2, + .key = KEY_CORNER, +}; + +static struct rpmpd msm8994_vddcx_vfc = { + .pd = { .name = "vddcx_vfc", }, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_FLOOR_CORNER, +}; + +static struct rpmpd msm8994_vddgfx_vfc = { + .pd = { .name = "vddgfx_vfc", }, + .res_type = RPMPD_SMPB, + .res_id = 2, + .key = KEY_FLOOR_CORNER, +}; static struct rpmpd *msm8994_rpmpds[] = { [MSM8994_VDDCX] = &msm8994_vddcx, @@ -273,12 +536,62 @@ static const struct rpmpd_desc msm8994_desc = { }; /* msm8996 RPM Power domains */ -DEFINE_RPMPD_PAIR(msm8996, vddcx, vddcx_ao, SMPA, CORNER, 1); -DEFINE_RPMPD_PAIR(msm8996, vddmx, vddmx_ao, SMPA, CORNER, 2); -DEFINE_RPMPD_CORNER(msm8996, vddsscx, LDOA, 26); +static struct rpmpd msm8996_vddcx_ao; +static struct rpmpd msm8996_vddcx = { + .pd = { .name = "vddcx", }, + .peer = &msm8996_vddcx_ao, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_CORNER, +}; -DEFINE_RPMPD_VFC(msm8996, vddcx_vfc, SMPA, 1); -DEFINE_RPMPD_VFC(msm8996, vddsscx_vfc, LDOA, 26); +static struct rpmpd msm8996_vddcx_ao = { + .pd = { .name = "vddcx_ao", }, + .peer = &msm8996_vddcx, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_CORNER, +}; + +static struct rpmpd msm8996_vddmx_ao; +static struct rpmpd msm8996_vddmx = { + .pd = { .name = "vddmx", }, + .peer = &msm8996_vddmx_ao, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_CORNER, +}; + +static struct rpmpd msm8996_vddmx_ao = { + .pd = { .name = "vddmx_ao", }, + .peer = &msm8996_vddmx, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_CORNER, +}; + +static struct rpmpd msm8996_vddsscx = { + .pd = { .name = "vddsscx", }, + .res_type = RPMPD_LDOA, + .res_id = 26, + .key = KEY_CORNER, +}; + +static struct rpmpd msm8996_vddcx_vfc = { + .pd = { .name = "vddcx_vfc", }, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_FLOOR_CORNER, +}; + +static struct rpmpd msm8996_vddsscx_vfc = { + .pd = { .name = "vddsscx_vfc", }, + .res_type = RPMPD_LDOA, + .res_id = 26, + .key = KEY_FLOOR_CORNER, +}; static struct rpmpd *msm8996_rpmpds[] = { [MSM8996_VDDCX] = &msm8996_vddcx, @@ -297,17 +610,83 @@ static const struct rpmpd_desc msm8996_desc = { }; /* msm8998 RPM Power domains */ -DEFINE_RPMPD_PAIR(msm8998, vddcx, vddcx_ao, RWCX, LEVEL, 0); -DEFINE_RPMPD_VFL(msm8998, vddcx_vfl, RWCX, 0); +static struct rpmpd msm8998_vddcx_ao; +static struct rpmpd msm8998_vddcx = { + .pd = { .name = "vddcx", }, + .peer = &msm8998_vddcx_ao, + .res_type = RPMPD_RWCX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd msm8998_vddcx_ao = { + .pd = { .name = "vddcx_ao", }, + .peer = &msm8998_vddcx, + .active_only = true, + .res_type = RPMPD_RWCX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd msm8998_vddcx_vfl = { + .pd = { .name = "vddcx_vfl", }, + .res_type = RPMPD_RWCX, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; -DEFINE_RPMPD_PAIR(msm8998, vddmx, vddmx_ao, RWMX, LEVEL, 0); -DEFINE_RPMPD_VFL(msm8998, vddmx_vfl, RWMX, 0); +static struct rpmpd msm8998_vddmx_ao; +static struct rpmpd msm8998_vddmx = { + .pd = { .name = "vddmx", }, + .peer = &msm8998_vddmx_ao, + .res_type = RPMPD_RWMX, + .res_id = 0, + .key = KEY_LEVEL, +}; -DEFINE_RPMPD_LEVEL(msm8998, vdd_ssccx, RWSC, 0); -DEFINE_RPMPD_VFL(msm8998, vdd_ssccx_vfl, RWSC, 0); +static struct rpmpd msm8998_vddmx_ao = { + .pd = { .name = "vddmx_ao", }, + .peer = &msm8998_vddmx, + .active_only = true, + .res_type = RPMPD_RWMX, + .res_id = 0, + .key = KEY_LEVEL, +}; -DEFINE_RPMPD_LEVEL(msm8998, vdd_sscmx, RWSM, 0); -DEFINE_RPMPD_VFL(msm8998, vdd_sscmx_vfl, RWSM, 0); +static struct rpmpd msm8998_vddmx_vfl = { + .pd = { .name = "vddmx_vfl", }, + .res_type = RPMPD_RWMX, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; + +static struct rpmpd msm8998_vdd_ssccx = { + .pd = { .name = "vdd_ssccx", }, + .res_type = RPMPD_RWSC, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd msm8998_vdd_ssccx_vfl = { + .pd = { .name = "vdd_ssccx_vfl", }, + .res_type = RPMPD_RWSC, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; + +static struct rpmpd msm8998_vdd_sscmx = { + .pd = { .name = "vdd_sscmx", }, + .res_type = RPMPD_RWSM, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd msm8998_vdd_sscmx_vfl = { + .pd = { .name = "vdd_sscmx_vfl", }, + .res_type = RPMPD_RWSM, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; static struct rpmpd *msm8998_rpmpds[] = { [MSM8998_VDDCX] = &msm8998_vddcx, @@ -329,14 +708,58 @@ static const struct rpmpd_desc msm8998_desc = { }; /* qcs404 RPM Power domains */ -DEFINE_RPMPD_PAIR(qcs404, vddmx, vddmx_ao, RWMX, LEVEL, 0); -DEFINE_RPMPD_VFL(qcs404, vddmx_vfl, RWMX, 0); +static struct rpmpd qcs404_vddmx_ao; +static struct rpmpd qcs404_vddmx = { + .pd = { .name = "vddmx", }, + .peer = &qcs404_vddmx_ao, + .res_type = RPMPD_RWMX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd qcs404_vddmx_ao = { + .pd = { .name = "vddmx_ao", }, + .peer = &qcs404_vddmx, + .active_only = true, + .res_type = RPMPD_RWMX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd qcs404_vddmx_vfl = { + .pd = { .name = "vddmx_vfl", }, + .res_type = RPMPD_RWMX, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; + +static struct rpmpd qcs404_vdd_lpicx = { + .pd = { .name = "vdd_lpicx", }, + .res_type = RPMPD_RWLC, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd qcs404_vdd_lpicx_vfl = { + .pd = { .name = "vdd_lpicx_vfl", }, + .res_type = RPMPD_RWLC, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; -DEFINE_RPMPD_LEVEL(qcs404, vdd_lpicx, RWLC, 0); -DEFINE_RPMPD_VFL(qcs404, vdd_lpicx_vfl, RWLC, 0); +static struct rpmpd qcs404_vdd_lpimx = { + .pd = { .name = "vdd_lpimx", }, + .res_type = RPMPD_RWLM, + .res_id = 0, + .key = KEY_LEVEL, +}; -DEFINE_RPMPD_LEVEL(qcs404, vdd_lpimx, RWLM, 0); -DEFINE_RPMPD_VFL(qcs404, vdd_lpimx_vfl, RWLM, 0); +static struct rpmpd qcs404_vdd_lpimx_vfl = { + .pd = { .name = "vdd_lpimx_vfl", }, + .res_type = RPMPD_RWLM, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; static struct rpmpd *qcs404_rpmpds[] = { [QCS404_VDDMX] = &qcs404_vddmx, @@ -355,17 +778,83 @@ static const struct rpmpd_desc qcs404_desc = { }; /* sdm660 RPM Power domains */ -DEFINE_RPMPD_PAIR(sdm660, vddcx, vddcx_ao, RWCX, LEVEL, 0); -DEFINE_RPMPD_VFL(sdm660, vddcx_vfl, RWCX, 0); +static struct rpmpd sdm660_vddcx_ao; +static struct rpmpd sdm660_vddcx = { + .pd = { .name = "vddcx", }, + .peer = &sdm660_vddcx_ao, + .res_type = RPMPD_RWCX, + .res_id = 0, + .key = KEY_LEVEL, +}; -DEFINE_RPMPD_PAIR(sdm660, vddmx, vddmx_ao, RWMX, LEVEL, 0); -DEFINE_RPMPD_VFL(sdm660, vddmx_vfl, RWMX, 0); +static struct rpmpd sdm660_vddcx_ao = { + .pd = { .name = "vddcx_ao", }, + .peer = &sdm660_vddcx, + .active_only = true, + .res_type = RPMPD_RWCX, + .res_id = 0, + .key = KEY_LEVEL, +}; -DEFINE_RPMPD_LEVEL(sdm660, vdd_ssccx, RWLC, 0); -DEFINE_RPMPD_VFL(sdm660, vdd_ssccx_vfl, RWLC, 0); +static struct rpmpd sdm660_vddcx_vfl = { + .pd = { .name = "vddcx_vfl", }, + .res_type = RPMPD_RWCX, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; -DEFINE_RPMPD_LEVEL(sdm660, vdd_sscmx, RWLM, 0); -DEFINE_RPMPD_VFL(sdm660, vdd_sscmx_vfl, RWLM, 0); +static struct rpmpd sdm660_vddmx_ao; +static struct rpmpd sdm660_vddmx = { + .pd = { .name = "vddmx", }, + .peer = &sdm660_vddmx_ao, + .res_type = RPMPD_RWMX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd sdm660_vddmx_ao = { + .pd = { .name = "vddmx_ao", }, + .peer = &sdm660_vddmx, + .active_only = true, + .res_type = RPMPD_RWMX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd sdm660_vddmx_vfl = { + .pd = { .name = "vddmx_vfl", }, + .res_type = RPMPD_RWMX, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; + +static struct rpmpd sdm660_vdd_ssccx = { + .pd = { .name = "vdd_ssccx", }, + .res_type = RPMPD_RWLC, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd sdm660_vdd_ssccx_vfl = { + .pd = { .name = "vdd_ssccx_vfl", }, + .res_type = RPMPD_RWLC, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; + +static struct rpmpd sdm660_vdd_sscmx = { + .pd = { .name = "vdd_sscmx", }, + .res_type = RPMPD_RWLM, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd sdm660_vdd_sscmx_vfl = { + .pd = { .name = "vdd_sscmx_vfl", }, + .res_type = RPMPD_RWLM, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; static struct rpmpd *sdm660_rpmpds[] = { [SDM660_VDDCX] = &sdm660_vddcx, @@ -387,14 +876,69 @@ static const struct rpmpd_desc sdm660_desc = { }; /* sm4250/6115 RPM Power domains */ -DEFINE_RPMPD_PAIR(sm6115, vddcx, vddcx_ao, RWCX, LEVEL, 0); -DEFINE_RPMPD_VFL(sm6115, vddcx_vfl, RWCX, 0); +static struct rpmpd sm6115_vddcx_ao; +static struct rpmpd sm6115_vddcx = { + .pd = { .name = "vddcx", }, + .peer = &sm6115_vddcx_ao, + .res_type = RPMPD_RWCX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd sm6115_vddcx_ao = { + .pd = { .name = "vddcx_ao", }, + .peer = &sm6115_vddcx, + .active_only = true, + .res_type = RPMPD_RWCX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd sm6115_vddcx_vfl = { + .pd = { .name = "vddcx_vfl", }, + .res_type = RPMPD_RWCX, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; + +static struct rpmpd sm6115_vddmx_ao; +static struct rpmpd sm6115_vddmx = { + .pd = { .name = "vddmx", }, + .peer = &sm6115_vddmx_ao, + .res_type = RPMPD_RWMX, + .res_id = 0, + .key = KEY_LEVEL, +}; -DEFINE_RPMPD_PAIR(sm6115, vddmx, vddmx_ao, RWMX, LEVEL, 0); -DEFINE_RPMPD_VFL(sm6115, vddmx_vfl, RWMX, 0); +static struct rpmpd sm6115_vddmx_ao = { + .pd = { .name = "vddmx_ao", }, + .peer = &sm6115_vddmx, + .active_only = true, + .res_type = RPMPD_RWMX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd sm6115_vddmx_vfl = { + .pd = { .name = "vddmx_vfl", }, + .res_type = RPMPD_RWMX, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; + +static struct rpmpd sm6115_vdd_lpi_cx = { + .pd = { .name = "vdd_lpi_cx", }, + .res_type = RPMPD_RWLC, + .res_id = 0, + .key = KEY_LEVEL, +}; -DEFINE_RPMPD_LEVEL(sm6115, vdd_lpi_cx, RWLC, 0); -DEFINE_RPMPD_LEVEL(sm6115, vdd_lpi_mx, RWLM, 0); +static struct rpmpd sm6115_vdd_lpi_mx = { + .pd = { .name = "vdd_lpi_mx", }, + .res_type = RPMPD_RWLM, + .res_id = 0, + .key = KEY_LEVEL, +}; static struct rpmpd *sm6115_rpmpds[] = { [SM6115_VDDCX] = &sm6115_vddcx, @@ -414,11 +958,55 @@ static const struct rpmpd_desc sm6115_desc = { }; /* sm6125 RPM Power domains */ -DEFINE_RPMPD_PAIR(sm6125, vddcx, vddcx_ao, RWCX, LEVEL, 0); -DEFINE_RPMPD_VFL(sm6125, vddcx_vfl, RWCX, 0); +static struct rpmpd sm6125_vddcx_ao; +static struct rpmpd sm6125_vddcx = { + .pd = { .name = "vddcx", }, + .peer = &sm6125_vddcx_ao, + .res_type = RPMPD_RWCX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd sm6125_vddcx_ao = { + .pd = { .name = "vddcx_ao", }, + .peer = &sm6125_vddcx, + .active_only = true, + .res_type = RPMPD_RWCX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd sm6125_vddcx_vfl = { + .pd = { .name = "vddcx_vfl", }, + .res_type = RPMPD_RWCX, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; + +static struct rpmpd sm6125_vddmx_ao; +static struct rpmpd sm6125_vddmx = { + .pd = { .name = "vddmx", }, + .peer = &sm6125_vddmx_ao, + .res_type = RPMPD_RWMX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd sm6125_vddmx_ao = { + .pd = { .name = "vddmx_ao", }, + .peer = &sm6125_vddmx, + .active_only = true, + .res_type = RPMPD_RWMX, + .res_id = 0, + .key = KEY_LEVEL, +}; -DEFINE_RPMPD_PAIR(sm6125, vddmx, vddmx_ao, RWMX, LEVEL, 0); -DEFINE_RPMPD_VFL(sm6125, vddmx_vfl, RWMX, 0); +static struct rpmpd sm6125_vddmx_vfl = { + .pd = { .name = "vddmx_vfl", }, + .res_type = RPMPD_RWMX, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; static struct rpmpd *sm6125_rpmpds[] = { [SM6125_VDDCX] = &sm6125_vddcx, @@ -435,7 +1023,24 @@ static const struct rpmpd_desc sm6125_desc = { .max_state = RPM_SMD_LEVEL_BINNING, }; -DEFINE_RPMPD_PAIR(sm6375, vddgx, vddgx_ao, RWGX, LEVEL, 0); +static struct rpmpd sm6375_vddgx_ao; +static struct rpmpd sm6375_vddgx = { + .pd = { .name = "vddgx", }, + .peer = &sm6375_vddgx_ao, + .res_type = RPMPD_RWGX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd sm6375_vddgx_ao = { + .pd = { .name = "vddgx_ao", }, + .peer = &sm6375_vddgx, + .active_only = true, + .res_type = RPMPD_RWGX, + .res_id = 0, + .key = KEY_LEVEL, +}; + static struct rpmpd *sm6375_rpmpds[] = { [SM6375_VDDCX] = &sm6125_vddcx, [SM6375_VDDCX_AO] = &sm6125_vddcx_ao, From patchwork Wed Jan 25 03:27:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 48006 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp72193wrn; Tue, 24 Jan 2023 19:28:55 -0800 (PST) X-Google-Smtp-Source: AMrXdXvqJtEMI4H0mDViL/wlFJ7/EdlCs9+Mbgzu1yFRT+ajrbrSL7WrmoTnFJiGYiDW01K1xs0v X-Received: by 2002:a05:6a20:7528:b0:b0:3329:c395 with SMTP id r40-20020a056a20752800b000b03329c395mr48691543pzd.30.1674617335012; Tue, 24 Jan 2023 19:28:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674617334; cv=none; d=google.com; s=arc-20160816; b=PPDb2CRMfxJykgOZ0IP3+Mb5cUEPqM4oQnmlca8B5glsSNoNUKg0NPzT/EDEvISFs3 pC9tPKBXrrfAX2I139KdIqHRiyPCIV9bCziAZ75BDQLjAqQ1u5xXoAy9JU8RiiRlIrCe NN5pGJY5NRy0+jGxrVs1yJGhmzFadk6yKJrR2IO1jdT/E288Yc1XixEBFnpZWAdiAEsT 5hhQvbWjHgSoKpzJ4b6cRx1gSyTMmHyrVxoBZbyqSHOKCgUFG/3sJapnH4fTQgsAF1zC bxHpI59KBsIR5In4ej9Mb5XGJn8bOU3ylhCenhq67wORZy0T9/X4vbM1VkY7MPN3SLMi 6rjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2Of7NFsGJ6dqGAjsUeQwxEV3rt7jMOtlUZ9VhdQEQa0=; b=CF5m72Y9/9zavGi2QKKnbJ6IMWYaRSFOKgoOT78lTfyeQqjxn/bhKSffYbgGaJRKj2 327IdVlD0Rod/gDBoaw18jYtkmW1W39dE467qmKPZC7bGE0CzsFIOoBSUt9+vljR7L7I kASfaPlBkb4O/RNSyJ18HjUEDuEsxcaDdVX9RT7TUSqblAYyQbrkWewhXqsK93pbb+oF z8L0E+VVonkWi1aByIdNQm/h0hC2QAyPGaOv4t8kHot0J0TfUQKSzh1tBd+SDBWdQOJz JMN8YuTDWKDFQlaPt7MHtbYasWmGWWPyrULEfF4uj7/tuKnQFk0mb7awrHK7xeydtQri sK6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Vv+YWq/Z"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c191-20020a6335c8000000b004ce5301ee08si3829485pga.346.2023.01.24.19.28.43; Tue, 24 Jan 2023 19:28:54 -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; dkim=pass header.i=@linaro.org header.s=google header.b="Vv+YWq/Z"; 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 S231820AbjAYD1v (ORCPT + 99 others); Tue, 24 Jan 2023 22:27:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233726AbjAYD1r (ORCPT ); Tue, 24 Jan 2023 22:27:47 -0500 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87CC353B09 for ; Tue, 24 Jan 2023 19:27:40 -0800 (PST) Received: by mail-ej1-x62d.google.com with SMTP id tz11so44278522ejc.0 for ; Tue, 24 Jan 2023 19:27:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2Of7NFsGJ6dqGAjsUeQwxEV3rt7jMOtlUZ9VhdQEQa0=; b=Vv+YWq/ZLFVwSUmGldNof4VhE0eGro5/FYUfbdQp9oHRQMSTGpyRi7XyZcKkzyv+/Y dbbQDNCuEKlLyLWgsTtsWPCbQjm0XoOlqZyRtcAJHrItxG3lYZxsuJxgZrUXnV+ivWNg MQH2+IVLmToBIoxK3QJ/rJb0CJyQ2+a/lxFGRi4e7mQCin0/A+0Zc16HuATJ2Yetz3Jf JMOilzuS3jdBmOH56RIjVdT6Nf4X6SBL3R9tLSSoTZ78Joy18RPiqTS3bXFzyOWJOpYQ 8+OUi6pbPGqrKFsZf912X3b71bnfBGYdbIRrXdkNz+RRCLY28Bz9MG/TjqDa7Bu6BQnQ nhQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2Of7NFsGJ6dqGAjsUeQwxEV3rt7jMOtlUZ9VhdQEQa0=; b=sWFLg5CJbAVDV6Yjw+Vuc4Nm1pp1LVLA29HPlh2NXT+vY87DPlJmCSGvGYEzQzNs11 /THcOmij724ciJaGa172MLMx7sg54j0V/fNYH0Nzvt//tPjnr0gAB+v+H5F34gBmCM2p KZVtZjrQF8GDKsN+UOC7bI7gkpgWDuWqg//i2K6dwfPk0pdfyYKmfiX6ZJjWL8FvY7Vd 2SREkHbx4fdqFsqLzzQtgbHsC/WY1/sIIZBOxvUQRFWRvNhWmxtZOlvnSXpXGRw0NxT0 o0y/U5Av8sZ+OeeESmvVR07w1vdIvgdGT+Cf5k4dtCJgZVq9Q8Mzqhv1c2+lbGvwAqY9 nasQ== X-Gm-Message-State: AFqh2kpNMwVUpx2PMKRj+nXRy7Bd5soIhMBJDx9yUxHdlRz2h4QyAYnk +ykieYRrC64d7yjwxeZDcwbEjg== X-Received: by 2002:a17:906:fb0d:b0:856:6884:675f with SMTP id lz13-20020a170906fb0d00b008566884675fmr32733146ejb.52.1674617256106; Tue, 24 Jan 2023 19:27:36 -0800 (PST) Received: from localhost.localdomain (abyl109.neoplus.adsl.tpnet.pl. [83.9.31.109]) by smtp.gmail.com with ESMTPSA id if10-20020a170906df4a00b00738795e7d9bsm1742913ejc.2.2023.01.24.19.27.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 19:27:35 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , linux-kernel@vger.kernel.org Subject: [PATCH 3/7] soc: qcom: rpmpd: Hook up VDDMX as parent of SM6375 VDDGX Date: Wed, 25 Jan 2023 04:27:24 +0100 Message-Id: <20230125032728.611640-4-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230125032728.611640-1-konrad.dybcio@linaro.org> References: <20230125032728.611640-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755963546909517201?= X-GMAIL-MSGID: =?utf-8?q?1755963546909517201?= The GPU core clock requires that both VDDGX and VDDMX domains are scaled at the same rate at the same time (well, MX just before GX but you get the idea). Set MX as parent of GX to take care of that. Suggested-by: Bjorn Andersson Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- drivers/soc/qcom/rpmpd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 9a7da7cead9e..a69182618b76 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -1027,6 +1027,7 @@ static struct rpmpd sm6375_vddgx_ao; static struct rpmpd sm6375_vddgx = { .pd = { .name = "vddgx", }, .peer = &sm6375_vddgx_ao, + .parent = &sm6125_vddmx.pd, .res_type = RPMPD_RWGX, .res_id = 0, .key = KEY_LEVEL, @@ -1035,6 +1036,7 @@ static struct rpmpd sm6375_vddgx = { static struct rpmpd sm6375_vddgx_ao = { .pd = { .name = "vddgx_ao", }, .peer = &sm6375_vddgx, + .parent = &sm6125_vddmx_ao.pd, .active_only = true, .res_type = RPMPD_RWGX, .res_id = 0, From patchwork Wed Jan 25 03:27:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 48005 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp72103wrn; Tue, 24 Jan 2023 19:28:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXsTAFOL/w+Y9KVsXlS0lwFl146nf9ulAD0vkfjPkpLtwUjAOpAGLGZ3j27e6oVkioZUW8HF X-Received: by 2002:a17:90b:1e4b:b0:229:ff05:691a with SMTP id pi11-20020a17090b1e4b00b00229ff05691amr20067304pjb.16.1674617315650; Tue, 24 Jan 2023 19:28:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674617315; cv=none; d=google.com; s=arc-20160816; b=qV0OVD0tCEedzDIjZupI0YODVsn0/M2yHdAN4ZqqizSqa0cSFvNoKhpx/fTDlWbjXv h6RYm+wYb/uzvsgAA7v+zDje9OzsNf3sKCoPt29GTz5Dwdnm3yZcoT55U1stOvpHFmPL 2EXOb3hcq6tIhmPk8ta9LukxYYteksj2i3swcAf1AAAKp9W5JM6cVW+TR4cwUwdfAXxU ypmqSnrEhTqlEM0Ab8wPYeKq2l+r/0NoLEWoVN/0G3X+xfX3hHI8ih3qjpva+C2vxt6g 6FOcYGwyu9BV7+DAKS+Ovpimx/l4XAAF266cRlYbK3j7T/PhP97VHKBbrioSJQgAv8j0 /DYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SR995snuzFHld7ypW6pWZp9O+QjcVlZ4GzQp0k1XQaM=; b=ZJ3YNK06uHahSbDrT77BaOE4YqACElfP8MQq2aKPBg3eDntaPV5rIRwqmW6AfPvDqP LpX0052l+GltIJsMWYAt7KqkGCD8jb6e+4Xjd0vKlFvfAjCT51/mqmAqOBJv2uX4OCtp Ql/8inxz2pjuUTQO2fGVGDFDadbmcpb5CvhrkC21WEs4BmCKCXv2laDQxmuxQs4H3uOt KxdKlVpoN0g2pouhm44irRdjOUpP6bJVb46qRnXnXWJfQgDR05hMlzdeYqhdlXSiyenu MmGOfo/LsDKjlxHIqt1RckgektCCFmNd5g5hthXqYzMh75anllAzCztp05C2qDuv/u1v QFkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xe3ltG+F; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s7-20020a637707000000b00479503041c4si4507903pgc.368.2023.01.24.19.28.23; Tue, 24 Jan 2023 19:28:35 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Xe3ltG+F; 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 S234119AbjAYD1s (ORCPT + 99 others); Tue, 24 Jan 2023 22:27:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234005AbjAYD1p (ORCPT ); Tue, 24 Jan 2023 22:27:45 -0500 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF4A4539AB for ; Tue, 24 Jan 2023 19:27:39 -0800 (PST) Received: by mail-ej1-x633.google.com with SMTP id v6so44215382ejg.6 for ; Tue, 24 Jan 2023 19:27:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SR995snuzFHld7ypW6pWZp9O+QjcVlZ4GzQp0k1XQaM=; b=Xe3ltG+FG12mg5TDSwxiKKO7zmMWfkimUkqs+Bv/yW1FIDK3NPR2ayGmlSD7Xn66ki h3Z3V2SJc3uf6PtlELXm5CV25Wx4LbH8D0UjJmt0m3OKmnEicFY9jspMiaFTrdDaWQ6W 2OEtEmH4yyqubpaBOl/Pv/Mp1O1qHksGfSZJJo7XIQW2Jbos/IzAf+vKZlQk0MyZgshQ +3gyPdHxy43wkNLZu9WywUL7vyXgI05GvVGV5g/FMaoHf1J0AOoShJcVRcEPUAYcnXD1 kLraNkbh4RWpoQ4oFEnTSjNRLKY0xQGo5T5hIsDhKDNBJSv/9ZXvCEgbPUAN1h6y4j8p 2bmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SR995snuzFHld7ypW6pWZp9O+QjcVlZ4GzQp0k1XQaM=; b=SSrYdh0fI1oC0AyIFZN9Y7UbomC3LFKpkdhw8gbHOR6qDZZz9yLNgRH0/kfTxx7ds0 Bbqs/pmiuih5epu73tMbtsljJzs6kfPRRyHmoLUPjW91H009wKRrTeN+mX4DjNitocAr 9Ir8uowcL5cLJ6EhrjtgzbEYY/9kAa115ax96OEitbO0Au6G3VfWEQz0vefXBtn5Pc6s TTgtdMtDFZc6EoySz/ZCQh9t57bv8YPFqZfMqnfJXYi/udnHNmeGNT9Sb7QUksJbYOXX of9U5+Tn7zC0wZztnCFAIzugMQjMydU2OwNSw9z/C6ndi0vCEFj61t2ujXsdntKtyXvH P+Tg== X-Gm-Message-State: AFqh2kqPMg41oXk28feqiHAmUDO1C5F44pNTyvnqVb8QkUkiQuGccGlS w26jno7rkW/UMU7c/WxHpxT+9g== X-Received: by 2002:a17:907:c70f:b0:871:d04e:1df with SMTP id ty15-20020a170907c70f00b00871d04e01dfmr37912147ejc.29.1674617258142; Tue, 24 Jan 2023 19:27:38 -0800 (PST) Received: from localhost.localdomain (abyl109.neoplus.adsl.tpnet.pl. [83.9.31.109]) by smtp.gmail.com with ESMTPSA id if10-20020a170906df4a00b00738795e7d9bsm1742913ejc.2.2023.01.24.19.27.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 19:27:37 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , linux-kernel@vger.kernel.org Subject: [PATCH 4/7] soc: qcom: rpmpd: Remove SoC names from RPMPD names Date: Wed, 25 Jan 2023 04:27:25 +0100 Message-Id: <20230125032728.611640-5-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230125032728.611640-1-konrad.dybcio@linaro.org> References: <20230125032728.611640-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755963526492446283?= X-GMAIL-MSGID: =?utf-8?q?1755963526492446283?= SoC names were used only to distinguish between defines. That made reusing them messy and often times, the same RPM power domains were defined multiple times. Assign descriptive, SoC-independent names to each RPMPD description struct and remove duplicate definitions. Bloat-o-meter results: Total: Before=133713, After=74201, chg -44.51% Signed-off-by: Konrad Dybcio --- drivers/soc/qcom/rpmpd.c | 763 +++++++++++---------------------------- 1 file changed, 205 insertions(+), 558 deletions(-) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index a69182618b76..9fff40527f9e 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -69,50 +69,50 @@ struct rpmpd_desc { static DEFINE_MUTEX(rpmpd_lock); /* mdm9607 RPM Power Domains */ -static struct rpmpd mdm9607_vddcx_ao; -static struct rpmpd mdm9607_vddcx = { +static struct rpmpd cx_s3a_lvl_ao; +static struct rpmpd cx_s3a_lvl = { .pd = { .name = "vddcx", }, - .peer = &mdm9607_vddcx_ao, + .peer = &cx_s3a_lvl_ao, .res_type = RPMPD_SMPA, .res_id = 3, .key = KEY_LEVEL, }; -static struct rpmpd mdm9607_vddcx_ao = { +static struct rpmpd cx_s3a_lvl_ao = { .pd = { .name = "vddcx_ao", }, - .peer = &mdm9607_vddcx, + .peer = &cx_s3a_lvl, .active_only = true, .res_type = RPMPD_SMPA, .res_id = 3, .key = KEY_LEVEL, }; -static struct rpmpd mdm9607_vddcx_vfl = { +static struct rpmpd cx_s3a_lvl_vfl = { .pd = { .name = "vddcx_vfl", }, .res_type = RPMPD_SMPA, .res_id = 3, .key = KEY_FLOOR_LEVEL, }; -static struct rpmpd mdm9607_vddmx_ao; -static struct rpmpd mdm9607_vddmx = { +static struct rpmpd mx_l12a_lvl_ao; +static struct rpmpd mx_l12a_lvl = { .pd = { .name = "vddmx", }, - .peer = &mdm9607_vddmx_ao, + .peer = &mx_l12a_lvl_ao, .res_type = RPMPD_LDOA, .res_id = 12, .key = KEY_LEVEL, }; -static struct rpmpd mdm9607_vddmx_ao = { +static struct rpmpd mx_l12a_lvl_ao = { .pd = { .name = "vddmx_ao", }, - .peer = &mdm9607_vddmx, + .peer = &mx_l12a_lvl, .active_only = true, .res_type = RPMPD_LDOA, .res_id = 12, .key = KEY_LEVEL, }; -static struct rpmpd mdm9607_vddmx_vfl = { +static struct rpmpd mx_l12a_lvl_vfl = { .pd = { .name = "vddmx_vfl", }, .res_type = RPMPD_LDOA, .res_id = 12, @@ -120,12 +120,12 @@ static struct rpmpd mdm9607_vddmx_vfl = { }; static struct rpmpd *mdm9607_rpmpds[] = { - [MDM9607_VDDCX] = &mdm9607_vddcx, - [MDM9607_VDDCX_AO] = &mdm9607_vddcx_ao, - [MDM9607_VDDCX_VFL] = &mdm9607_vddcx_vfl, - [MDM9607_VDDMX] = &mdm9607_vddmx, - [MDM9607_VDDMX_AO] = &mdm9607_vddmx_ao, - [MDM9607_VDDMX_VFL] = &mdm9607_vddmx_vfl, + [MDM9607_VDDCX] = &cx_s3a_lvl, + [MDM9607_VDDCX_AO] = &cx_s3a_lvl_ao, + [MDM9607_VDDCX_VFL] = &cx_s3a_lvl_vfl, + [MDM9607_VDDMX] = &mx_l12a_lvl, + [MDM9607_VDDMX_AO] = &mx_l12a_lvl_ao, + [MDM9607_VDDMX_VFL] = &mx_l12a_lvl_vfl, }; static const struct rpmpd_desc mdm9607_desc = { @@ -135,25 +135,25 @@ static const struct rpmpd_desc mdm9607_desc = { }; /* msm8226 RPM Power Domains */ -static struct rpmpd msm8226_vddcx_ao; -static struct rpmpd msm8226_vddcx = { +static struct rpmpd cx_s1a_corner_ao; +static struct rpmpd cx_s1a_corner = { .pd = { .name = "vddcx", }, - .peer = &msm8226_vddcx_ao, + .peer = &cx_s1a_corner_ao, .res_type = RPMPD_SMPA, .res_id = 1, .key = KEY_CORNER, }; -static struct rpmpd msm8226_vddcx_ao = { +static struct rpmpd cx_s1a_corner_ao = { .pd = { .name = "vddcx_ao", }, - .peer = &msm8226_vddcx, + .peer = &cx_s1a_corner, .active_only = true, .res_type = RPMPD_SMPA, .res_id = 1, .key = KEY_CORNER, }; -static struct rpmpd msm8226_vddcx_vfc = { +static struct rpmpd cx_s1a_corner_vfc = { .pd = { .name = "vddcx_vfc", }, .res_type = RPMPD_SMPA, .res_id = 1, @@ -161,9 +161,9 @@ static struct rpmpd msm8226_vddcx_vfc = { }; static struct rpmpd *msm8226_rpmpds[] = { - [MSM8226_VDDCX] = &msm8226_vddcx, - [MSM8226_VDDCX_AO] = &msm8226_vddcx_ao, - [MSM8226_VDDCX_VFC] = &msm8226_vddcx_vfc, + [MSM8226_VDDCX] = &cx_s1a_corner, + [MSM8226_VDDCX_AO] = &cx_s1a_corner_ao, + [MSM8226_VDDCX_VFC] = &cx_s1a_corner_vfc, }; static const struct rpmpd_desc msm8226_desc = { @@ -173,68 +173,68 @@ static const struct rpmpd_desc msm8226_desc = { }; /* msm8939 RPM Power Domains */ -static struct rpmpd msm8939_vddmd_ao; -static struct rpmpd msm8939_vddmd = { +static struct rpmpd md_s1a_corner_ao; +static struct rpmpd md_s1a_corner = { .pd = { .name = "vddmd", }, - .peer = &msm8939_vddmd_ao, + .peer = &md_s1a_corner_ao, .res_type = RPMPD_SMPA, .res_id = 1, .key = KEY_CORNER, }; -static struct rpmpd msm8939_vddmd_ao = { +static struct rpmpd md_s1a_corner_ao = { .pd = { .name = "vddmd_ao", }, - .peer = &msm8939_vddmd, + .peer = &md_s1a_corner, .active_only = true, .res_type = RPMPD_SMPA, .res_id = 1, .key = KEY_CORNER, }; -static struct rpmpd msm8939_vddmd_vfc = { +static struct rpmpd md_s1a_corner_vfc = { .pd = { .name = "vddmd_vfc", }, .res_type = RPMPD_SMPA, .res_id = 1, .key = KEY_FLOOR_CORNER, }; -static struct rpmpd msm8939_vddcx_ao; -static struct rpmpd msm8939_vddcx = { +static struct rpmpd cx_s2a_corner_ao; +static struct rpmpd cx_s2a_corner = { .pd = { .name = "vddcx", }, - .peer = &msm8939_vddcx_ao, + .peer = &cx_s2a_corner_ao, .res_type = RPMPD_SMPA, .res_id = 2, .key = KEY_CORNER, }; -static struct rpmpd msm8939_vddcx_ao = { +static struct rpmpd cx_s2a_corner_ao = { .pd = { .name = "vddcx_ao", }, - .peer = &msm8939_vddcx, + .peer = &cx_s2a_corner, .active_only = true, .res_type = RPMPD_SMPA, .res_id = 2, .key = KEY_CORNER, }; -static struct rpmpd msm8939_vddcx_vfc = { +static struct rpmpd cx_s2a_corner_vfc = { .pd = { .name = "vddcx_vfc", }, .res_type = RPMPD_SMPA, .res_id = 2, .key = KEY_FLOOR_CORNER, }; -static struct rpmpd msm8939_vddmx_ao; -static struct rpmpd msm8939_vddmx = { +static struct rpmpd mx_l3a_corner_ao; +static struct rpmpd mx_l3a_corner = { .pd = { .name = "vddmx", }, - .peer = &msm8939_vddmx_ao, + .peer = &mx_l3a_corner_ao, .res_type = RPMPD_LDOA, .res_id = 3, .key = KEY_CORNER, }; -static struct rpmpd msm8939_vddmx_ao = { +static struct rpmpd mx_l3a_corner_ao = { .pd = { .name = "vddmx_ao", }, - .peer = &msm8939_vddmx, + .peer = &mx_l3a_corner, .active_only = true, .res_type = RPMPD_LDOA, .res_id = 3, @@ -242,14 +242,14 @@ static struct rpmpd msm8939_vddmx_ao = { }; static struct rpmpd *msm8939_rpmpds[] = { - [MSM8939_VDDMDCX] = &msm8939_vddmd, - [MSM8939_VDDMDCX_AO] = &msm8939_vddmd_ao, - [MSM8939_VDDMDCX_VFC] = &msm8939_vddmd_vfc, - [MSM8939_VDDCX] = &msm8939_vddcx, - [MSM8939_VDDCX_AO] = &msm8939_vddcx_ao, - [MSM8939_VDDCX_VFC] = &msm8939_vddcx_vfc, - [MSM8939_VDDMX] = &msm8939_vddmx, - [MSM8939_VDDMX_AO] = &msm8939_vddmx_ao, + [MSM8939_VDDMDCX] = &md_s1a_corner, + [MSM8939_VDDMDCX_AO] = &md_s1a_corner_ao, + [MSM8939_VDDMDCX_VFC] = &md_s1a_corner_vfc, + [MSM8939_VDDCX] = &cx_s2a_corner, + [MSM8939_VDDCX_AO] = &cx_s2a_corner_ao, + [MSM8939_VDDCX_VFC] = &cx_s2a_corner_vfc, + [MSM8939_VDDMX] = &mx_l3a_corner, + [MSM8939_VDDMX_AO] = &mx_l3a_corner_ao, }; static const struct rpmpd_desc msm8939_desc = { @@ -259,55 +259,12 @@ static const struct rpmpd_desc msm8939_desc = { }; /* msm8916 RPM Power Domains */ -static struct rpmpd msm8916_vddcx_ao; -static struct rpmpd msm8916_vddcx = { - .pd = { .name = "vddcx", }, - .peer = &msm8916_vddcx_ao, - .res_type = RPMPD_SMPA, - .res_id = 1, - .key = KEY_CORNER, -}; - -static struct rpmpd msm8916_vddcx_ao = { - .pd = { .name = "vddcx_ao", }, - .peer = &msm8916_vddcx, - .active_only = true, - .res_type = RPMPD_SMPA, - .res_id = 1, - .key = KEY_CORNER, -}; - -static struct rpmpd msm8916_vddmx_ao; -static struct rpmpd msm8916_vddmx = { - .pd = { .name = "vddmx", }, - .peer = &msm8916_vddmx_ao, - .res_type = RPMPD_LDOA, - .res_id = 3, - .key = KEY_CORNER, -}; - -static struct rpmpd msm8916_vddmx_ao = { - .pd = { .name = "vddmx_ao", }, - .peer = &msm8916_vddmx, - .active_only = true, - .res_type = RPMPD_LDOA, - .res_id = 3, - .key = KEY_CORNER, -}; - -static struct rpmpd msm8916_vddcx_vfc = { - .pd = { .name = "vddcx_vfc", }, - .res_type = RPMPD_SMPA, - .res_id = 1, - .key = KEY_FLOOR_CORNER, -}; - static struct rpmpd *msm8916_rpmpds[] = { - [MSM8916_VDDCX] = &msm8916_vddcx, - [MSM8916_VDDCX_AO] = &msm8916_vddcx_ao, - [MSM8916_VDDCX_VFC] = &msm8916_vddcx_vfc, - [MSM8916_VDDMX] = &msm8916_vddmx, - [MSM8916_VDDMX_AO] = &msm8916_vddmx_ao, + [MSM8916_VDDCX] = &cx_s1a_corner, + [MSM8916_VDDCX_AO] = &cx_s1a_corner_ao, + [MSM8916_VDDCX_VFC] = &cx_s1a_corner_vfc, + [MSM8916_VDDMX] = &mx_l3a_corner, + [MSM8916_VDDMX_AO] = &mx_l3a_corner_ao, }; static const struct rpmpd_desc msm8916_desc = { @@ -317,61 +274,61 @@ static const struct rpmpd_desc msm8916_desc = { }; /* msm8953 RPM Power Domains */ -static struct rpmpd msm8953_vddmd_ao; -static struct rpmpd msm8953_vddmd = { +static struct rpmpd md_s1a_lvl_ao; +static struct rpmpd md_s1a_lvl = { .pd = { .name = "vddmd", }, - .peer = &msm8953_vddmd_ao, + .peer = &md_s1a_lvl_ao, .res_type = RPMPD_SMPA, .res_id = 1, .key = KEY_LEVEL, }; -static struct rpmpd msm8953_vddmd_ao = { +static struct rpmpd md_s1a_lvl_ao = { .pd = { .name = "vddmd_ao", }, - .peer = &msm8953_vddmd, + .peer = &md_s1a_lvl, .active_only = true, .res_type = RPMPD_SMPA, .res_id = 1, .key = KEY_LEVEL, }; -static struct rpmpd msm8953_vddcx_ao; -static struct rpmpd msm8953_vddcx = { +static struct rpmpd cx_s2a_lvl_ao; +static struct rpmpd cx_s2a_lvl = { .pd = { .name = "vddcx", }, - .peer = &msm8953_vddcx_ao, + .peer = &cx_s2a_lvl_ao, .res_type = RPMPD_SMPA, .res_id = 2, .key = KEY_LEVEL, }; -static struct rpmpd msm8953_vddcx_ao = { +static struct rpmpd cx_s2a_lvl_ao = { .pd = { .name = "vddcx_ao", }, - .peer = &msm8953_vddcx, + .peer = &cx_s2a_lvl, .active_only = true, .res_type = RPMPD_SMPA, .res_id = 2, .key = KEY_LEVEL, }; -static struct rpmpd msm8953_vddmx_ao; -static struct rpmpd msm8953_vddmx = { +static struct rpmpd mx_s7a_lvl_ao; +static struct rpmpd mx_s7a_lvl = { .pd = { .name = "vddmx", }, - .peer = &msm8953_vddmx_ao, + .peer = &mx_s7a_lvl_ao, .res_type = RPMPD_SMPA, .res_id = 7, .key = KEY_LEVEL, }; -static struct rpmpd msm8953_vddmx_ao = { +static struct rpmpd mx_s7a_lvl_ao = { .pd = { .name = "vddmx_ao", }, - .peer = &msm8953_vddmx, + .peer = &mx_s7a_lvl, .active_only = true, .res_type = RPMPD_SMPA, .res_id = 7, .key = KEY_LEVEL, }; -static struct rpmpd msm8953_vddcx_vfl = { +static struct rpmpd cx_s2a_lvl_vfl = { .pd = { .name = "vddcx_vfl", }, .res_type = RPMPD_SMPA, .res_id = 2, @@ -379,13 +336,13 @@ static struct rpmpd msm8953_vddcx_vfl = { }; static struct rpmpd *msm8953_rpmpds[] = { - [MSM8953_VDDMD] = &msm8953_vddmd, - [MSM8953_VDDMD_AO] = &msm8953_vddmd_ao, - [MSM8953_VDDCX] = &msm8953_vddcx, - [MSM8953_VDDCX_AO] = &msm8953_vddcx_ao, - [MSM8953_VDDCX_VFL] = &msm8953_vddcx_vfl, - [MSM8953_VDDMX] = &msm8953_vddmx, - [MSM8953_VDDMX_AO] = &msm8953_vddmx_ao, + [MSM8953_VDDMD] = &md_s1a_lvl, + [MSM8953_VDDMD_AO] = &md_s1a_lvl_ao, + [MSM8953_VDDCX] = &cx_s2a_lvl, + [MSM8953_VDDCX_AO] = &cx_s2a_lvl_ao, + [MSM8953_VDDCX_VFL] = &cx_s2a_lvl_vfl, + [MSM8953_VDDMX] = &mx_s7a_lvl, + [MSM8953_VDDMX_AO] = &mx_s7a_lvl_ao, }; static const struct rpmpd_desc msm8953_desc = { @@ -395,50 +352,25 @@ static const struct rpmpd_desc msm8953_desc = { }; /* msm8976 RPM Power Domains */ -static struct rpmpd msm8976_vddcx_ao; -static struct rpmpd msm8976_vddcx = { - .pd = { .name = "vddcx", }, - .peer = &msm8976_vddcx_ao, - .res_type = RPMPD_SMPA, - .res_id = 2, - .key = KEY_LEVEL, -}; - -static struct rpmpd msm8976_vddcx_ao = { - .pd = { .name = "vddcx_ao", }, - .peer = &msm8976_vddcx, - .active_only = true, - .res_type = RPMPD_SMPA, - .res_id = 2, - .key = KEY_LEVEL, -}; - -static struct rpmpd msm8976_vddmx_ao; -static struct rpmpd msm8976_vddmx = { +static struct rpmpd mx_s6a_lvl_ao; +static struct rpmpd mx_s6a_lvl = { .pd = { .name = "vddmx", }, - .peer = &msm8976_vddmx_ao, + .peer = &mx_s6a_lvl_ao, .res_type = RPMPD_SMPA, .res_id = 6, .key = KEY_LEVEL, }; -static struct rpmpd msm8976_vddmx_ao = { +static struct rpmpd mx_s6a_lvl_ao = { .pd = { .name = "vddmx_ao", }, - .peer = &msm8976_vddmx, + .peer = &mx_s6a_lvl, .active_only = true, .res_type = RPMPD_SMPA, .res_id = 6, .key = KEY_LEVEL, }; -static struct rpmpd msm8976_vddcx_vfl = { - .pd = { .name = "vddcx_vfl", }, - .res_type = RPMPD_RWSC, - .res_id = 2, - .key = KEY_FLOOR_LEVEL, -}; - -static struct rpmpd msm8976_vddmx_vfl = { +static struct rpmpd mx_s6a_lvl_vfl = { .pd = { .name = "vddmx_vfl", }, .res_type = RPMPD_RWSM, .res_id = 6, @@ -446,12 +378,12 @@ static struct rpmpd msm8976_vddmx_vfl = { }; static struct rpmpd *msm8976_rpmpds[] = { - [MSM8976_VDDCX] = &msm8976_vddcx, - [MSM8976_VDDCX_AO] = &msm8976_vddcx_ao, - [MSM8976_VDDCX_VFL] = &msm8976_vddcx_vfl, - [MSM8976_VDDMX] = &msm8976_vddmx, - [MSM8976_VDDMX_AO] = &msm8976_vddmx_ao, - [MSM8976_VDDMX_VFL] = &msm8976_vddmx_vfl, + [MSM8976_VDDCX] = &cx_s2a_lvl, + [MSM8976_VDDCX_AO] = &cx_s2a_lvl_ao, + [MSM8976_VDDCX_VFL] = &cx_s2a_lvl_vfl, + [MSM8976_VDDMX] = &mx_s6a_lvl, + [MSM8976_VDDMX_AO] = &mx_s6a_lvl_ao, + [MSM8976_VDDMX_VFL] = &mx_s6a_lvl_vfl, }; static const struct rpmpd_desc msm8976_desc = { @@ -461,43 +393,25 @@ static const struct rpmpd_desc msm8976_desc = { }; /* msm8994 RPM Power domains */ -static struct rpmpd msm8994_vddcx_ao; -static struct rpmpd msm8994_vddcx = { - .pd = { .name = "vddcx", }, - .peer = &msm8994_vddcx_ao, - .res_type = RPMPD_SMPA, - .res_id = 1, - .key = KEY_CORNER, -}; - -static struct rpmpd msm8994_vddcx_ao = { - .pd = { .name = "vddcx_ao", }, - .peer = &msm8994_vddcx, - .active_only = true, - .res_type = RPMPD_SMPA, - .res_id = 1, - .key = KEY_CORNER, -}; - -static struct rpmpd msm8994_vddmx_ao; -static struct rpmpd msm8994_vddmx = { +static struct rpmpd mx_s2a_corner_ao; +static struct rpmpd mx_s2a_corner = { .pd = { .name = "vddmx", }, - .peer = &msm8994_vddmx_ao, + .peer = &mx_s2a_corner_ao, .res_type = RPMPD_SMPA, .res_id = 2, .key = KEY_CORNER, }; -static struct rpmpd msm8994_vddmx_ao = { +static struct rpmpd mx_s2a_corner_ao = { .pd = { .name = "vddmx_ao", }, - .peer = &msm8994_vddmx, + .peer = &mx_s2a_corner, .active_only = true, .res_type = RPMPD_SMPA, .res_id = 2, .key = KEY_CORNER, }; -static struct rpmpd msm8994_vddgfx = { +static struct rpmpd gfx_s2b_corner = { .pd = { .name = "vddgfx", }, /* SMPC if your board has a PM8004! */ .res_type = RPMPD_SMPB, @@ -505,14 +419,7 @@ static struct rpmpd msm8994_vddgfx = { .key = KEY_CORNER, }; -static struct rpmpd msm8994_vddcx_vfc = { - .pd = { .name = "vddcx_vfc", }, - .res_type = RPMPD_SMPA, - .res_id = 1, - .key = KEY_FLOOR_CORNER, -}; - -static struct rpmpd msm8994_vddgfx_vfc = { +static struct rpmpd gfx_s2b_corner_vfc = { .pd = { .name = "vddgfx_vfc", }, .res_type = RPMPD_SMPB, .res_id = 2, @@ -520,13 +427,13 @@ static struct rpmpd msm8994_vddgfx_vfc = { }; static struct rpmpd *msm8994_rpmpds[] = { - [MSM8994_VDDCX] = &msm8994_vddcx, - [MSM8994_VDDCX_AO] = &msm8994_vddcx_ao, - [MSM8994_VDDCX_VFC] = &msm8994_vddcx_vfc, - [MSM8994_VDDMX] = &msm8994_vddmx, - [MSM8994_VDDMX_AO] = &msm8994_vddmx_ao, - [MSM8994_VDDGFX] = &msm8994_vddgfx, - [MSM8994_VDDGFX_VFC] = &msm8994_vddgfx_vfc, + [MSM8994_VDDCX] = &cx_s1a_corner, + [MSM8994_VDDCX_AO] = &cx_s1a_corner_ao, + [MSM8994_VDDCX_VFC] = &cx_s1a_corner_vfc, + [MSM8994_VDDMX] = &mx_s2a_corner, + [MSM8994_VDDMX_AO] = &mx_s2a_corner_ao, + [MSM8994_VDDGFX] = &gfx_s2b_corner, + [MSM8994_VDDGFX_VFC] = &gfx_s2b_corner_vfc, }; static const struct rpmpd_desc msm8994_desc = { @@ -536,57 +443,14 @@ static const struct rpmpd_desc msm8994_desc = { }; /* msm8996 RPM Power domains */ -static struct rpmpd msm8996_vddcx_ao; -static struct rpmpd msm8996_vddcx = { - .pd = { .name = "vddcx", }, - .peer = &msm8996_vddcx_ao, - .res_type = RPMPD_SMPA, - .res_id = 1, - .key = KEY_CORNER, -}; - -static struct rpmpd msm8996_vddcx_ao = { - .pd = { .name = "vddcx_ao", }, - .peer = &msm8996_vddcx, - .active_only = true, - .res_type = RPMPD_SMPA, - .res_id = 1, - .key = KEY_CORNER, -}; - -static struct rpmpd msm8996_vddmx_ao; -static struct rpmpd msm8996_vddmx = { - .pd = { .name = "vddmx", }, - .peer = &msm8996_vddmx_ao, - .res_type = RPMPD_SMPA, - .res_id = 2, - .key = KEY_CORNER, -}; - -static struct rpmpd msm8996_vddmx_ao = { - .pd = { .name = "vddmx_ao", }, - .peer = &msm8996_vddmx, - .active_only = true, - .res_type = RPMPD_SMPA, - .res_id = 2, - .key = KEY_CORNER, -}; - -static struct rpmpd msm8996_vddsscx = { +static struct rpmpd sscx_l26a_corner = { .pd = { .name = "vddsscx", }, .res_type = RPMPD_LDOA, .res_id = 26, .key = KEY_CORNER, }; -static struct rpmpd msm8996_vddcx_vfc = { - .pd = { .name = "vddcx_vfc", }, - .res_type = RPMPD_SMPA, - .res_id = 1, - .key = KEY_FLOOR_CORNER, -}; - -static struct rpmpd msm8996_vddsscx_vfc = { +static struct rpmpd sscx_l26a_corner_vfc = { .pd = { .name = "vddsscx_vfc", }, .res_type = RPMPD_LDOA, .res_id = 26, @@ -594,13 +458,13 @@ static struct rpmpd msm8996_vddsscx_vfc = { }; static struct rpmpd *msm8996_rpmpds[] = { - [MSM8996_VDDCX] = &msm8996_vddcx, - [MSM8996_VDDCX_AO] = &msm8996_vddcx_ao, - [MSM8996_VDDCX_VFC] = &msm8996_vddcx_vfc, - [MSM8996_VDDMX] = &msm8996_vddmx, - [MSM8996_VDDMX_AO] = &msm8996_vddmx_ao, - [MSM8996_VDDSSCX] = &msm8996_vddsscx, - [MSM8996_VDDSSCX_VFC] = &msm8996_vddsscx_vfc, + [MSM8996_VDDCX] = &cx_s1a_corner, + [MSM8996_VDDCX_AO] = &cx_s1a_corner_ao, + [MSM8996_VDDCX_VFC] = &cx_s1a_corner_vfc, + [MSM8996_VDDMX] = &mx_s2a_corner, + [MSM8996_VDDMX_AO] = &mx_s2a_corner_ao, + [MSM8996_VDDSSCX] = &sscx_l26a_corner, + [MSM8996_VDDSSCX_VFC] = &sscx_l26a_corner_vfc, }; static const struct rpmpd_desc msm8996_desc = { @@ -610,78 +474,78 @@ static const struct rpmpd_desc msm8996_desc = { }; /* msm8998 RPM Power domains */ -static struct rpmpd msm8998_vddcx_ao; -static struct rpmpd msm8998_vddcx = { +static struct rpmpd rwcx0_lvl_ao; +static struct rpmpd rwcx0_lvl = { .pd = { .name = "vddcx", }, - .peer = &msm8998_vddcx_ao, + .peer = &rwcx0_lvl_ao, .res_type = RPMPD_RWCX, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd msm8998_vddcx_ao = { +static struct rpmpd rwcx0_lvl_ao = { .pd = { .name = "vddcx_ao", }, - .peer = &msm8998_vddcx, + .peer = &rwcx0_lvl, .active_only = true, .res_type = RPMPD_RWCX, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd msm8998_vddcx_vfl = { +static struct rpmpd rwcx0_lvl_vfl = { .pd = { .name = "vddcx_vfl", }, .res_type = RPMPD_RWCX, .res_id = 0, .key = KEY_FLOOR_LEVEL, }; -static struct rpmpd msm8998_vddmx_ao; -static struct rpmpd msm8998_vddmx = { +static struct rpmpd rwmx0_lvl_ao; +static struct rpmpd rwmx0_lvl = { .pd = { .name = "vddmx", }, - .peer = &msm8998_vddmx_ao, + .peer = &rwmx0_lvl_ao, .res_type = RPMPD_RWMX, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd msm8998_vddmx_ao = { +static struct rpmpd rwmx0_lvl_ao = { .pd = { .name = "vddmx_ao", }, - .peer = &msm8998_vddmx, + .peer = &rwmx0_lvl, .active_only = true, .res_type = RPMPD_RWMX, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd msm8998_vddmx_vfl = { +static struct rpmpd rwmx0_lvl_vfl = { .pd = { .name = "vddmx_vfl", }, .res_type = RPMPD_RWMX, .res_id = 0, .key = KEY_FLOOR_LEVEL, }; -static struct rpmpd msm8998_vdd_ssccx = { +static struct rpmpd rwsc0_lvl = { .pd = { .name = "vdd_ssccx", }, .res_type = RPMPD_RWSC, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd msm8998_vdd_ssccx_vfl = { +static struct rpmpd rwsc0_lvl_vfl = { .pd = { .name = "vdd_ssccx_vfl", }, .res_type = RPMPD_RWSC, .res_id = 0, .key = KEY_FLOOR_LEVEL, }; -static struct rpmpd msm8998_vdd_sscmx = { +static struct rpmpd rwsm0_lvl = { .pd = { .name = "vdd_sscmx", }, .res_type = RPMPD_RWSM, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd msm8998_vdd_sscmx_vfl = { +static struct rpmpd rwsm0_lvl_vfl = { .pd = { .name = "vdd_sscmx_vfl", }, .res_type = RPMPD_RWSM, .res_id = 0, @@ -689,16 +553,16 @@ static struct rpmpd msm8998_vdd_sscmx_vfl = { }; static struct rpmpd *msm8998_rpmpds[] = { - [MSM8998_VDDCX] = &msm8998_vddcx, - [MSM8998_VDDCX_AO] = &msm8998_vddcx_ao, - [MSM8998_VDDCX_VFL] = &msm8998_vddcx_vfl, - [MSM8998_VDDMX] = &msm8998_vddmx, - [MSM8998_VDDMX_AO] = &msm8998_vddmx_ao, - [MSM8998_VDDMX_VFL] = &msm8998_vddmx_vfl, - [MSM8998_SSCCX] = &msm8998_vdd_ssccx, - [MSM8998_SSCCX_VFL] = &msm8998_vdd_ssccx_vfl, - [MSM8998_SSCMX] = &msm8998_vdd_sscmx, - [MSM8998_SSCMX_VFL] = &msm8998_vdd_sscmx_vfl, + [MSM8998_VDDCX] = &rwcx0_lvl, + [MSM8998_VDDCX_AO] = &rwcx0_lvl_ao, + [MSM8998_VDDCX_VFL] = &rwcx0_lvl_vfl, + [MSM8998_VDDMX] = &rwmx0_lvl, + [MSM8998_VDDMX_AO] = &rwmx0_lvl_ao, + [MSM8998_VDDMX_VFL] = &rwmx0_lvl_vfl, + [MSM8998_SSCCX] = &rwsc0_lvl, + [MSM8998_SSCCX_VFL] = &rwsc0_lvl_vfl, + [MSM8998_SSCMX] = &rwsm0_lvl, + [MSM8998_SSCMX_VFL] = &rwsm0_lvl_vfl, }; static const struct rpmpd_desc msm8998_desc = { @@ -708,53 +572,28 @@ static const struct rpmpd_desc msm8998_desc = { }; /* qcs404 RPM Power domains */ -static struct rpmpd qcs404_vddmx_ao; -static struct rpmpd qcs404_vddmx = { - .pd = { .name = "vddmx", }, - .peer = &qcs404_vddmx_ao, - .res_type = RPMPD_RWMX, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd qcs404_vddmx_ao = { - .pd = { .name = "vddmx_ao", }, - .peer = &qcs404_vddmx, - .active_only = true, - .res_type = RPMPD_RWMX, +static struct rpmpd rwlc0_lvl = { + .pd = { .name = "vdd_lpi_cx", }, + .res_type = RPMPD_RWLC, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd qcs404_vddmx_vfl = { - .pd = { .name = "vddmx_vfl", }, - .res_type = RPMPD_RWMX, - .res_id = 0, - .key = KEY_FLOOR_LEVEL, -}; - -static struct rpmpd qcs404_vdd_lpicx = { - .pd = { .name = "vdd_lpicx", }, - .res_type = RPMPD_RWLC, +static struct rpmpd rwlm0_lvl = { + .pd = { .name = "vdd_lpi_mx", }, + .res_type = RPMPD_RWLM, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd qcs404_vdd_lpicx_vfl = { +static struct rpmpd rwlc0_lvl_vfl = { .pd = { .name = "vdd_lpicx_vfl", }, .res_type = RPMPD_RWLC, .res_id = 0, .key = KEY_FLOOR_LEVEL, }; -static struct rpmpd qcs404_vdd_lpimx = { - .pd = { .name = "vdd_lpimx", }, - .res_type = RPMPD_RWLM, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd qcs404_vdd_lpimx_vfl = { +static struct rpmpd rwlm0_lvl_vfl = { .pd = { .name = "vdd_lpimx_vfl", }, .res_type = RPMPD_RWLM, .res_id = 0, @@ -762,13 +601,13 @@ static struct rpmpd qcs404_vdd_lpimx_vfl = { }; static struct rpmpd *qcs404_rpmpds[] = { - [QCS404_VDDMX] = &qcs404_vddmx, - [QCS404_VDDMX_AO] = &qcs404_vddmx_ao, - [QCS404_VDDMX_VFL] = &qcs404_vddmx_vfl, - [QCS404_LPICX] = &qcs404_vdd_lpicx, - [QCS404_LPICX_VFL] = &qcs404_vdd_lpicx_vfl, - [QCS404_LPIMX] = &qcs404_vdd_lpimx, - [QCS404_LPIMX_VFL] = &qcs404_vdd_lpimx_vfl, + [QCS404_VDDMX] = &rwmx0_lvl, + [QCS404_VDDMX_AO] = &rwmx0_lvl_ao, + [QCS404_VDDMX_VFL] = &rwmx0_lvl_vfl, + [QCS404_LPICX] = &rwlc0_lvl, + [QCS404_LPICX_VFL] = &rwlc0_lvl_vfl, + [QCS404_LPIMX] = &rwlm0_lvl, + [QCS404_LPIMX_VFL] = &rwlm0_lvl_vfl, }; static const struct rpmpd_desc qcs404_desc = { @@ -778,95 +617,17 @@ static const struct rpmpd_desc qcs404_desc = { }; /* sdm660 RPM Power domains */ -static struct rpmpd sdm660_vddcx_ao; -static struct rpmpd sdm660_vddcx = { - .pd = { .name = "vddcx", }, - .peer = &sdm660_vddcx_ao, - .res_type = RPMPD_RWCX, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd sdm660_vddcx_ao = { - .pd = { .name = "vddcx_ao", }, - .peer = &sdm660_vddcx, - .active_only = true, - .res_type = RPMPD_RWCX, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd sdm660_vddcx_vfl = { - .pd = { .name = "vddcx_vfl", }, - .res_type = RPMPD_RWCX, - .res_id = 0, - .key = KEY_FLOOR_LEVEL, -}; - -static struct rpmpd sdm660_vddmx_ao; -static struct rpmpd sdm660_vddmx = { - .pd = { .name = "vddmx", }, - .peer = &sdm660_vddmx_ao, - .res_type = RPMPD_RWMX, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd sdm660_vddmx_ao = { - .pd = { .name = "vddmx_ao", }, - .peer = &sdm660_vddmx, - .active_only = true, - .res_type = RPMPD_RWMX, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd sdm660_vddmx_vfl = { - .pd = { .name = "vddmx_vfl", }, - .res_type = RPMPD_RWMX, - .res_id = 0, - .key = KEY_FLOOR_LEVEL, -}; - -static struct rpmpd sdm660_vdd_ssccx = { - .pd = { .name = "vdd_ssccx", }, - .res_type = RPMPD_RWLC, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd sdm660_vdd_ssccx_vfl = { - .pd = { .name = "vdd_ssccx_vfl", }, - .res_type = RPMPD_RWLC, - .res_id = 0, - .key = KEY_FLOOR_LEVEL, -}; - -static struct rpmpd sdm660_vdd_sscmx = { - .pd = { .name = "vdd_sscmx", }, - .res_type = RPMPD_RWLM, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd sdm660_vdd_sscmx_vfl = { - .pd = { .name = "vdd_sscmx_vfl", }, - .res_type = RPMPD_RWLM, - .res_id = 0, - .key = KEY_FLOOR_LEVEL, -}; - static struct rpmpd *sdm660_rpmpds[] = { - [SDM660_VDDCX] = &sdm660_vddcx, - [SDM660_VDDCX_AO] = &sdm660_vddcx_ao, - [SDM660_VDDCX_VFL] = &sdm660_vddcx_vfl, - [SDM660_VDDMX] = &sdm660_vddmx, - [SDM660_VDDMX_AO] = &sdm660_vddmx_ao, - [SDM660_VDDMX_VFL] = &sdm660_vddmx_vfl, - [SDM660_SSCCX] = &sdm660_vdd_ssccx, - [SDM660_SSCCX_VFL] = &sdm660_vdd_ssccx_vfl, - [SDM660_SSCMX] = &sdm660_vdd_sscmx, - [SDM660_SSCMX_VFL] = &sdm660_vdd_sscmx_vfl, + [SDM660_VDDCX] = &rwcx0_lvl, + [SDM660_VDDCX_AO] = &rwcx0_lvl_ao, + [SDM660_VDDCX_VFL] = &rwcx0_lvl_vfl, + [SDM660_VDDMX] = &rwmx0_lvl, + [SDM660_VDDMX_AO] = &rwmx0_lvl_ao, + [SDM660_VDDMX_VFL] = &rwmx0_lvl_vfl, + [SDM660_SSCCX] = &rwlc0_lvl, + [SDM660_SSCCX_VFL] = &rwlc0_lvl_vfl, + [SDM660_SSCMX] = &rwlm0_lvl, + [SDM660_SSCMX_VFL] = &rwlm0_lvl_vfl, }; static const struct rpmpd_desc sdm660_desc = { @@ -876,79 +637,15 @@ static const struct rpmpd_desc sdm660_desc = { }; /* sm4250/6115 RPM Power domains */ -static struct rpmpd sm6115_vddcx_ao; -static struct rpmpd sm6115_vddcx = { - .pd = { .name = "vddcx", }, - .peer = &sm6115_vddcx_ao, - .res_type = RPMPD_RWCX, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd sm6115_vddcx_ao = { - .pd = { .name = "vddcx_ao", }, - .peer = &sm6115_vddcx, - .active_only = true, - .res_type = RPMPD_RWCX, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd sm6115_vddcx_vfl = { - .pd = { .name = "vddcx_vfl", }, - .res_type = RPMPD_RWCX, - .res_id = 0, - .key = KEY_FLOOR_LEVEL, -}; - -static struct rpmpd sm6115_vddmx_ao; -static struct rpmpd sm6115_vddmx = { - .pd = { .name = "vddmx", }, - .peer = &sm6115_vddmx_ao, - .res_type = RPMPD_RWMX, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd sm6115_vddmx_ao = { - .pd = { .name = "vddmx_ao", }, - .peer = &sm6115_vddmx, - .active_only = true, - .res_type = RPMPD_RWMX, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd sm6115_vddmx_vfl = { - .pd = { .name = "vddmx_vfl", }, - .res_type = RPMPD_RWMX, - .res_id = 0, - .key = KEY_FLOOR_LEVEL, -}; - -static struct rpmpd sm6115_vdd_lpi_cx = { - .pd = { .name = "vdd_lpi_cx", }, - .res_type = RPMPD_RWLC, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd sm6115_vdd_lpi_mx = { - .pd = { .name = "vdd_lpi_mx", }, - .res_type = RPMPD_RWLM, - .res_id = 0, - .key = KEY_LEVEL, -}; - static struct rpmpd *sm6115_rpmpds[] = { - [SM6115_VDDCX] = &sm6115_vddcx, - [SM6115_VDDCX_AO] = &sm6115_vddcx_ao, - [SM6115_VDDCX_VFL] = &sm6115_vddcx_vfl, - [SM6115_VDDMX] = &sm6115_vddmx, - [SM6115_VDDMX_AO] = &sm6115_vddmx_ao, - [SM6115_VDDMX_VFL] = &sm6115_vddmx_vfl, - [SM6115_VDD_LPI_CX] = &sm6115_vdd_lpi_cx, - [SM6115_VDD_LPI_MX] = &sm6115_vdd_lpi_mx, + [SM6115_VDDCX] = &rwcx0_lvl, + [SM6115_VDDCX_AO] = &rwcx0_lvl_ao, + [SM6115_VDDCX_VFL] = &rwcx0_lvl_vfl, + [SM6115_VDDMX] = &rwmx0_lvl, + [SM6115_VDDMX_AO] = &rwmx0_lvl_ao, + [SM6115_VDDMX_VFL] = &rwmx0_lvl_vfl, + [SM6115_VDD_LPI_CX] = &rwlc0_lvl, + [SM6115_VDD_LPI_MX] = &rwlm0_lvl, }; static const struct rpmpd_desc sm6115_desc = { @@ -958,63 +655,13 @@ static const struct rpmpd_desc sm6115_desc = { }; /* sm6125 RPM Power domains */ -static struct rpmpd sm6125_vddcx_ao; -static struct rpmpd sm6125_vddcx = { - .pd = { .name = "vddcx", }, - .peer = &sm6125_vddcx_ao, - .res_type = RPMPD_RWCX, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd sm6125_vddcx_ao = { - .pd = { .name = "vddcx_ao", }, - .peer = &sm6125_vddcx, - .active_only = true, - .res_type = RPMPD_RWCX, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd sm6125_vddcx_vfl = { - .pd = { .name = "vddcx_vfl", }, - .res_type = RPMPD_RWCX, - .res_id = 0, - .key = KEY_FLOOR_LEVEL, -}; - -static struct rpmpd sm6125_vddmx_ao; -static struct rpmpd sm6125_vddmx = { - .pd = { .name = "vddmx", }, - .peer = &sm6125_vddmx_ao, - .res_type = RPMPD_RWMX, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd sm6125_vddmx_ao = { - .pd = { .name = "vddmx_ao", }, - .peer = &sm6125_vddmx, - .active_only = true, - .res_type = RPMPD_RWMX, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd sm6125_vddmx_vfl = { - .pd = { .name = "vddmx_vfl", }, - .res_type = RPMPD_RWMX, - .res_id = 0, - .key = KEY_FLOOR_LEVEL, -}; - static struct rpmpd *sm6125_rpmpds[] = { - [SM6125_VDDCX] = &sm6125_vddcx, - [SM6125_VDDCX_AO] = &sm6125_vddcx_ao, - [SM6125_VDDCX_VFL] = &sm6125_vddcx_vfl, - [SM6125_VDDMX] = &sm6125_vddmx, - [SM6125_VDDMX_AO] = &sm6125_vddmx_ao, - [SM6125_VDDMX_VFL] = &sm6125_vddmx_vfl, + [SM6125_VDDCX] = &rwcx0_lvl, + [SM6125_VDDCX_AO] = &rwcx0_lvl_ao, + [SM6125_VDDCX_VFL] = &rwcx0_lvl_vfl, + [SM6125_VDDMX] = &rwmx0_lvl, + [SM6125_VDDMX_AO] = &rwmx0_lvl_ao, + [SM6125_VDDMX_VFL] = &rwmx0_lvl_vfl, }; static const struct rpmpd_desc sm6125_desc = { @@ -1023,20 +670,20 @@ static const struct rpmpd_desc sm6125_desc = { .max_state = RPM_SMD_LEVEL_BINNING, }; -static struct rpmpd sm6375_vddgx_ao; -static struct rpmpd sm6375_vddgx = { +static struct rpmpd rwgx0_lvl_ao_w_rwmx0_parent; +static struct rpmpd rwgx0_lvl_w_rwmx0_parent = { .pd = { .name = "vddgx", }, - .peer = &sm6375_vddgx_ao, - .parent = &sm6125_vddmx.pd, + .peer = &rwgx0_lvl_ao_w_rwmx0_parent, + .parent = &rwmx0_lvl.pd, .res_type = RPMPD_RWGX, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd sm6375_vddgx_ao = { +static struct rpmpd rwgx0_lvl_ao_w_rwmx0_parent = { .pd = { .name = "vddgx_ao", }, - .peer = &sm6375_vddgx, - .parent = &sm6125_vddmx_ao.pd, + .peer = &rwgx0_lvl_w_rwmx0_parent, + .parent = &rwmx0_lvl_ao.pd, .active_only = true, .res_type = RPMPD_RWGX, .res_id = 0, @@ -1044,16 +691,16 @@ static struct rpmpd sm6375_vddgx_ao = { }; static struct rpmpd *sm6375_rpmpds[] = { - [SM6375_VDDCX] = &sm6125_vddcx, - [SM6375_VDDCX_AO] = &sm6125_vddcx_ao, - [SM6375_VDDCX_VFL] = &sm6125_vddcx_vfl, - [SM6375_VDDMX] = &sm6125_vddmx, - [SM6375_VDDMX_AO] = &sm6125_vddmx_ao, - [SM6375_VDDMX_VFL] = &sm6125_vddmx_vfl, - [SM6375_VDDGX] = &sm6375_vddgx, - [SM6375_VDDGX_AO] = &sm6375_vddgx_ao, - [SM6375_VDD_LPI_CX] = &sm6115_vdd_lpi_cx, - [SM6375_VDD_LPI_MX] = &sm6115_vdd_lpi_mx, + [SM6375_VDDCX] = &rwcx0_lvl, + [SM6375_VDDCX_AO] = &rwcx0_lvl_ao, + [SM6375_VDDCX_VFL] = &rwcx0_lvl_vfl, + [SM6375_VDDMX] = &rwmx0_lvl, + [SM6375_VDDMX_AO] = &rwmx0_lvl_ao, + [SM6375_VDDMX_VFL] = &rwmx0_lvl_vfl, + [SM6375_VDDGX] = &rwgx0_lvl_w_rwmx0_parent, + [SM6375_VDDGX_AO] = &rwgx0_lvl_ao_w_rwmx0_parent, + [SM6375_VDD_LPI_CX] = &rwlc0_lvl, + [SM6375_VDD_LPI_MX] = &rwlm0_lvl, }; static const struct rpmpd_desc sm6375_desc = { @@ -1063,14 +710,14 @@ static const struct rpmpd_desc sm6375_desc = { }; static struct rpmpd *qcm2290_rpmpds[] = { - [QCM2290_VDDCX] = &sm6115_vddcx, - [QCM2290_VDDCX_AO] = &sm6115_vddcx_ao, - [QCM2290_VDDCX_VFL] = &sm6115_vddcx_vfl, - [QCM2290_VDDMX] = &sm6115_vddmx, - [QCM2290_VDDMX_AO] = &sm6115_vddmx_ao, - [QCM2290_VDDMX_VFL] = &sm6115_vddmx_vfl, - [QCM2290_VDD_LPI_CX] = &sm6115_vdd_lpi_cx, - [QCM2290_VDD_LPI_MX] = &sm6115_vdd_lpi_mx, + [QCM2290_VDDCX] = &rwcx0_lvl, + [QCM2290_VDDCX_AO] = &rwcx0_lvl_ao, + [QCM2290_VDDCX_VFL] = &rwcx0_lvl_vfl, + [QCM2290_VDDMX] = &rwmx0_lvl, + [QCM2290_VDDMX_AO] = &rwmx0_lvl_ao, + [QCM2290_VDDMX_VFL] = &rwmx0_lvl_vfl, + [QCM2290_VDD_LPI_CX] = &rwlc0_lvl, + [QCM2290_VDD_LPI_MX] = &rwlm0_lvl, }; static const struct rpmpd_desc qcm2290_desc = { From patchwork Wed Jan 25 03:27:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 48008 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp72313wrn; Tue, 24 Jan 2023 19:29:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXsTuii+hwaqsKYYxeyHXGpgfz+GK4FKijO69mLYvP+XjZmpjRsaphxsdh1ujqqC/w2GhldW X-Received: by 2002:a17:902:ce08:b0:193:3594:82e4 with SMTP id k8-20020a170902ce0800b00193359482e4mr35366824plg.18.1674617359685; Tue, 24 Jan 2023 19:29:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674617359; cv=none; d=google.com; s=arc-20160816; b=v/4GN+HLMS0rL3PlX7p6H5yaYRzhNhDePGkd13qJ5Xn3IH8DZ4eb2+zLz/t75VP+Dm nxCDd8JL/Wovfviz53+um1IFi/wd6BR5yAqVDMP6IV+aEvECpF06i4VjA/FmbjFr6XrZ TeJeTrzvQt1h31NO1cuqk0JkfRVK3SP8ps9cy2q2RlcBB6JMMSfiS29j/KC+wDZSNOTQ KO8YXSRBURc/l5XnfvCTQs+d6clmUuGrEjwmFUA8Y0y8rDTyAtDk33AG0rHISRB7zdSb E6+fvDtjfPOlD1QauDq3XrMGQP64OpIoBkLxXZ+W9/Q9IZFLIjAXIbpJrTLPIaHQbBm4 EyYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fjBTcip9GugGxYq/eh5xnxoFH1qNNiynXAfWfYKtmlE=; b=iuitvpCtqiSH0gzmQ4vLyujgQxRVFO1KLgjz5+C2bvZpVlc66dougb68V9hgT0/bZd erwj9tpm9C3z+kcMI7GAOildPQq48xgnlQCjqRFCsOZuCCWNlT5ogNXEsjnoTYnOXKba OKdSrGRd25SoFq0ZMpW43DWIbjFkToCNBIuOWgDXBUl9HJsc0ME13k4+5E7AHR3f702n 3qlMhARyhLnEoVXFZFfFU15U4KWYkpDl+V+VYsvWbslEs53Zbc1mlbeKhcrRlDKEGTyy ZXygW0qKo09hU1q4FTjKahsS/ok8qFVaWag3nwzRNopswTvnuARW4HX/s/SDPwYbyB0g J4Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="IzN+R/YO"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t12-20020a63954c000000b0047701022c7dsi3795725pgn.729.2023.01.24.19.29.08; Tue, 24 Jan 2023 19:29:19 -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; dkim=pass header.i=@linaro.org header.s=google header.b="IzN+R/YO"; 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 S234393AbjAYD17 (ORCPT + 99 others); Tue, 24 Jan 2023 22:27:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234343AbjAYD1u (ORCPT ); Tue, 24 Jan 2023 22:27:50 -0500 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF29CBB for ; Tue, 24 Jan 2023 19:27:42 -0800 (PST) Received: by mail-ej1-x62f.google.com with SMTP id os24so502092ejb.8 for ; Tue, 24 Jan 2023 19:27:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fjBTcip9GugGxYq/eh5xnxoFH1qNNiynXAfWfYKtmlE=; b=IzN+R/YOb/lLRBYFmoiLAzqCSVueby8HK8EyqvEDw93fLI+pgRw89Jao3rXW29Qwe0 APzltYeqYYiXkvjGBeg2rId0WZJQttyjCv66nNkvW+lYMJZFydFlMrMsuxcWBmgFY3Aa CWTd1mJ+HGVH+Zx/NfJwBRDbWq8dRlUrVqOc2yG5Y/4OXXdj+DYLXKvB0kxuo4yXGZcB 9ENLFrD7rLgzQ6ZiplPDLb9275SuJSfk8EwPsmGIkY7IJ5jE4GBNNQ9sJMZy+TQvZO36 YCyD4P3112OINV23yvvXZWBUm+azvWL3vOKc8s25kjEfagSitBmb6ZtBE3HJY2qDy+Yv x9Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fjBTcip9GugGxYq/eh5xnxoFH1qNNiynXAfWfYKtmlE=; b=2IagJo/rx8BcvjRfMeJ4IJjEOXGeOX9cEdElP4iL1qgnW6Sdw308QRx13syzUbn7Za cG4GvnQxzm9bYCsxjuiTYJo/DnB0g4fCXkQCTA144MVWDmsPOdZs3QAO0YwB66o5C/be ZUcxFyCUvehR6zkMs9faMeDIatCYztL2kU3S2YdHRBo5TF4aY4Lhqe0vqiZL6akyWH0+ ePMZCxYzpkIB/CoVcD1VoX66T+gm5PvVEEIP9GnLF51OUVWp0WVKozMBYrvBHF5kOuq2 fwu+w0vR8yN0z/SHaHhUnZmmdrFu7OnkkKLODxQeal2kGVgSIARqBCDXqAv6ubicFx3j n9rA== X-Gm-Message-State: AFqh2krZqo2wHZZSvNwEg7UhkAHtvAlNxAJwiK7CPTE0yAooYP07CGN7 vne3EFMqxfoXLbr+Ybei7A9aAA== X-Received: by 2002:a17:906:3f87:b0:809:c1f4:ea09 with SMTP id b7-20020a1709063f8700b00809c1f4ea09mr29747093ejj.69.1674617259535; Tue, 24 Jan 2023 19:27:39 -0800 (PST) Received: from localhost.localdomain (abyl109.neoplus.adsl.tpnet.pl. [83.9.31.109]) by smtp.gmail.com with ESMTPSA id if10-20020a170906df4a00b00738795e7d9bsm1742913ejc.2.2023.01.24.19.27.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 19:27:39 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , linux-kernel@vger.kernel.org Subject: [PATCH 5/7] soc: qcom: rpmpd: Remove useless comments Date: Wed, 25 Jan 2023 04:27:26 +0100 Message-Id: <20230125032728.611640-6-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230125032728.611640-1-konrad.dybcio@linaro.org> References: <20230125032728.611640-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755963572295338142?= X-GMAIL-MSGID: =?utf-8?q?1755963572295338142?= It goes without saying that socname_rpmpds[] is the array of the RPM power domains associated with socname. Remove these comments. Signed-off-by: Konrad Dybcio --- drivers/soc/qcom/rpmpd.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 9fff40527f9e..38a85a07fa67 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -68,7 +68,6 @@ struct rpmpd_desc { static DEFINE_MUTEX(rpmpd_lock); -/* mdm9607 RPM Power Domains */ static struct rpmpd cx_s3a_lvl_ao; static struct rpmpd cx_s3a_lvl = { .pd = { .name = "vddcx", }, @@ -134,7 +133,6 @@ static const struct rpmpd_desc mdm9607_desc = { .max_state = RPM_SMD_LEVEL_TURBO, }; -/* msm8226 RPM Power Domains */ static struct rpmpd cx_s1a_corner_ao; static struct rpmpd cx_s1a_corner = { .pd = { .name = "vddcx", }, @@ -172,7 +170,6 @@ static const struct rpmpd_desc msm8226_desc = { .max_state = MAX_CORNER_RPMPD_STATE, }; -/* msm8939 RPM Power Domains */ static struct rpmpd md_s1a_corner_ao; static struct rpmpd md_s1a_corner = { .pd = { .name = "vddmd", }, @@ -258,7 +255,6 @@ static const struct rpmpd_desc msm8939_desc = { .max_state = MAX_CORNER_RPMPD_STATE, }; -/* msm8916 RPM Power Domains */ static struct rpmpd *msm8916_rpmpds[] = { [MSM8916_VDDCX] = &cx_s1a_corner, [MSM8916_VDDCX_AO] = &cx_s1a_corner_ao, @@ -273,7 +269,6 @@ static const struct rpmpd_desc msm8916_desc = { .max_state = MAX_CORNER_RPMPD_STATE, }; -/* msm8953 RPM Power Domains */ static struct rpmpd md_s1a_lvl_ao; static struct rpmpd md_s1a_lvl = { .pd = { .name = "vddmd", }, @@ -351,7 +346,6 @@ static const struct rpmpd_desc msm8953_desc = { .max_state = RPM_SMD_LEVEL_TURBO, }; -/* msm8976 RPM Power Domains */ static struct rpmpd mx_s6a_lvl_ao; static struct rpmpd mx_s6a_lvl = { .pd = { .name = "vddmx", }, @@ -392,7 +386,6 @@ static const struct rpmpd_desc msm8976_desc = { .max_state = RPM_SMD_LEVEL_TURBO_HIGH, }; -/* msm8994 RPM Power domains */ static struct rpmpd mx_s2a_corner_ao; static struct rpmpd mx_s2a_corner = { .pd = { .name = "vddmx", }, @@ -442,7 +435,6 @@ static const struct rpmpd_desc msm8994_desc = { .max_state = MAX_CORNER_RPMPD_STATE, }; -/* msm8996 RPM Power domains */ static struct rpmpd sscx_l26a_corner = { .pd = { .name = "vddsscx", }, .res_type = RPMPD_LDOA, @@ -473,7 +465,6 @@ static const struct rpmpd_desc msm8996_desc = { .max_state = MAX_CORNER_RPMPD_STATE, }; -/* msm8998 RPM Power domains */ static struct rpmpd rwcx0_lvl_ao; static struct rpmpd rwcx0_lvl = { .pd = { .name = "vddcx", }, @@ -571,7 +562,6 @@ static const struct rpmpd_desc msm8998_desc = { .max_state = RPM_SMD_LEVEL_BINNING, }; -/* qcs404 RPM Power domains */ static struct rpmpd rwlc0_lvl = { .pd = { .name = "vdd_lpi_cx", }, .res_type = RPMPD_RWLC, @@ -616,7 +606,6 @@ static const struct rpmpd_desc qcs404_desc = { .max_state = RPM_SMD_LEVEL_BINNING, }; -/* sdm660 RPM Power domains */ static struct rpmpd *sdm660_rpmpds[] = { [SDM660_VDDCX] = &rwcx0_lvl, [SDM660_VDDCX_AO] = &rwcx0_lvl_ao, @@ -636,7 +625,6 @@ static const struct rpmpd_desc sdm660_desc = { .max_state = RPM_SMD_LEVEL_TURBO, }; -/* sm4250/6115 RPM Power domains */ static struct rpmpd *sm6115_rpmpds[] = { [SM6115_VDDCX] = &rwcx0_lvl, [SM6115_VDDCX_AO] = &rwcx0_lvl_ao, @@ -654,7 +642,6 @@ static const struct rpmpd_desc sm6115_desc = { .max_state = RPM_SMD_LEVEL_TURBO_NO_CPR, }; -/* sm6125 RPM Power domains */ static struct rpmpd *sm6125_rpmpds[] = { [SM6125_VDDCX] = &rwcx0_lvl, [SM6125_VDDCX_AO] = &rwcx0_lvl_ao, From patchwork Wed Jan 25 03:27:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 48010 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp72819wrn; Tue, 24 Jan 2023 19:30:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXs2jNkUSwN4T13yo2OkZoOEAl9+ALyH1dQrTy8MmmZTyJKvguCCrYHgkvlMzkTgbgBauMlT X-Received: by 2002:a17:90b:2650:b0:229:ec27:1082 with SMTP id pa16-20020a17090b265000b00229ec271082mr23864980pjb.8.1674617458554; Tue, 24 Jan 2023 19:30:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674617458; cv=none; d=google.com; s=arc-20160816; b=ey9aYMnJCwDQE45IwTxcSyrOZlGHGSXF6umvbp6MYLhJymDD3Nfwzy+Y1Pt2diqSUp iMMifZqPGbFRnvI9M4XNbGYKibctUxwIRmxHIZuhmeW3352C9YbyJLK/NUzKsb2W0g2Y 8TdSJwklg+Yf5QZlPTEryMOkwOItRiGEF3H1+R2+pXta3uvJpb8x3NTn1PLeqtVEX4mI ZP9TTZz0qJkobt8QRHhBzyHwBd1sSaYNzpxQUM/EggvDXX7gnSgLi2ghohyx5QgKrzfk 5BmKWokgKSQNHgBR6aQB+3k6QwA537W+yCIa3WZpM7Em+x0M1u7IinzGqkmWbxw5QSda pPSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=A6clkojqKpjdTaUHjaFWTeevyQq9O7rhCWN1zt+L8hI=; b=g7kHJgWJDusU5h47vm2GIMvl4a0D9HamwT8j5enCXP2c5DV9D95KsqA+/geRJXvBHc BVagFxVLBHzKx/eJl4GiGGX3pn8pSP7AFjzNTM3psOozM/N620pY5bwtZwaGeLzd/bcf tBUlfGn+Xx3O4zU/3xhvPUF4cVjn3iM9/4X5EOHoTOIPj7PURGwcEZPVKlBc9Lwdh864 OyzO0PRf+8QHKcoHtYFuQk++n+ZZZVpx1tB1M6Rp6PawEb5SuUzhm2mjZsZYBLXeasZn twsCowTm/oDjuI1ZSgSFYyEvgiF9CvJ/1CSOTHL2dGpr6WcMIEZmExQJ2W1/FqwMLVJp B0ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ma8J4Ru7; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r4-20020a17090a5c8400b0022bb1280d3csi766908pji.79.2023.01.24.19.30.46; Tue, 24 Jan 2023 19:30:58 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Ma8J4Ru7; 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 S234484AbjAYD2B (ORCPT + 99 others); Tue, 24 Jan 2023 22:28:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234361AbjAYD1v (ORCPT ); Tue, 24 Jan 2023 22:27:51 -0500 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B631A22A27 for ; Tue, 24 Jan 2023 19:27:43 -0800 (PST) Received: by mail-ej1-x62c.google.com with SMTP id tz11so44278839ejc.0 for ; Tue, 24 Jan 2023 19:27:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=A6clkojqKpjdTaUHjaFWTeevyQq9O7rhCWN1zt+L8hI=; b=Ma8J4Ru7nPJNUp7jJafNZhoEiwbLmo/6OvaJ6KKnKpTjxyEjk/ZuIINJOfw4q1X3Fr WDmWa5XWqgu5HKjTzAk9HyMQlQ0NX/ZarS0UnOaKj7aV4Dm+s/9PbJ8IgiuUqRF6WYLS DC8ftdAnuUYnkENnO46pVKTEsnHaWislYT6Qf6zl+BMrIAVxgot3iPzYep8mMXRu9dSX 1ZxYwKk/6eASVx362B0Aar9qUOISTsawDa8ruignHQMa8Vufn91KWH16c6ToeOOW3r43 hyWvE0XHFvKCMr/33eNhDM26+7uOE4KAEbai4rtaDok51tjCL5ry+VEQLdo5jGVqBeL3 MMmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A6clkojqKpjdTaUHjaFWTeevyQq9O7rhCWN1zt+L8hI=; b=e/DvaxhJDuGBNKn7LMIOxX7MKpXIToMzSAnLROK/hLXDsLueYSeDStR+tHERkow8Ey +fBVN8dLuBNNhdAt4NDLBAsAc6SEaoSCLsNxI3RjgH+CmI2TroWKAUpHO+vUSYMp0e5v W2QMkdvdUO50YOGdoX6erX+C59nQyMJ372lkiWzaGlzGVdUD9QDPh9B2ctk4pYro6cwr 1T8GiTPjUDHtc0VS3KPMEcV0Naxwhb1LJyuqiGaVznToeTgfD1U++Dy0drPtiOixw93I j7QzZpod7p+GRhlX7Vv02+SjONF/w2s00/G7VPQMZg49z8KwBk7zqrDSlfFd7/sNaBxk NztQ== X-Gm-Message-State: AO0yUKWVDK/UeIgJNozUyijuiMxTZanpZGn6INjAytyufdgjeTVaOL8O 0ciBUdZnRvr9520FAdsD77tN0A== X-Received: by 2002:a17:906:a383:b0:878:1e3b:ae43 with SMTP id k3-20020a170906a38300b008781e3bae43mr651221ejz.46.1674617261303; Tue, 24 Jan 2023 19:27:41 -0800 (PST) Received: from localhost.localdomain (abyl109.neoplus.adsl.tpnet.pl. [83.9.31.109]) by smtp.gmail.com with ESMTPSA id if10-20020a170906df4a00b00738795e7d9bsm1742913ejc.2.2023.01.24.19.27.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 19:27:40 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , linux-kernel@vger.kernel.org Subject: [PATCH 6/7] soc: qcom: rpmpd: Move all RPMPD definitions up and sort them by name Date: Wed, 25 Jan 2023 04:27:27 +0100 Message-Id: <20230125032728.611640-7-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230125032728.611640-1-konrad.dybcio@linaro.org> References: <20230125032728.611640-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755963676153161863?= X-GMAIL-MSGID: =?utf-8?q?1755963676153161863?= Move all the RPMPD definitions to the top of the file and sort them to improve maintainability and ease searching through them when adding support for a new SoC. Signed-off-by: Konrad Dybcio --- drivers/soc/qcom/rpmpd.c | 605 ++++++++++++++++++++------------------- 1 file changed, 304 insertions(+), 301 deletions(-) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 38a85a07fa67..ca4e18cb9e84 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -68,70 +68,6 @@ struct rpmpd_desc { static DEFINE_MUTEX(rpmpd_lock); -static struct rpmpd cx_s3a_lvl_ao; -static struct rpmpd cx_s3a_lvl = { - .pd = { .name = "vddcx", }, - .peer = &cx_s3a_lvl_ao, - .res_type = RPMPD_SMPA, - .res_id = 3, - .key = KEY_LEVEL, -}; - -static struct rpmpd cx_s3a_lvl_ao = { - .pd = { .name = "vddcx_ao", }, - .peer = &cx_s3a_lvl, - .active_only = true, - .res_type = RPMPD_SMPA, - .res_id = 3, - .key = KEY_LEVEL, -}; - -static struct rpmpd cx_s3a_lvl_vfl = { - .pd = { .name = "vddcx_vfl", }, - .res_type = RPMPD_SMPA, - .res_id = 3, - .key = KEY_FLOOR_LEVEL, -}; - -static struct rpmpd mx_l12a_lvl_ao; -static struct rpmpd mx_l12a_lvl = { - .pd = { .name = "vddmx", }, - .peer = &mx_l12a_lvl_ao, - .res_type = RPMPD_LDOA, - .res_id = 12, - .key = KEY_LEVEL, -}; - -static struct rpmpd mx_l12a_lvl_ao = { - .pd = { .name = "vddmx_ao", }, - .peer = &mx_l12a_lvl, - .active_only = true, - .res_type = RPMPD_LDOA, - .res_id = 12, - .key = KEY_LEVEL, -}; - -static struct rpmpd mx_l12a_lvl_vfl = { - .pd = { .name = "vddmx_vfl", }, - .res_type = RPMPD_LDOA, - .res_id = 12, - .key = KEY_FLOOR_LEVEL, -}; - -static struct rpmpd *mdm9607_rpmpds[] = { - [MDM9607_VDDCX] = &cx_s3a_lvl, - [MDM9607_VDDCX_AO] = &cx_s3a_lvl_ao, - [MDM9607_VDDCX_VFL] = &cx_s3a_lvl_vfl, - [MDM9607_VDDMX] = &mx_l12a_lvl, - [MDM9607_VDDMX_AO] = &mx_l12a_lvl_ao, - [MDM9607_VDDMX_VFL] = &mx_l12a_lvl_vfl, -}; - -static const struct rpmpd_desc mdm9607_desc = { - .rpmpds = mdm9607_rpmpds, - .num_pds = ARRAY_SIZE(mdm9607_rpmpds), - .max_state = RPM_SMD_LEVEL_TURBO, -}; static struct rpmpd cx_s1a_corner_ao; static struct rpmpd cx_s1a_corner = { @@ -158,115 +94,119 @@ static struct rpmpd cx_s1a_corner_vfc = { .key = KEY_FLOOR_CORNER, }; -static struct rpmpd *msm8226_rpmpds[] = { - [MSM8226_VDDCX] = &cx_s1a_corner, - [MSM8226_VDDCX_AO] = &cx_s1a_corner_ao, - [MSM8226_VDDCX_VFC] = &cx_s1a_corner_vfc, -}; - -static const struct rpmpd_desc msm8226_desc = { - .rpmpds = msm8226_rpmpds, - .num_pds = ARRAY_SIZE(msm8226_rpmpds), - .max_state = MAX_CORNER_RPMPD_STATE, -}; - -static struct rpmpd md_s1a_corner_ao; -static struct rpmpd md_s1a_corner = { - .pd = { .name = "vddmd", }, - .peer = &md_s1a_corner_ao, +static struct rpmpd cx_s2a_corner_ao; +static struct rpmpd cx_s2a_corner = { + .pd = { .name = "vddcx", }, + .peer = &cx_s2a_corner_ao, .res_type = RPMPD_SMPA, - .res_id = 1, + .res_id = 2, .key = KEY_CORNER, }; -static struct rpmpd md_s1a_corner_ao = { - .pd = { .name = "vddmd_ao", }, - .peer = &md_s1a_corner, +static struct rpmpd cx_s2a_corner_ao = { + .pd = { .name = "vddcx_ao", }, + .peer = &cx_s2a_corner, .active_only = true, .res_type = RPMPD_SMPA, - .res_id = 1, + .res_id = 2, .key = KEY_CORNER, }; -static struct rpmpd md_s1a_corner_vfc = { - .pd = { .name = "vddmd_vfc", }, +static struct rpmpd cx_s2a_corner_vfc = { + .pd = { .name = "vddcx_vfc", }, .res_type = RPMPD_SMPA, - .res_id = 1, + .res_id = 2, .key = KEY_FLOOR_CORNER, }; -static struct rpmpd cx_s2a_corner_ao; -static struct rpmpd cx_s2a_corner = { +static struct rpmpd cx_s2a_lvl_ao; +static struct rpmpd cx_s2a_lvl = { .pd = { .name = "vddcx", }, - .peer = &cx_s2a_corner_ao, + .peer = &cx_s2a_lvl_ao, .res_type = RPMPD_SMPA, .res_id = 2, - .key = KEY_CORNER, + .key = KEY_LEVEL, }; -static struct rpmpd cx_s2a_corner_ao = { +static struct rpmpd cx_s2a_lvl_ao = { .pd = { .name = "vddcx_ao", }, - .peer = &cx_s2a_corner, + .peer = &cx_s2a_lvl, .active_only = true, .res_type = RPMPD_SMPA, .res_id = 2, - .key = KEY_CORNER, + .key = KEY_LEVEL, }; -static struct rpmpd cx_s2a_corner_vfc = { - .pd = { .name = "vddcx_vfc", }, +static struct rpmpd cx_s2a_lvl_vfl = { + .pd = { .name = "vddcx_vfl", }, .res_type = RPMPD_SMPA, .res_id = 2, - .key = KEY_FLOOR_CORNER, + .key = KEY_FLOOR_LEVEL, }; -static struct rpmpd mx_l3a_corner_ao; -static struct rpmpd mx_l3a_corner = { - .pd = { .name = "vddmx", }, - .peer = &mx_l3a_corner_ao, - .res_type = RPMPD_LDOA, +static struct rpmpd cx_s3a_lvl_ao; +static struct rpmpd cx_s3a_lvl = { + .pd = { .name = "vddcx", }, + .peer = &cx_s3a_lvl_ao, + .res_type = RPMPD_SMPA, .res_id = 3, - .key = KEY_CORNER, + .key = KEY_LEVEL, }; -static struct rpmpd mx_l3a_corner_ao = { - .pd = { .name = "vddmx_ao", }, - .peer = &mx_l3a_corner, +static struct rpmpd cx_s3a_lvl_ao = { + .pd = { .name = "vddcx_ao", }, + .peer = &cx_s3a_lvl, .active_only = true, - .res_type = RPMPD_LDOA, + .res_type = RPMPD_SMPA, + .res_id = 3, + .key = KEY_LEVEL, +}; + +static struct rpmpd cx_s3a_lvl_vfl = { + .pd = { .name = "vddcx_vfl", }, + .res_type = RPMPD_SMPA, .res_id = 3, + .key = KEY_FLOOR_LEVEL, +}; + +static struct rpmpd gfx_s2b_corner = { + .pd = { .name = "vddgfx", }, + /* SMPC if your board has a PM8004! */ + .res_type = RPMPD_SMPB, + .res_id = 2, .key = KEY_CORNER, }; -static struct rpmpd *msm8939_rpmpds[] = { - [MSM8939_VDDMDCX] = &md_s1a_corner, - [MSM8939_VDDMDCX_AO] = &md_s1a_corner_ao, - [MSM8939_VDDMDCX_VFC] = &md_s1a_corner_vfc, - [MSM8939_VDDCX] = &cx_s2a_corner, - [MSM8939_VDDCX_AO] = &cx_s2a_corner_ao, - [MSM8939_VDDCX_VFC] = &cx_s2a_corner_vfc, - [MSM8939_VDDMX] = &mx_l3a_corner, - [MSM8939_VDDMX_AO] = &mx_l3a_corner_ao, +static struct rpmpd gfx_s2b_corner_vfc = { + .pd = { .name = "vddgfx_vfc", }, + .res_type = RPMPD_SMPB, + .res_id = 2, + .key = KEY_FLOOR_CORNER, }; -static const struct rpmpd_desc msm8939_desc = { - .rpmpds = msm8939_rpmpds, - .num_pds = ARRAY_SIZE(msm8939_rpmpds), - .max_state = MAX_CORNER_RPMPD_STATE, +static struct rpmpd md_s1a_corner_ao; +static struct rpmpd md_s1a_corner = { + .pd = { .name = "vddmd", }, + .peer = &md_s1a_corner_ao, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_CORNER, }; -static struct rpmpd *msm8916_rpmpds[] = { - [MSM8916_VDDCX] = &cx_s1a_corner, - [MSM8916_VDDCX_AO] = &cx_s1a_corner_ao, - [MSM8916_VDDCX_VFC] = &cx_s1a_corner_vfc, - [MSM8916_VDDMX] = &mx_l3a_corner, - [MSM8916_VDDMX_AO] = &mx_l3a_corner_ao, +static struct rpmpd md_s1a_corner_ao = { + .pd = { .name = "vddmd_ao", }, + .peer = &md_s1a_corner, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_CORNER, }; -static const struct rpmpd_desc msm8916_desc = { - .rpmpds = msm8916_rpmpds, - .num_pds = ARRAY_SIZE(msm8916_rpmpds), - .max_state = MAX_CORNER_RPMPD_STATE, +static struct rpmpd md_s1a_corner_vfc = { + .pd = { .name = "vddmd_vfc", }, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_FLOOR_CORNER, }; static struct rpmpd md_s1a_lvl_ao; @@ -287,63 +227,40 @@ static struct rpmpd md_s1a_lvl_ao = { .key = KEY_LEVEL, }; -static struct rpmpd cx_s2a_lvl_ao; -static struct rpmpd cx_s2a_lvl = { - .pd = { .name = "vddcx", }, - .peer = &cx_s2a_lvl_ao, - .res_type = RPMPD_SMPA, - .res_id = 2, - .key = KEY_LEVEL, +static struct rpmpd mx_l3a_corner_ao; +static struct rpmpd mx_l3a_corner = { + .pd = { .name = "vddmx", }, + .peer = &mx_l3a_corner_ao, + .res_type = RPMPD_LDOA, + .res_id = 3, + .key = KEY_CORNER, }; -static struct rpmpd cx_s2a_lvl_ao = { - .pd = { .name = "vddcx_ao", }, - .peer = &cx_s2a_lvl, +static struct rpmpd mx_l3a_corner_ao = { + .pd = { .name = "vddmx_ao", }, + .peer = &mx_l3a_corner, .active_only = true, - .res_type = RPMPD_SMPA, - .res_id = 2, - .key = KEY_LEVEL, + .res_type = RPMPD_LDOA, + .res_id = 3, + .key = KEY_CORNER, }; -static struct rpmpd mx_s7a_lvl_ao; -static struct rpmpd mx_s7a_lvl = { +static struct rpmpd mx_s2a_corner_ao; +static struct rpmpd mx_s2a_corner = { .pd = { .name = "vddmx", }, - .peer = &mx_s7a_lvl_ao, + .peer = &mx_s2a_corner_ao, .res_type = RPMPD_SMPA, - .res_id = 7, - .key = KEY_LEVEL, + .res_id = 2, + .key = KEY_CORNER, }; -static struct rpmpd mx_s7a_lvl_ao = { +static struct rpmpd mx_s2a_corner_ao = { .pd = { .name = "vddmx_ao", }, - .peer = &mx_s7a_lvl, + .peer = &mx_s2a_corner, .active_only = true, .res_type = RPMPD_SMPA, - .res_id = 7, - .key = KEY_LEVEL, -}; - -static struct rpmpd cx_s2a_lvl_vfl = { - .pd = { .name = "vddcx_vfl", }, - .res_type = RPMPD_SMPA, .res_id = 2, - .key = KEY_FLOOR_LEVEL, -}; - -static struct rpmpd *msm8953_rpmpds[] = { - [MSM8953_VDDMD] = &md_s1a_lvl, - [MSM8953_VDDMD_AO] = &md_s1a_lvl_ao, - [MSM8953_VDDCX] = &cx_s2a_lvl, - [MSM8953_VDDCX_AO] = &cx_s2a_lvl_ao, - [MSM8953_VDDCX_VFL] = &cx_s2a_lvl_vfl, - [MSM8953_VDDMX] = &mx_s7a_lvl, - [MSM8953_VDDMX_AO] = &mx_s7a_lvl_ao, -}; - -static const struct rpmpd_desc msm8953_desc = { - .rpmpds = msm8953_rpmpds, - .num_pds = ARRAY_SIZE(msm8953_rpmpds), - .max_state = RPM_SMD_LEVEL_TURBO, + .key = KEY_CORNER, }; static struct rpmpd mx_s6a_lvl_ao; @@ -371,98 +288,47 @@ static struct rpmpd mx_s6a_lvl_vfl = { .key = KEY_FLOOR_LEVEL, }; -static struct rpmpd *msm8976_rpmpds[] = { - [MSM8976_VDDCX] = &cx_s2a_lvl, - [MSM8976_VDDCX_AO] = &cx_s2a_lvl_ao, - [MSM8976_VDDCX_VFL] = &cx_s2a_lvl_vfl, - [MSM8976_VDDMX] = &mx_s6a_lvl, - [MSM8976_VDDMX_AO] = &mx_s6a_lvl_ao, - [MSM8976_VDDMX_VFL] = &mx_s6a_lvl_vfl, -}; - -static const struct rpmpd_desc msm8976_desc = { - .rpmpds = msm8976_rpmpds, - .num_pds = ARRAY_SIZE(msm8976_rpmpds), - .max_state = RPM_SMD_LEVEL_TURBO_HIGH, -}; - -static struct rpmpd mx_s2a_corner_ao; -static struct rpmpd mx_s2a_corner = { +static struct rpmpd mx_s7a_lvl_ao; +static struct rpmpd mx_s7a_lvl = { .pd = { .name = "vddmx", }, - .peer = &mx_s2a_corner_ao, + .peer = &mx_s7a_lvl_ao, .res_type = RPMPD_SMPA, - .res_id = 2, - .key = KEY_CORNER, + .res_id = 7, + .key = KEY_LEVEL, }; -static struct rpmpd mx_s2a_corner_ao = { +static struct rpmpd mx_s7a_lvl_ao = { .pd = { .name = "vddmx_ao", }, - .peer = &mx_s2a_corner, + .peer = &mx_s7a_lvl, .active_only = true, .res_type = RPMPD_SMPA, - .res_id = 2, - .key = KEY_CORNER, -}; - -static struct rpmpd gfx_s2b_corner = { - .pd = { .name = "vddgfx", }, - /* SMPC if your board has a PM8004! */ - .res_type = RPMPD_SMPB, - .res_id = 2, - .key = KEY_CORNER, -}; - -static struct rpmpd gfx_s2b_corner_vfc = { - .pd = { .name = "vddgfx_vfc", }, - .res_type = RPMPD_SMPB, - .res_id = 2, - .key = KEY_FLOOR_CORNER, -}; - -static struct rpmpd *msm8994_rpmpds[] = { - [MSM8994_VDDCX] = &cx_s1a_corner, - [MSM8994_VDDCX_AO] = &cx_s1a_corner_ao, - [MSM8994_VDDCX_VFC] = &cx_s1a_corner_vfc, - [MSM8994_VDDMX] = &mx_s2a_corner, - [MSM8994_VDDMX_AO] = &mx_s2a_corner_ao, - [MSM8994_VDDGFX] = &gfx_s2b_corner, - [MSM8994_VDDGFX_VFC] = &gfx_s2b_corner_vfc, -}; - -static const struct rpmpd_desc msm8994_desc = { - .rpmpds = msm8994_rpmpds, - .num_pds = ARRAY_SIZE(msm8994_rpmpds), - .max_state = MAX_CORNER_RPMPD_STATE, -}; - -static struct rpmpd sscx_l26a_corner = { - .pd = { .name = "vddsscx", }, - .res_type = RPMPD_LDOA, - .res_id = 26, - .key = KEY_CORNER, + .res_id = 7, + .key = KEY_LEVEL, }; -static struct rpmpd sscx_l26a_corner_vfc = { - .pd = { .name = "vddsscx_vfc", }, +static struct rpmpd mx_l12a_lvl_ao; +static struct rpmpd mx_l12a_lvl = { + .pd = { .name = "vddmx", }, + .peer = &mx_l12a_lvl_ao, .res_type = RPMPD_LDOA, - .res_id = 26, - .key = KEY_FLOOR_CORNER, + .res_id = 12, + .key = KEY_LEVEL, }; -static struct rpmpd *msm8996_rpmpds[] = { - [MSM8996_VDDCX] = &cx_s1a_corner, - [MSM8996_VDDCX_AO] = &cx_s1a_corner_ao, - [MSM8996_VDDCX_VFC] = &cx_s1a_corner_vfc, - [MSM8996_VDDMX] = &mx_s2a_corner, - [MSM8996_VDDMX_AO] = &mx_s2a_corner_ao, - [MSM8996_VDDSSCX] = &sscx_l26a_corner, - [MSM8996_VDDSSCX_VFC] = &sscx_l26a_corner_vfc, +static struct rpmpd mx_l12a_lvl_ao = { + .pd = { .name = "vddmx_ao", }, + .peer = &mx_l12a_lvl, + .active_only = true, + .res_type = RPMPD_LDOA, + .res_id = 12, + .key = KEY_LEVEL, }; -static const struct rpmpd_desc msm8996_desc = { - .rpmpds = msm8996_rpmpds, - .num_pds = ARRAY_SIZE(msm8996_rpmpds), - .max_state = MAX_CORNER_RPMPD_STATE, +static struct rpmpd mx_l12a_lvl_vfl = { + .pd = { .name = "vddmx_vfl", }, + .res_type = RPMPD_LDOA, + .res_id = 12, + .key = KEY_FLOOR_LEVEL, }; static struct rpmpd rwcx0_lvl_ao; @@ -490,6 +356,56 @@ static struct rpmpd rwcx0_lvl_vfl = { .key = KEY_FLOOR_LEVEL, }; +static struct rpmpd rwmx0_lvl; +static struct rpmpd rwmx0_lvl_ao; +static struct rpmpd rwgx0_lvl_ao_w_rwmx0_parent; +static struct rpmpd rwgx0_lvl_w_rwmx0_parent = { + .pd = { .name = "vddgx", }, + .peer = &rwgx0_lvl_ao_w_rwmx0_parent, + .parent = &rwmx0_lvl.pd, + .res_type = RPMPD_RWGX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd rwgx0_lvl_ao_w_rwmx0_parent = { + .pd = { .name = "vddgx_ao", }, + .peer = &rwgx0_lvl_w_rwmx0_parent, + .parent = &rwmx0_lvl_ao.pd, + .active_only = true, + .res_type = RPMPD_RWGX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd rwlc0_lvl = { + .pd = { .name = "vdd_lpi_cx", }, + .res_type = RPMPD_RWLC, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd rwlm0_lvl = { + .pd = { .name = "vdd_lpi_mx", }, + .res_type = RPMPD_RWLM, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd rwlc0_lvl_vfl = { + .pd = { .name = "vdd_lpicx_vfl", }, + .res_type = RPMPD_RWLC, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; + +static struct rpmpd rwlm0_lvl_vfl = { + .pd = { .name = "vdd_lpimx_vfl", }, + .res_type = RPMPD_RWLM, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; + static struct rpmpd rwmx0_lvl_ao; static struct rpmpd rwmx0_lvl = { .pd = { .name = "vddmx", }, @@ -543,6 +459,141 @@ static struct rpmpd rwsm0_lvl_vfl = { .key = KEY_FLOOR_LEVEL, }; +static struct rpmpd sscx_l26a_corner = { + .pd = { .name = "vddsscx", }, + .res_type = RPMPD_LDOA, + .res_id = 26, + .key = KEY_CORNER, +}; + +static struct rpmpd sscx_l26a_corner_vfc = { + .pd = { .name = "vddsscx_vfc", }, + .res_type = RPMPD_LDOA, + .res_id = 26, + .key = KEY_FLOOR_CORNER, +}; + +static struct rpmpd *mdm9607_rpmpds[] = { + [MDM9607_VDDCX] = &cx_s3a_lvl, + [MDM9607_VDDCX_AO] = &cx_s3a_lvl_ao, + [MDM9607_VDDCX_VFL] = &cx_s3a_lvl_vfl, + [MDM9607_VDDMX] = &mx_l12a_lvl, + [MDM9607_VDDMX_AO] = &mx_l12a_lvl_ao, + [MDM9607_VDDMX_VFL] = &mx_l12a_lvl_vfl, +}; + +static const struct rpmpd_desc mdm9607_desc = { + .rpmpds = mdm9607_rpmpds, + .num_pds = ARRAY_SIZE(mdm9607_rpmpds), + .max_state = RPM_SMD_LEVEL_TURBO, +}; + +static struct rpmpd *msm8226_rpmpds[] = { + [MSM8226_VDDCX] = &cx_s1a_corner, + [MSM8226_VDDCX_AO] = &cx_s1a_corner_ao, + [MSM8226_VDDCX_VFC] = &cx_s1a_corner_vfc, +}; + +static const struct rpmpd_desc msm8226_desc = { + .rpmpds = msm8226_rpmpds, + .num_pds = ARRAY_SIZE(msm8226_rpmpds), + .max_state = MAX_CORNER_RPMPD_STATE, +}; + +static struct rpmpd *msm8939_rpmpds[] = { + [MSM8939_VDDMDCX] = &md_s1a_corner, + [MSM8939_VDDMDCX_AO] = &md_s1a_corner_ao, + [MSM8939_VDDMDCX_VFC] = &md_s1a_corner_vfc, + [MSM8939_VDDCX] = &cx_s2a_corner, + [MSM8939_VDDCX_AO] = &cx_s2a_corner_ao, + [MSM8939_VDDCX_VFC] = &cx_s2a_corner_vfc, + [MSM8939_VDDMX] = &mx_l3a_corner, + [MSM8939_VDDMX_AO] = &mx_l3a_corner_ao, +}; + +static const struct rpmpd_desc msm8939_desc = { + .rpmpds = msm8939_rpmpds, + .num_pds = ARRAY_SIZE(msm8939_rpmpds), + .max_state = MAX_CORNER_RPMPD_STATE, +}; + +static struct rpmpd *msm8916_rpmpds[] = { + [MSM8916_VDDCX] = &cx_s1a_corner, + [MSM8916_VDDCX_AO] = &cx_s1a_corner_ao, + [MSM8916_VDDCX_VFC] = &cx_s1a_corner_vfc, + [MSM8916_VDDMX] = &mx_l3a_corner, + [MSM8916_VDDMX_AO] = &mx_l3a_corner_ao, +}; + +static const struct rpmpd_desc msm8916_desc = { + .rpmpds = msm8916_rpmpds, + .num_pds = ARRAY_SIZE(msm8916_rpmpds), + .max_state = MAX_CORNER_RPMPD_STATE, +}; + +static struct rpmpd *msm8953_rpmpds[] = { + [MSM8953_VDDMD] = &md_s1a_lvl, + [MSM8953_VDDMD_AO] = &md_s1a_lvl_ao, + [MSM8953_VDDCX] = &cx_s2a_lvl, + [MSM8953_VDDCX_AO] = &cx_s2a_lvl_ao, + [MSM8953_VDDCX_VFL] = &cx_s2a_lvl_vfl, + [MSM8953_VDDMX] = &mx_s7a_lvl, + [MSM8953_VDDMX_AO] = &mx_s7a_lvl_ao, +}; + +static const struct rpmpd_desc msm8953_desc = { + .rpmpds = msm8953_rpmpds, + .num_pds = ARRAY_SIZE(msm8953_rpmpds), + .max_state = RPM_SMD_LEVEL_TURBO, +}; + +static struct rpmpd *msm8976_rpmpds[] = { + [MSM8976_VDDCX] = &cx_s2a_lvl, + [MSM8976_VDDCX_AO] = &cx_s2a_lvl_ao, + [MSM8976_VDDCX_VFL] = &cx_s2a_lvl_vfl, + [MSM8976_VDDMX] = &mx_s6a_lvl, + [MSM8976_VDDMX_AO] = &mx_s6a_lvl_ao, + [MSM8976_VDDMX_VFL] = &mx_s6a_lvl_vfl, +}; + +static const struct rpmpd_desc msm8976_desc = { + .rpmpds = msm8976_rpmpds, + .num_pds = ARRAY_SIZE(msm8976_rpmpds), + .max_state = RPM_SMD_LEVEL_TURBO_HIGH, +}; + +static struct rpmpd *msm8994_rpmpds[] = { + [MSM8994_VDDCX] = &cx_s1a_corner, + [MSM8994_VDDCX_AO] = &cx_s1a_corner_ao, + [MSM8994_VDDCX_VFC] = &cx_s1a_corner_vfc, + [MSM8994_VDDMX] = &mx_s2a_corner, + [MSM8994_VDDMX_AO] = &mx_s2a_corner_ao, + [MSM8994_VDDGFX] = &gfx_s2b_corner, + [MSM8994_VDDGFX_VFC] = &gfx_s2b_corner_vfc, +}; + +static const struct rpmpd_desc msm8994_desc = { + .rpmpds = msm8994_rpmpds, + .num_pds = ARRAY_SIZE(msm8994_rpmpds), + .max_state = MAX_CORNER_RPMPD_STATE, +}; + +static struct rpmpd *msm8996_rpmpds[] = { + [MSM8996_VDDCX] = &cx_s1a_corner, + [MSM8996_VDDCX_AO] = &cx_s1a_corner_ao, + [MSM8996_VDDCX_VFC] = &cx_s1a_corner_vfc, + [MSM8996_VDDMX] = &mx_s2a_corner, + [MSM8996_VDDMX_AO] = &mx_s2a_corner_ao, + [MSM8996_VDDSSCX] = &sscx_l26a_corner, + [MSM8996_VDDSSCX_VFC] = &sscx_l26a_corner_vfc, +}; + +static const struct rpmpd_desc msm8996_desc = { + .rpmpds = msm8996_rpmpds, + .num_pds = ARRAY_SIZE(msm8996_rpmpds), + .max_state = MAX_CORNER_RPMPD_STATE, +}; + static struct rpmpd *msm8998_rpmpds[] = { [MSM8998_VDDCX] = &rwcx0_lvl, [MSM8998_VDDCX_AO] = &rwcx0_lvl_ao, @@ -562,34 +613,6 @@ static const struct rpmpd_desc msm8998_desc = { .max_state = RPM_SMD_LEVEL_BINNING, }; -static struct rpmpd rwlc0_lvl = { - .pd = { .name = "vdd_lpi_cx", }, - .res_type = RPMPD_RWLC, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd rwlm0_lvl = { - .pd = { .name = "vdd_lpi_mx", }, - .res_type = RPMPD_RWLM, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd rwlc0_lvl_vfl = { - .pd = { .name = "vdd_lpicx_vfl", }, - .res_type = RPMPD_RWLC, - .res_id = 0, - .key = KEY_FLOOR_LEVEL, -}; - -static struct rpmpd rwlm0_lvl_vfl = { - .pd = { .name = "vdd_lpimx_vfl", }, - .res_type = RPMPD_RWLM, - .res_id = 0, - .key = KEY_FLOOR_LEVEL, -}; - static struct rpmpd *qcs404_rpmpds[] = { [QCS404_VDDMX] = &rwmx0_lvl, [QCS404_VDDMX_AO] = &rwmx0_lvl_ao, @@ -657,26 +680,6 @@ static const struct rpmpd_desc sm6125_desc = { .max_state = RPM_SMD_LEVEL_BINNING, }; -static struct rpmpd rwgx0_lvl_ao_w_rwmx0_parent; -static struct rpmpd rwgx0_lvl_w_rwmx0_parent = { - .pd = { .name = "vddgx", }, - .peer = &rwgx0_lvl_ao_w_rwmx0_parent, - .parent = &rwmx0_lvl.pd, - .res_type = RPMPD_RWGX, - .res_id = 0, - .key = KEY_LEVEL, -}; - -static struct rpmpd rwgx0_lvl_ao_w_rwmx0_parent = { - .pd = { .name = "vddgx_ao", }, - .peer = &rwgx0_lvl_w_rwmx0_parent, - .parent = &rwmx0_lvl_ao.pd, - .active_only = true, - .res_type = RPMPD_RWGX, - .res_id = 0, - .key = KEY_LEVEL, -}; - static struct rpmpd *sm6375_rpmpds[] = { [SM6375_VDDCX] = &rwcx0_lvl, [SM6375_VDDCX_AO] = &rwcx0_lvl_ao, From patchwork Wed Jan 25 03:27:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 48009 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp72702wrn; Tue, 24 Jan 2023 19:30:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXsl3GzxyJzbiu2XCWNR/wBSAp4kuOX+n7fiyAZgGA7Tff0eCOHz3A8eXGOfHB8ncAUukv9e X-Received: by 2002:a17:90b:3a82:b0:22b:b672:f8a6 with SMTP id om2-20020a17090b3a8200b0022bb672f8a6mr17581367pjb.10.1674617438205; Tue, 24 Jan 2023 19:30:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674617438; cv=none; d=google.com; s=arc-20160816; b=baNqlr1cFGhrM40ZGe6CaoaDFgRtES7fK2+D1EpYcwCWD/pZcbTE4TVx/T123kyAUl K9BkpNkArqsvE8hUf3eM6/11K8QXNL9kMk1RXPV/WGom0vdMcwcL2Ig/PCphScDm5HGF +l7vuryOHG06NtY9GlSoY3GMXO+x5LIfPg9OldPINnDZt36JWw5LOtruJWlszalX9CPC 4NrCRTCYAQurvcH2GTzbVDN2A3MTYHRCnawEMVi0i14yKW6Li/G9UVyM48CgmrgG1luu 1lmCZietTi0gTRiKHxXlHJMTmmdRqZAowpqyg5AtqXtLkMulOE8DpyklgKG3+vySRjIH QltA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Cief22734797WLDji2/FiBHV81HsLlTLIjX7CLjaTOI=; b=VjzQyZt5sYheJXGaBGrPJxH9eqrcojLndSvvefF9BhZSSN29SDbRd6B7/Az8+Fumh1 mKX0X4FeDnNLTe1qMKvidz9O3zji1tJPbigxdstFN0ML8X1UDyC0BjyIICSLsfBtwKvo ITtplFn/f15UYxH/v0Xwbm/TAo9eMyFZPeUPAE35n1945GWOjo8XmB+Ilr3LdbpZ++2q sXrAlumo9OI4HMY1r1yB2VrCyeiKzR4WlTYDuC/C2nPrOdletBFz9e5N+VciyCvx9eCX 0QpkXSSkWFmjpYbhft+WyGYxRldHDG2qq/5/00jzcyxJxyxVS2NAZpDFS2b5dhNVjiSq MSkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qr3Jfmuf; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g21-20020a633755000000b0047798cc3bffsi3862771pgn.246.2023.01.24.19.30.20; Tue, 24 Jan 2023 19:30:38 -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; dkim=pass header.i=@linaro.org header.s=google header.b=qr3Jfmuf; 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 S234547AbjAYD2E (ORCPT + 99 others); Tue, 24 Jan 2023 22:28:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234376AbjAYD1v (ORCPT ); Tue, 24 Jan 2023 22:27:51 -0500 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EDB483D6 for ; Tue, 24 Jan 2023 19:27:44 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id vw16so44169436ejc.12 for ; Tue, 24 Jan 2023 19:27:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Cief22734797WLDji2/FiBHV81HsLlTLIjX7CLjaTOI=; b=qr3JfmufZtzlwaTKlB6fcSo6b305UALGQXcBhxrKzE+ijkP3z/S6yLySjSqUKw0MEv P9ue8Hf4a0tWL2TKPmjHGF79Zc4sZvSl/sHqFhPgWGmompy1UP0mm9ptAfiJz7imQR7V 9OHHCe4XC61N93JA2XRSLy6voxA4DHR279bxy2gwfym5B0uJ9+zfGoxYBUFC582f59Zs 34ezuR4SICD3FFtqk77VTxpYk+vzJNMGStw/mlDNp4VACPLyh8M5wlAWEDcGJ2kXR5sz +gf6oJqoIgEkPfwnEiA+0fbtnoWb31ZBztxgy9cRlPJg8HdiK3Yj9J0ixGeZ9CyKqYhK 64sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Cief22734797WLDji2/FiBHV81HsLlTLIjX7CLjaTOI=; b=pxJrx61AdmABKNODNAadO+mjznma5nwTBLmf00ynG0DAPSG7wOjguF1hh4b84jYhPD 1BNzycbbkbxWrWnvkQfxruw9oSk6wAcFP1yFuNkLNo+vSeF7303PrC+FY/2UDb3rkW4d /icnF8XJZ/9+tKsb3tW4tLRY1oXTpiitv8NOl6Fd4uVL/3/O8E1LqeIdDJLMDRD4Wohd mkddvROMUmQOEfUtZwhFaTyTFP7u8gNWpwgDINiCeJQmwD8yT9+joG47FSMnjcisTiE9 hMH8RyC0ETW+p/NjeUDOQe8akTwL7Firo7Y3lyImd+EwSmJJuOUQP9MyoMWp1EcZTyAN uzVg== X-Gm-Message-State: AFqh2kreA0rtRyowX+Qxw9kkBs4Ett1J5Lgc1cNvIcL39nAKA80dXm/y Z6ru7G1hjNUsUKD+DfLGHD3O8g== X-Received: by 2002:a17:907:d401:b0:872:1b27:1a43 with SMTP id vi1-20020a170907d40100b008721b271a43mr35217202ejc.31.1674617262730; Tue, 24 Jan 2023 19:27:42 -0800 (PST) Received: from localhost.localdomain (abyl109.neoplus.adsl.tpnet.pl. [83.9.31.109]) by smtp.gmail.com with ESMTPSA id if10-20020a170906df4a00b00738795e7d9bsm1742913ejc.2.2023.01.24.19.27.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 19:27:42 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , linux-kernel@vger.kernel.org Subject: [PATCH 7/7] soc: qcom: rpmpd: Make bindings assignments consistent Date: Wed, 25 Jan 2023 04:27:28 +0100 Message-Id: <20230125032728.611640-8-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230125032728.611640-1-konrad.dybcio@linaro.org> References: <20230125032728.611640-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755963654594290414?= X-GMAIL-MSGID: =?utf-8?q?1755963654594290414?= Currently the whitespace between [DT_BINDING] = &struct is all over the place.. some SoC structs have a space, others have a tab, others have N tabs.. Make that a single space for everybody to keep things coherent. Signed-off-by: Konrad Dybcio --- drivers/soc/qcom/rpmpd.c | 164 +++++++++++++++++++-------------------- 1 file changed, 82 insertions(+), 82 deletions(-) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index ca4e18cb9e84..8f34fd826cbb 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -474,12 +474,12 @@ static struct rpmpd sscx_l26a_corner_vfc = { }; static struct rpmpd *mdm9607_rpmpds[] = { - [MDM9607_VDDCX] = &cx_s3a_lvl, - [MDM9607_VDDCX_AO] = &cx_s3a_lvl_ao, - [MDM9607_VDDCX_VFL] = &cx_s3a_lvl_vfl, - [MDM9607_VDDMX] = &mx_l12a_lvl, - [MDM9607_VDDMX_AO] = &mx_l12a_lvl_ao, - [MDM9607_VDDMX_VFL] = &mx_l12a_lvl_vfl, + [MDM9607_VDDCX] = &cx_s3a_lvl, + [MDM9607_VDDCX_AO] = &cx_s3a_lvl_ao, + [MDM9607_VDDCX_VFL] = &cx_s3a_lvl_vfl, + [MDM9607_VDDMX] = &mx_l12a_lvl, + [MDM9607_VDDMX_AO] = &mx_l12a_lvl_ao, + [MDM9607_VDDMX_VFL] = &mx_l12a_lvl_vfl, }; static const struct rpmpd_desc mdm9607_desc = { @@ -489,9 +489,9 @@ static const struct rpmpd_desc mdm9607_desc = { }; static struct rpmpd *msm8226_rpmpds[] = { - [MSM8226_VDDCX] = &cx_s1a_corner, - [MSM8226_VDDCX_AO] = &cx_s1a_corner_ao, - [MSM8226_VDDCX_VFC] = &cx_s1a_corner_vfc, + [MSM8226_VDDCX] = &cx_s1a_corner, + [MSM8226_VDDCX_AO] = &cx_s1a_corner_ao, + [MSM8226_VDDCX_VFC] = &cx_s1a_corner_vfc, }; static const struct rpmpd_desc msm8226_desc = { @@ -501,14 +501,14 @@ static const struct rpmpd_desc msm8226_desc = { }; static struct rpmpd *msm8939_rpmpds[] = { - [MSM8939_VDDMDCX] = &md_s1a_corner, - [MSM8939_VDDMDCX_AO] = &md_s1a_corner_ao, - [MSM8939_VDDMDCX_VFC] = &md_s1a_corner_vfc, - [MSM8939_VDDCX] = &cx_s2a_corner, - [MSM8939_VDDCX_AO] = &cx_s2a_corner_ao, - [MSM8939_VDDCX_VFC] = &cx_s2a_corner_vfc, - [MSM8939_VDDMX] = &mx_l3a_corner, - [MSM8939_VDDMX_AO] = &mx_l3a_corner_ao, + [MSM8939_VDDMDCX] = &md_s1a_corner, + [MSM8939_VDDMDCX_AO] = &md_s1a_corner_ao, + [MSM8939_VDDMDCX_VFC] = &md_s1a_corner_vfc, + [MSM8939_VDDCX] = &cx_s2a_corner, + [MSM8939_VDDCX_AO] = &cx_s2a_corner_ao, + [MSM8939_VDDCX_VFC] = &cx_s2a_corner_vfc, + [MSM8939_VDDMX] = &mx_l3a_corner, + [MSM8939_VDDMX_AO] = &mx_l3a_corner_ao, }; static const struct rpmpd_desc msm8939_desc = { @@ -518,11 +518,11 @@ static const struct rpmpd_desc msm8939_desc = { }; static struct rpmpd *msm8916_rpmpds[] = { - [MSM8916_VDDCX] = &cx_s1a_corner, - [MSM8916_VDDCX_AO] = &cx_s1a_corner_ao, - [MSM8916_VDDCX_VFC] = &cx_s1a_corner_vfc, - [MSM8916_VDDMX] = &mx_l3a_corner, - [MSM8916_VDDMX_AO] = &mx_l3a_corner_ao, + [MSM8916_VDDCX] = &cx_s1a_corner, + [MSM8916_VDDCX_AO] = &cx_s1a_corner_ao, + [MSM8916_VDDCX_VFC] = &cx_s1a_corner_vfc, + [MSM8916_VDDMX] = &mx_l3a_corner, + [MSM8916_VDDMX_AO] = &mx_l3a_corner_ao, }; static const struct rpmpd_desc msm8916_desc = { @@ -532,13 +532,13 @@ static const struct rpmpd_desc msm8916_desc = { }; static struct rpmpd *msm8953_rpmpds[] = { - [MSM8953_VDDMD] = &md_s1a_lvl, - [MSM8953_VDDMD_AO] = &md_s1a_lvl_ao, - [MSM8953_VDDCX] = &cx_s2a_lvl, - [MSM8953_VDDCX_AO] = &cx_s2a_lvl_ao, - [MSM8953_VDDCX_VFL] = &cx_s2a_lvl_vfl, - [MSM8953_VDDMX] = &mx_s7a_lvl, - [MSM8953_VDDMX_AO] = &mx_s7a_lvl_ao, + [MSM8953_VDDMD] = &md_s1a_lvl, + [MSM8953_VDDMD_AO] = &md_s1a_lvl_ao, + [MSM8953_VDDCX] = &cx_s2a_lvl, + [MSM8953_VDDCX_AO] = &cx_s2a_lvl_ao, + [MSM8953_VDDCX_VFL] = &cx_s2a_lvl_vfl, + [MSM8953_VDDMX] = &mx_s7a_lvl, + [MSM8953_VDDMX_AO] = &mx_s7a_lvl_ao, }; static const struct rpmpd_desc msm8953_desc = { @@ -548,12 +548,12 @@ static const struct rpmpd_desc msm8953_desc = { }; static struct rpmpd *msm8976_rpmpds[] = { - [MSM8976_VDDCX] = &cx_s2a_lvl, - [MSM8976_VDDCX_AO] = &cx_s2a_lvl_ao, - [MSM8976_VDDCX_VFL] = &cx_s2a_lvl_vfl, - [MSM8976_VDDMX] = &mx_s6a_lvl, - [MSM8976_VDDMX_AO] = &mx_s6a_lvl_ao, - [MSM8976_VDDMX_VFL] = &mx_s6a_lvl_vfl, + [MSM8976_VDDCX] = &cx_s2a_lvl, + [MSM8976_VDDCX_AO] = &cx_s2a_lvl_ao, + [MSM8976_VDDCX_VFL] = &cx_s2a_lvl_vfl, + [MSM8976_VDDMX] = &mx_s6a_lvl, + [MSM8976_VDDMX_AO] = &mx_s6a_lvl_ao, + [MSM8976_VDDMX_VFL] = &mx_s6a_lvl_vfl, }; static const struct rpmpd_desc msm8976_desc = { @@ -563,13 +563,13 @@ static const struct rpmpd_desc msm8976_desc = { }; static struct rpmpd *msm8994_rpmpds[] = { - [MSM8994_VDDCX] = &cx_s1a_corner, - [MSM8994_VDDCX_AO] = &cx_s1a_corner_ao, - [MSM8994_VDDCX_VFC] = &cx_s1a_corner_vfc, - [MSM8994_VDDMX] = &mx_s2a_corner, - [MSM8994_VDDMX_AO] = &mx_s2a_corner_ao, - [MSM8994_VDDGFX] = &gfx_s2b_corner, - [MSM8994_VDDGFX_VFC] = &gfx_s2b_corner_vfc, + [MSM8994_VDDCX] = &cx_s1a_corner, + [MSM8994_VDDCX_AO] = &cx_s1a_corner_ao, + [MSM8994_VDDCX_VFC] = &cx_s1a_corner_vfc, + [MSM8994_VDDMX] = &mx_s2a_corner, + [MSM8994_VDDMX_AO] = &mx_s2a_corner_ao, + [MSM8994_VDDGFX] = &gfx_s2b_corner, + [MSM8994_VDDGFX_VFC] = &gfx_s2b_corner_vfc, }; static const struct rpmpd_desc msm8994_desc = { @@ -579,12 +579,12 @@ static const struct rpmpd_desc msm8994_desc = { }; static struct rpmpd *msm8996_rpmpds[] = { - [MSM8996_VDDCX] = &cx_s1a_corner, - [MSM8996_VDDCX_AO] = &cx_s1a_corner_ao, - [MSM8996_VDDCX_VFC] = &cx_s1a_corner_vfc, - [MSM8996_VDDMX] = &mx_s2a_corner, - [MSM8996_VDDMX_AO] = &mx_s2a_corner_ao, - [MSM8996_VDDSSCX] = &sscx_l26a_corner, + [MSM8996_VDDCX] = &cx_s1a_corner, + [MSM8996_VDDCX_AO] = &cx_s1a_corner_ao, + [MSM8996_VDDCX_VFC] = &cx_s1a_corner_vfc, + [MSM8996_VDDMX] = &mx_s2a_corner, + [MSM8996_VDDMX_AO] = &mx_s2a_corner_ao, + [MSM8996_VDDSSCX] = &sscx_l26a_corner, [MSM8996_VDDSSCX_VFC] = &sscx_l26a_corner_vfc, }; @@ -595,16 +595,16 @@ static const struct rpmpd_desc msm8996_desc = { }; static struct rpmpd *msm8998_rpmpds[] = { - [MSM8998_VDDCX] = &rwcx0_lvl, - [MSM8998_VDDCX_AO] = &rwcx0_lvl_ao, - [MSM8998_VDDCX_VFL] = &rwcx0_lvl_vfl, - [MSM8998_VDDMX] = &rwmx0_lvl, - [MSM8998_VDDMX_AO] = &rwmx0_lvl_ao, - [MSM8998_VDDMX_VFL] = &rwmx0_lvl_vfl, - [MSM8998_SSCCX] = &rwsc0_lvl, - [MSM8998_SSCCX_VFL] = &rwsc0_lvl_vfl, - [MSM8998_SSCMX] = &rwsm0_lvl, - [MSM8998_SSCMX_VFL] = &rwsm0_lvl_vfl, + [MSM8998_VDDCX] = &rwcx0_lvl, + [MSM8998_VDDCX_AO] = &rwcx0_lvl_ao, + [MSM8998_VDDCX_VFL] = &rwcx0_lvl_vfl, + [MSM8998_VDDMX] = &rwmx0_lvl, + [MSM8998_VDDMX_AO] = &rwmx0_lvl_ao, + [MSM8998_VDDMX_VFL] = &rwmx0_lvl_vfl, + [MSM8998_SSCCX] = &rwsc0_lvl, + [MSM8998_SSCCX_VFL] = &rwsc0_lvl_vfl, + [MSM8998_SSCMX] = &rwsm0_lvl, + [MSM8998_SSCMX_VFL] = &rwsm0_lvl_vfl, }; static const struct rpmpd_desc msm8998_desc = { @@ -630,16 +630,16 @@ static const struct rpmpd_desc qcs404_desc = { }; static struct rpmpd *sdm660_rpmpds[] = { - [SDM660_VDDCX] = &rwcx0_lvl, - [SDM660_VDDCX_AO] = &rwcx0_lvl_ao, - [SDM660_VDDCX_VFL] = &rwcx0_lvl_vfl, - [SDM660_VDDMX] = &rwmx0_lvl, - [SDM660_VDDMX_AO] = &rwmx0_lvl_ao, - [SDM660_VDDMX_VFL] = &rwmx0_lvl_vfl, - [SDM660_SSCCX] = &rwlc0_lvl, - [SDM660_SSCCX_VFL] = &rwlc0_lvl_vfl, - [SDM660_SSCMX] = &rwlm0_lvl, - [SDM660_SSCMX_VFL] = &rwlm0_lvl_vfl, + [SDM660_VDDCX] = &rwcx0_lvl, + [SDM660_VDDCX_AO] = &rwcx0_lvl_ao, + [SDM660_VDDCX_VFL] = &rwcx0_lvl_vfl, + [SDM660_VDDMX] = &rwmx0_lvl, + [SDM660_VDDMX_AO] = &rwmx0_lvl_ao, + [SDM660_VDDMX_VFL] = &rwmx0_lvl_vfl, + [SDM660_SSCCX] = &rwlc0_lvl, + [SDM660_SSCCX_VFL] = &rwlc0_lvl_vfl, + [SDM660_SSCMX] = &rwlm0_lvl, + [SDM660_SSCMX_VFL] = &rwlm0_lvl_vfl, }; static const struct rpmpd_desc sdm660_desc = { @@ -649,14 +649,14 @@ static const struct rpmpd_desc sdm660_desc = { }; static struct rpmpd *sm6115_rpmpds[] = { - [SM6115_VDDCX] = &rwcx0_lvl, - [SM6115_VDDCX_AO] = &rwcx0_lvl_ao, - [SM6115_VDDCX_VFL] = &rwcx0_lvl_vfl, - [SM6115_VDDMX] = &rwmx0_lvl, - [SM6115_VDDMX_AO] = &rwmx0_lvl_ao, - [SM6115_VDDMX_VFL] = &rwmx0_lvl_vfl, - [SM6115_VDD_LPI_CX] = &rwlc0_lvl, - [SM6115_VDD_LPI_MX] = &rwlm0_lvl, + [SM6115_VDDCX] = &rwcx0_lvl, + [SM6115_VDDCX_AO] = &rwcx0_lvl_ao, + [SM6115_VDDCX_VFL] = &rwcx0_lvl_vfl, + [SM6115_VDDMX] = &rwmx0_lvl, + [SM6115_VDDMX_AO] = &rwmx0_lvl_ao, + [SM6115_VDDMX_VFL] = &rwmx0_lvl_vfl, + [SM6115_VDD_LPI_CX] = &rwlc0_lvl, + [SM6115_VDD_LPI_MX] = &rwlm0_lvl, }; static const struct rpmpd_desc sm6115_desc = { @@ -666,12 +666,12 @@ static const struct rpmpd_desc sm6115_desc = { }; static struct rpmpd *sm6125_rpmpds[] = { - [SM6125_VDDCX] = &rwcx0_lvl, - [SM6125_VDDCX_AO] = &rwcx0_lvl_ao, - [SM6125_VDDCX_VFL] = &rwcx0_lvl_vfl, - [SM6125_VDDMX] = &rwmx0_lvl, - [SM6125_VDDMX_AO] = &rwmx0_lvl_ao, - [SM6125_VDDMX_VFL] = &rwmx0_lvl_vfl, + [SM6125_VDDCX] = &rwcx0_lvl, + [SM6125_VDDCX_AO] = &rwcx0_lvl_ao, + [SM6125_VDDCX_VFL] = &rwcx0_lvl_vfl, + [SM6125_VDDMX] = &rwmx0_lvl, + [SM6125_VDDMX_AO] = &rwmx0_lvl_ao, + [SM6125_VDDMX_VFL] = &rwmx0_lvl_vfl, }; static const struct rpmpd_desc sm6125_desc = {