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: 646630 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 788CEC27C76 for ; Wed, 25 Jan 2023 03:27:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233513AbjAYD1l (ORCPT ); Tue, 24 Jan 2023 22:27:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233488AbjAYD1j (ORCPT ); Tue, 24 Jan 2023 22:27:39 -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 4022A53E48 for ; Tue, 24 Jan 2023 19:27:35 -0800 (PST) Received: by mail-ej1-x62f.google.com with SMTP id hw16so44120236ejc.10 for ; Tue, 24 Jan 2023 19:27:35 -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=nk+M8EKPOpPFijZwBjLhuq154r4/uPdsYAH67vtnnCdYGYvv73Jjcppw3yxo9wXIem JgfU9WlwoCbaNS9A6OprDww/xKH6z1Hojp4PLh2CQGttFXi0QVAb3NyOZNpUVwexS8Q3 iCltx4yJ3OXxp3c5eOvWpkvvjsMgX0/0ar4P7bZ77e1Zf94dzIIiAigjPzbyeQuvrJ9o uuo6aSdg6CZFkHemZ13rFgfHGntBMsyo+EwBfSqS70pS9vDvx135d+JIb0BIeWh8ZNSs ikWwLJODglKXarxUOl3+ghydWdqEIGRYnVcVi/PROc6Jaeo8IQxhQtGNvPJGvc9jP+bb uY7Q== X-Gm-Message-State: AFqh2kqBt9iMQIy/p2mTqzQ1KOQbtlukY3KUhKr5Ajl4GsM3O8u2EgfT kAxWQd3690QhsBTgGpb3pzEYoVk6TKBIjpAY X-Google-Smtp-Source: AMrXdXus0rbN+EDEcUPL0pdW7cH/PZmvifckAXFciv3l2s2DynOP8nLXeBhBbKpJiUAoATPr6tCf+g== 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 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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: 646629 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95C56C27C76 for ; Wed, 25 Jan 2023 03:27:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233425AbjAYD1n (ORCPT ); Tue, 24 Jan 2023 22:27:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233711AbjAYD1l (ORCPT ); Tue, 24 Jan 2023 22:27:41 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4028753E4F for ; Tue, 24 Jan 2023 19:27:36 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id ud5so44234005ejc.4 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=k7INoMIgigdN6Paas+XjWuhyUQJOSA/yPMWafHYbgOGABh/GbIIzVKALa12CY+PxUa QPRqO8DBgYT7C+dgJiQZNEvl54WFfpu9OgfqBL6ECah/wyXAHrhY5WRpFbSFCHYhabl9 D+tsLxqB/qru0HG/yoREhb6Fpig/TigvHr7OspqPHLOVY/Ya/PX3BvPCo3HpxlCxt/Ua b64ljMa2wiwtBE+4aslQiYC8T5ISqM8nMJQPhUR9t+7Jr17Yt+U6nNHwquiLKxBgSn0w D9xkHOqDtkaWETJ/kAQ0zryjI4o5ROZjmxaFIhZzuUjUuCqeRwOif2eP97HgQ4ZSmHeR Ou5g== X-Gm-Message-State: AFqh2kq6IcMXOuejBeMFQrsRfIrnl6PZ+Uzsv0XGD20yQVjDiHJp1Oo5 Y6HamC4gvYev4+kZcDA8a+9oyDoi4eSb+y+u X-Google-Smtp-Source: AMrXdXt0txRbFgX2bBphixqKqTbLmAkJnHcxJrVRs6KCo1M4NP8bFLyBmatKCdugSnxW5k2eSAJOpQ== 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 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Expand preprocessor macros into human-readable structs for easier reference. Signed-off-by: Konrad Dybcio --- 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: 647250 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49D08C61D9D for ; Wed, 25 Jan 2023 03:27:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229715AbjAYD1m (ORCPT ); Tue, 24 Jan 2023 22:27:42 -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 S233206AbjAYD1l (ORCPT ); Tue, 24 Jan 2023 22:27:41 -0500 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCBD553E45 for ; Tue, 24 Jan 2023 19:27:37 -0800 (PST) Received: by mail-ej1-x629.google.com with SMTP id hw16so44120390ejc.10 for ; Tue, 24 Jan 2023 19:27:37 -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=D6gDKvqRbAPXMU5aLVkHRtcIFA99FjIhTKoLhGOBFLkHI1N7aaw7DNBTSCi0CJ+aHy rFEDs+Zx68kSAOUEFenIWXtjZWi9qReLPoU50IUP2NFpWHKchv6F+OKOOlWkLSFLBJi8 FbQYqxaUVNAd2mfzbmkEv07ztw/LSIGIVCNJl1Wh9KjS7sKPMoeQ8egQ0ckmOtdZKPGV h6mwpSm0s7hHHJSZsdKNrwrAvQmXiutLb7SVyARH4EU6nunSYxjzbxNQO4Rgo5qagc7c NgTw6WrSO5YkZDgCOrhv7bUIbpQ7fN1k1SDGsDyjk3M9zKJWedcgY+WFiTjO3UZOetDE u6xQ== X-Gm-Message-State: AFqh2kqMVN3SUX+PUMHOZ5uY9ufnEVeX/ck7/rOgt2Hfu4/rOAQizprR kbgGHws3zCbPl/DY3EDhe4pB+fpo9clnNVcf X-Google-Smtp-Source: AMrXdXuGROdd+Ub5UTmR1okAQsUMYtTrsB7ZgRT1qxH1qis1VrGjk0ERi1SfybwDwHUfweh51rkNuQ== 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 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 --- 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: 646628 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A43EC27C76 for ; Wed, 25 Jan 2023 03:27:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233265AbjAYD1u (ORCPT ); Tue, 24 Jan 2023 22:27:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233488AbjAYD1r (ORCPT ); Tue, 24 Jan 2023 22:27:47 -0500 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7FDA53B2E for ; Tue, 24 Jan 2023 19:27:40 -0800 (PST) Received: by mail-ej1-x636.google.com with SMTP id rl14so40877181ejb.2 for ; Tue, 24 Jan 2023 19:27:40 -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=ZPthsUhPrkd/4YW9+QLVKPwX7eid/za7BEiQWIvi22aXFZvK28uexk5L5ONQTsa3a+ Q6jKFG9iEFF8ZZgkgZDB75Cv5cqRyKmFwNJl0pWqPVvqKnlTyLOtKHhkHt364Kc34jM1 TZuDja5JbbakYeCuvTBwFBcqn07ghNqT4LRpuziw9TuZqclN7e8WTPoLknSUADh+S8SO IJ7PcQkY5YfYj5Q3A3Ezq0HWnX2d1rcI/XxeBkkLQiCj3wSyrOaUmODk/Jzg5FFaPtaK 451rzozic6sfBYmjOhryeVynh8OLMaaBguzg2DrIfMrR056A39zLDU6e1QtrRkrIhO/2 +lmA== X-Gm-Message-State: AFqh2kqAsLovhk/e+dnaFRS3YsA+TALYeZTDZcrjKewqc/qyVRsLOklP Z5xPGdqXKvbqo7eCWMlpl9l83eDWq7pf6wDM X-Google-Smtp-Source: AMrXdXu3yW9H7Lowtgdye5LTcvsBQrDkc5CGZFg9zHaaszW74qfTNMow/kgAPYesHL6wk8S2k4cXpA== 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 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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: 647249 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84675C54EAA for ; Wed, 25 Jan 2023 03:27:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233983AbjAYD1p (ORCPT ); Tue, 24 Jan 2023 22:27:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233265AbjAYD1n (ORCPT ); Tue, 24 Jan 2023 22:27:43 -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 8896A53B23 for ; Tue, 24 Jan 2023 19:27:40 -0800 (PST) Received: by mail-ej1-x62f.google.com with SMTP id hw16so44120563ejc.10 for ; Tue, 24 Jan 2023 19:27:40 -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=ZoHeCneEKvVNMvwzFRngfyUhB/n6sgeL/tmbBKV2stYILlT1u6vghrnkAGIw0UZXgV jlbKf6/LyFLZ2EZPtR1ykYc6/nasiVNMKzvL0Yep+Gf8iHcfU/Df3HDaVi8l/3iOhiYX w9hN0BtuEHFEnG4unSjwSW1EaF5ElCvXVh6JRnskysyRC6xQPYWx6+VY7rUMy1PuEz5Y 1Sfj3/Kuc2qg/vwpk6VDVXXe8czNjMW6IqBMKmEdARMJ5ZTF8kOShyVgwgNlbIHt5XWo Wms0dO6IQO4GPT67L0AhEqHK0/gr2ildCS+LBfK8vRJne/DuOM54rHxaD4poulq11ELw lsIw== X-Gm-Message-State: AFqh2kotkgXAjmLEpFu/KzDIUl5gdaASFV/W7AqaTY4fnX6ew3mVpGOL DGci+zRycQq6QWlzPcEbUa7N0b1ou8WsWrpF X-Google-Smtp-Source: AMrXdXuYa2NdOk7jPvsgBLy62PmFb42khwLLr9oSRlDgu13huuqf4UBwob++g/aL47O0RqCWrXrcWA== 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 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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: 646627 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EBD9C61D9D for ; Wed, 25 Jan 2023 03:28:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234448AbjAYD2A (ORCPT ); Tue, 24 Jan 2023 22:28:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234431AbjAYD15 (ORCPT ); Tue, 24 Jan 2023 22:27:57 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D6CA7A96 for ; Tue, 24 Jan 2023 19:27:44 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id ud5so44234312ejc.4 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=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=gawtg4G2OBpIMAym7QMw2h5jTuGbCa6LnZiYLGRoCJ+R7ybddaU+VZZ2kGnE7pmSrO NSLFX5xakDLQ+6lVPTh5tuAvYM2KQ/G9Aio/Mjf5iwdf9aswdkmC57wbCDYWrji+4xmy Z3kBfr+ElOWc2kL5md8+8vaVrB6bMEE13BN/4E6rDpm39L/c7XVFfoDqBxP596wFS8YK j4O/MLOZQ3KeuDw6oMd+AzvvEzq5Y+ppR/NurlVNZFqkhEqlMXHLsEM7BHUnyQkiVp4F Bx/YfHHQaQCsTrvCSbdm9MyQ1346+2v8xSdUuUBep06szMpPY0G/soN+j6aJB4uXlAKa 5AhA== X-Gm-Message-State: AO0yUKV2X6VkoBM2CgrMLU11ymW07zVq7zs0dzq9T6KUmKnH+0sGCMhk kn6P1ax90V6fr0eXplt2YFcJMcwCZBB5E2T1 X-Google-Smtp-Source: AK7set8DJ/Wy76GHyZUVU9Uf8ZzXXOUS/WIojR0rCs9c2ef/plqetB7Zx3cMSirR3EY4Ei2GBK42lg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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: 647248 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CCD9EC27C76 for ; Wed, 25 Jan 2023 03:28:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234410AbjAYD17 (ORCPT ); Tue, 24 Jan 2023 22:27:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234403AbjAYD14 (ORCPT ); Tue, 24 Jan 2023 22:27:56 -0500 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E5FA7EEB for ; Tue, 24 Jan 2023 19:27:44 -0800 (PST) Received: by mail-ej1-x636.google.com with SMTP id os24so502284ejb.8 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=BgWHeWvsU6eJJn7v9W4h/WtWsX4CnkGGoNfAsqpbnd7WCa8yrp7Aao2ZMegd9maZ2F Cl50SFC3ZQWVrAru/S+BpdBBfmE8lGSFzr15rEnXGEqZnW/Vdoof+HaVRlOrlNgUwNK1 iuDNjUkP5Xbpc1r8vGR6YdtulaSYA8Ly2rZZHy6Xgbi+zQVrJDjeNvSHb8N3hy/YeomN ME30DjqEropgRXhP9uA8JK0tV0z4gB3Xgylm4lxR2K/JnQTiXBGEBlKn921lCx7ymXCd 4CsEyt7zDuHUCaPlVK0kiAGO+/wAf+NWnt3lZpCJfQV4XkFwhSBaa92YN6eUlqO/lKGw hanQ== X-Gm-Message-State: AFqh2kpHqFoy9ChmlB1yV//5MX+5IdQ1BDb1QUpXs2iCllcSYxpiu/J9 VadcfAQaqrqJkh75SA3vPg3v/76u+osofrLy X-Google-Smtp-Source: AMrXdXurwtd5M69j9S698o4730diroz1ESxFgNbeO/qFNQau/6JuTJA9T6LXZlNxx3VKMVClhakhCg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 = {