From patchwork Mon Mar 13 19:59:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 69077 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1379365wrd; Mon, 13 Mar 2023 13:01:53 -0700 (PDT) X-Google-Smtp-Source: AK7set+ZiX439yusp+CYj3NKAt0MxmrwFkyzcJvJ+CPD+46Tnumaikgfscy3VI0lGtaUlpX6qZ+e X-Received: by 2002:a05:6a20:7f91:b0:d4:bc25:4a05 with SMTP id d17-20020a056a207f9100b000d4bc254a05mr3629402pzj.49.1678737712831; Mon, 13 Mar 2023 13:01:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678737712; cv=none; d=google.com; s=arc-20160816; b=lSoP3vQsOz5SP/V4GAwSEn6gw+eUwyGqpvZPJ3s7rPOCx8YnU29gyNpwMr3dkECqVh HK9ICXfiO6iaGT3BLZi5ylboGNpq5sHItVIDwqy5sVC3oEfPnSRemEjO1CRKb0wr+YDd DV3fFZ46awhGZ34i2xDA14FpX0+lw5fQfq1Y6BzScxJR3c5OUttUxkjDJc4+KGajY4kA KwWympZqCkjHPRyKg95cr01qBuICnGLgaFIkdUFhrBG8GTrL05RwbAgLzfuu+7MUR1d2 +6C/65nFONcJKZyBDXEmbG+f5kHVTbTHEGJ0A15JDKc+1359VOfGxZjuH/1yIdnSFHsi /7nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=nYa7z2XtiVETPeMdM39GRjzbkKKAoqW/JHuDvkeW2Fw=; b=WJ1u8iENtjhOZIHG1XDsuhoNQeicGCd+DzoFaGXnc4kqqjF0JJ/5ZgSUAG+Prem6vF bvq7/he3tfgS5FQpXuF8WCGf4P2oXLVdwqjpoAU7faC9SW0L0txDa92IyOS5KMYIIyrf Lhvva8ictjS3U89Q8RNwvqn2Mp8fvJCtA3dEqdofRWIstBLcFvakmoZmElbbsfTWptz0 G/tLblVEMHzEXmwMB1dwbYGAHsh8MYpK3+kwOTAp3QWAqYfFScmp11qKgxMTKrkjlkry i/cGxWk9lQhX5QwPvv4mKB3VcUxI+ylwKgOBWGohJzf2xitTfcD3Na9EesUpf82tgy/b hHdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QVXzdiXL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p27-20020aa79e9b000000b0062355d9477csi299839pfq.161.2023.03.13.13.01.37; Mon, 13 Mar 2023 13:01:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QVXzdiXL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230022AbjCMUAP (ORCPT + 99 others); Mon, 13 Mar 2023 16:00:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjCMUAL (ORCPT ); Mon, 13 Mar 2023 16:00:11 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E07BF738B7 for ; Mon, 13 Mar 2023 13:00:07 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id s22so17197382lfi.9 for ; Mon, 13 Mar 2023 13:00:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678737606; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=nYa7z2XtiVETPeMdM39GRjzbkKKAoqW/JHuDvkeW2Fw=; b=QVXzdiXLhkpbyvkaPcsq1XAfFPML1LM9LL/lDm/BhX4iLlaAyQ0cYEkTMDuVS3OTcf svY4FmW722Yz0DOW2aVJLeiQDwjQXH4XLSs3Dd+DyxL3HxUX/GIbzVs7H8K3Ms/W/MTp fxDG/PNVFUUyzxfOMhd5hJGu2yh4IcZdSQZYS5DuAW/gw0C1HAomEUTyuou7snDcJ10E V0UpASKRR9X/NRY/kAJMADcE3J2BdKzq1vDSheGytSwA+l4NHVjzYsyXaKhNAcLzJwag JzdMRYitECT6R2uNazclPr+tddS6dAXqyyeDI0fYSJ3GHnrCQfCAIxO2BPdn8z8hkz56 zGOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678737606; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nYa7z2XtiVETPeMdM39GRjzbkKKAoqW/JHuDvkeW2Fw=; b=rxangQGD15Pa+x8i0FCqAXs+5LJbgXmBJ9QKSAzSEXfnq8O44VAavmbcp6XbGGMXHD 69Q6XAFSNP+pYA5MbJd7ydRBnaktH7AUn09OzLdeLWGB3SedvQ4Y7ARQmTGrq0Gp2Xk8 jrZOGB8IuTR8nWHdlkV93rsB+d62p6owVz/YG879p5EZAZ6gOJPjQf/RLDOszwQLuPxS Jse7UZDrGRnZBff5IQF0hZsTeInW8sV2AdFfOp6OoHTVNavNBmrplSmFS87qEA6A1v0F Gj+IiZxVYLYHcBYAHyoDidTTsKIiLnATrp7gbqpJTMagbAaZSSRe/87/mcw53s0dXCEu V0Nw== X-Gm-Message-State: AO0yUKXqGjipGUYxm6bV+veiAqjmVH2KFJKMAI5VfGeIQaXfqHLNdKuN jF+RVlyqDbSRUk4zjloxi7EQDg== X-Received: by 2002:ac2:53a6:0:b0:4dd:ac1b:771b with SMTP id j6-20020ac253a6000000b004ddac1b771bmr8958325lfh.39.1678737606148; Mon, 13 Mar 2023 13:00:06 -0700 (PDT) Received: from [192.168.1.101] (abyj16.neoplus.adsl.tpnet.pl. [83.9.29.16]) by smtp.gmail.com with ESMTPSA id w3-20020ac254a3000000b004cc800b1f2csm75431lfk.238.2023.03.13.13.00.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 13:00:05 -0700 (PDT) From: Konrad Dybcio Date: Mon, 13 Mar 2023 20:59:59 +0100 Subject: [PATCH v3 01/10] soc: qcom: rpmpd: Remove SoC names from RPMPD definitions MIME-Version: 1.0 Message-Id: <20230313-topic-rpmpd-v3-1-06a4f448ff90@linaro.org> References: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> In-Reply-To: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678737603; l=21183; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=T1PdpR+U38P+Qh4/yP20dydzi8aOhHdS9sHjLf0o5g4=; b=8ZgYgnuDCQLGJdzn8XpYMhwaZm2LbEeYUfKS7QLh2FWjQwS19KFFKQdqSaMEc9rJ87IAeMSLNg3B 1iggYRtIB4N9NPWWN2N39qkiR0pQ8JpwYQ6CL7Fu2S0x6lMuQIgJ X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_HTTP,RCVD_IN_SORBS_SOCKS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760284076244731111?= X-GMAIL-MSGID: =?utf-8?q?1760284076244731111?= Replace the SoC names with type+id_key (or type+id+..name..+key for fixed-key definitions) and remove duplicate entries. Signed-off-by: Konrad Dybcio --- drivers/soc/qcom/rpmpd.c | 360 +++++++++++++++++++++-------------------------- 1 file changed, 164 insertions(+), 196 deletions(-) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 337b1ad1cd3b..d99a56509e33 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -40,51 +40,50 @@ #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 = { \ +#define DEFINE_RPMPD_PAIR(_name, _active, r_type, r_key, r_id) \ + static struct rpmpd r_type##r_id##_##r_key##_##_active; \ + static struct rpmpd r_type##r_id##_##r_key##_##_name = { \ .pd = { .name = #_name, }, \ - .peer = &_platform##_##_active, \ + .peer = &r_type##r_id##_##r_key##_##_active, \ .res_type = RPMPD_##r_type, \ .res_id = r_id, \ .key = KEY_##r_key, \ }; \ - static struct rpmpd _platform##_##_active = { \ + static struct rpmpd r_type##r_id##_##r_key##_##_active = { \ .pd = { .name = #_active, }, \ - .peer = &_platform##_##_name, \ + .peer = &r_type##r_id##_##r_key##_##_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 = { \ +#define DEFINE_RPMPD_CORNER(_name, r_type, r_id) \ + static struct rpmpd r_type##r_id##_##_name##_corner = { \ .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 = { \ +#define DEFINE_RPMPD_LEVEL(_name, r_type, r_id) \ + static struct rpmpd r_type##r_id##_##_name##_lvl = { \ .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 = { \ +#define DEFINE_RPMPD_VFC(_name, r_type, r_id) \ + static struct rpmpd r_type##r_id##_##_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 = { \ +#define DEFINE_RPMPD_VFL(_name, r_type, r_id) \ + static struct rpmpd r_type##r_id##_##_name = { \ .pd = { .name = #_name, }, \ .res_type = RPMPD_##r_type, \ .res_id = r_id, \ @@ -119,18 +118,18 @@ 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); +DEFINE_RPMPD_PAIR(vddcx, vddcx_ao, SMPA, LEVEL, 3); +DEFINE_RPMPD_VFL(vddcx_vfl, SMPA, 3); -DEFINE_RPMPD_PAIR(mdm9607, vddmx, vddmx_ao, LDOA, LEVEL, 12); -DEFINE_RPMPD_VFL(mdm9607, vddmx_vfl, LDOA, 12); +DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, LDOA, LEVEL, 12); +DEFINE_RPMPD_VFL(vddmx_vfl, LDOA, 12); 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] = &SMPA3_LEVEL_vddcx, + [MDM9607_VDDCX_AO] = &SMPA3_LEVEL_vddcx_ao, + [MDM9607_VDDCX_VFL] = &SMPA3_vddcx_vfl, + [MDM9607_VDDMX] = &LDOA12_LEVEL_vddmx, + [MDM9607_VDDMX_AO] = &LDOA12_LEVEL_vddmx_ao, + [MDM9607_VDDMX_VFL] = &LDOA12_vddmx_vfl, }; static const struct rpmpd_desc mdm9607_desc = { @@ -140,13 +139,13 @@ 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); +DEFINE_RPMPD_PAIR(vddcx, vddcx_ao, SMPA, CORNER, 1); +DEFINE_RPMPD_VFC(vddcx_vfc, SMPA, 1); static struct rpmpd *msm8226_rpmpds[] = { - [MSM8226_VDDCX] = &msm8226_vddcx, - [MSM8226_VDDCX_AO] = &msm8226_vddcx_ao, - [MSM8226_VDDCX_VFC] = &msm8226_vddcx_vfc, + [MSM8226_VDDCX] = &SMPA1_CORNER_vddcx, + [MSM8226_VDDCX_AO] = &SMPA1_CORNER_vddcx_ao, + [MSM8226_VDDCX_VFC] = &SMPA1_vddcx_vfc, }; static const struct rpmpd_desc msm8226_desc = { @@ -156,23 +155,23 @@ 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); +DEFINE_RPMPD_PAIR(vddmd, vddmd_ao, SMPA, CORNER, 1); +DEFINE_RPMPD_VFC(vddmd_vfc, SMPA, 1); -DEFINE_RPMPD_PAIR(msm8939, vddcx, vddcx_ao, SMPA, CORNER, 2); -DEFINE_RPMPD_VFC(msm8939, vddcx_vfc, SMPA, 2); +DEFINE_RPMPD_PAIR(vddcx, vddcx_ao, SMPA, CORNER, 2); +DEFINE_RPMPD_VFC(vddcx_vfc, SMPA, 2); -DEFINE_RPMPD_PAIR(msm8939, vddmx, vddmx_ao, LDOA, CORNER, 3); +DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, LDOA, CORNER, 3); 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] = &SMPA1_CORNER_vddmd, + [MSM8939_VDDMDCX_AO] = &SMPA1_CORNER_vddmd_ao, + [MSM8939_VDDMDCX_VFC] = &SMPA1_vddmd_vfc, + [MSM8939_VDDCX] = &SMPA2_CORNER_vddcx, + [MSM8939_VDDCX_AO] = &SMPA2_CORNER_vddcx_ao, + [MSM8939_VDDCX_VFC] = &SMPA2_vddcx_vfc, + [MSM8939_VDDMX] = &LDOA3_CORNER_vddmx, + [MSM8939_VDDMX_AO] = &LDOA3_CORNER_vddmx_ao, }; static const struct rpmpd_desc msm8939_desc = { @@ -182,17 +181,12 @@ 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); - -DEFINE_RPMPD_VFC(msm8916, vddcx_vfc, SMPA, 1); - 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] = &SMPA1_CORNER_vddcx, + [MSM8916_VDDCX_AO] = &SMPA1_CORNER_vddcx_ao, + [MSM8916_VDDCX_VFC] = &SMPA1_vddcx_vfc, + [MSM8916_VDDMX] = &LDOA3_CORNER_vddmx, + [MSM8916_VDDMX_AO] = &LDOA3_CORNER_vddmx_ao, }; static const struct rpmpd_desc msm8916_desc = { @@ -202,20 +196,20 @@ 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); +DEFINE_RPMPD_PAIR(vddmd, vddmd_ao, SMPA, LEVEL, 1); +DEFINE_RPMPD_PAIR(vddcx, vddcx_ao, SMPA, LEVEL, 2); +DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, SMPA, LEVEL, 7); -DEFINE_RPMPD_VFL(msm8953, vddcx_vfl, SMPA, 2); +DEFINE_RPMPD_VFL(vddcx_vfl, SMPA, 2); 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] = &SMPA1_LEVEL_vddmd, + [MSM8953_VDDMD_AO] = &SMPA1_LEVEL_vddmd_ao, + [MSM8953_VDDCX] = &SMPA2_LEVEL_vddcx, + [MSM8953_VDDCX_AO] = &SMPA2_LEVEL_vddcx_ao, + [MSM8953_VDDCX_VFL] = &SMPA2_vddcx_vfl, + [MSM8953_VDDMX] = &SMPA7_LEVEL_vddmx, + [MSM8953_VDDMX_AO] = &SMPA7_LEVEL_vddmx_ao, }; static const struct rpmpd_desc msm8953_desc = { @@ -225,19 +219,18 @@ 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); +DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, SMPA, LEVEL, 6); -DEFINE_RPMPD_VFL(msm8976, vddcx_vfl, RWSC, 2); -DEFINE_RPMPD_VFL(msm8976, vddmx_vfl, RWSM, 6); +DEFINE_RPMPD_VFL(vddcx_vfl, RWSC, 2); +DEFINE_RPMPD_VFL(vddmx_vfl, RWSM, 6); 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] = &SMPA2_LEVEL_vddcx, + [MSM8976_VDDCX_AO] = &SMPA2_LEVEL_vddcx_ao, + [MSM8976_VDDCX_VFL] = &RWSC2_vddcx_vfl, + [MSM8976_VDDMX] = &SMPA6_LEVEL_vddmx, + [MSM8976_VDDMX_AO] = &SMPA6_LEVEL_vddmx_ao, + [MSM8976_VDDMX_VFL] = &RWSM6_vddmx_vfl, }; static const struct rpmpd_desc msm8976_desc = { @@ -247,22 +240,20 @@ 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); +DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, SMPA, CORNER, 2); /* Attention! *Some* 8994 boards with pm8004 may use SMPC here! */ -DEFINE_RPMPD_CORNER(msm8994, vddgfx, SMPB, 2); +DEFINE_RPMPD_CORNER(vddgfx, SMPB, 2); -DEFINE_RPMPD_VFC(msm8994, vddcx_vfc, SMPA, 1); -DEFINE_RPMPD_VFC(msm8994, vddgfx_vfc, SMPB, 2); +DEFINE_RPMPD_VFC(vddgfx_vfc, SMPB, 2); 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] = &SMPA1_CORNER_vddcx, + [MSM8994_VDDCX_AO] = &SMPA1_CORNER_vddcx_ao, + [MSM8994_VDDCX_VFC] = &SMPA1_vddcx_vfc, + [MSM8994_VDDMX] = &SMPA2_CORNER_vddmx, + [MSM8994_VDDMX_AO] = &SMPA2_CORNER_vddmx_ao, + [MSM8994_VDDGFX] = &SMPB2_vddgfx_corner, + [MSM8994_VDDGFX_VFC] = &SMPB2_vddgfx_vfc, }; static const struct rpmpd_desc msm8994_desc = { @@ -272,21 +263,18 @@ 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); +DEFINE_RPMPD_CORNER(vddsscx, LDOA, 26); -DEFINE_RPMPD_VFC(msm8996, vddcx_vfc, SMPA, 1); -DEFINE_RPMPD_VFC(msm8996, vddsscx_vfc, LDOA, 26); +DEFINE_RPMPD_VFC(vddsscx_vfc, LDOA, 26); 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] = &SMPA1_CORNER_vddcx, + [MSM8996_VDDCX_AO] = &SMPA1_CORNER_vddcx_ao, + [MSM8996_VDDCX_VFC] = &SMPA1_vddcx_vfc, + [MSM8996_VDDMX] = &SMPA2_CORNER_vddmx, + [MSM8996_VDDMX_AO] = &SMPA2_CORNER_vddmx_ao, + [MSM8996_VDDSSCX] = &LDOA26_vddsscx_corner, + [MSM8996_VDDSSCX_VFC] = &LDOA26_vddsscx_vfc, }; static const struct rpmpd_desc msm8996_desc = { @@ -296,29 +284,29 @@ 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); +DEFINE_RPMPD_PAIR(vddcx, vddcx_ao, RWCX, LEVEL, 0); +DEFINE_RPMPD_VFL(vddcx_vfl, RWCX, 0); -DEFINE_RPMPD_PAIR(msm8998, vddmx, vddmx_ao, RWMX, LEVEL, 0); -DEFINE_RPMPD_VFL(msm8998, vddmx_vfl, RWMX, 0); +DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, RWMX, LEVEL, 0); +DEFINE_RPMPD_VFL(vddmx_vfl, RWMX, 0); -DEFINE_RPMPD_LEVEL(msm8998, vdd_ssccx, RWSC, 0); -DEFINE_RPMPD_VFL(msm8998, vdd_ssccx_vfl, RWSC, 0); +DEFINE_RPMPD_LEVEL(vdd_ssccx, RWSC, 0); +DEFINE_RPMPD_VFL(vdd_ssccx_vfl, RWSC, 0); -DEFINE_RPMPD_LEVEL(msm8998, vdd_sscmx, RWSM, 0); -DEFINE_RPMPD_VFL(msm8998, vdd_sscmx_vfl, RWSM, 0); +DEFINE_RPMPD_LEVEL(vdd_sscmx, RWSM, 0); +DEFINE_RPMPD_VFL(vdd_sscmx_vfl, RWSM, 0); 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_LEVEL_vddcx, + [MSM8998_VDDCX_AO] = &RWCX0_LEVEL_vddcx_ao, + [MSM8998_VDDCX_VFL] = &RWCX0_vddcx_vfl, + [MSM8998_VDDMX] = &RWMX0_LEVEL_vddmx, + [MSM8998_VDDMX_AO] = &RWMX0_LEVEL_vddmx_ao, + [MSM8998_VDDMX_VFL] = &RWMX0_vddmx_vfl, + [MSM8998_SSCCX] = &RWSC0_vdd_ssccx_lvl, + [MSM8998_SSCCX_VFL] = &RWSC0_vdd_ssccx_vfl, + [MSM8998_SSCMX] = &RWSM0_vdd_sscmx_lvl, + [MSM8998_SSCMX_VFL] = &RWSM0_vdd_sscmx_vfl, }; static const struct rpmpd_desc msm8998_desc = { @@ -328,23 +316,20 @@ 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); +DEFINE_RPMPD_LEVEL(vdd_lpicx, RWLC, 0); +DEFINE_RPMPD_VFL(vdd_lpicx_vfl, RWLC, 0); -DEFINE_RPMPD_LEVEL(qcs404, vdd_lpicx, RWLC, 0); -DEFINE_RPMPD_VFL(qcs404, vdd_lpicx_vfl, RWLC, 0); - -DEFINE_RPMPD_LEVEL(qcs404, vdd_lpimx, RWLM, 0); -DEFINE_RPMPD_VFL(qcs404, vdd_lpimx_vfl, RWLM, 0); +DEFINE_RPMPD_LEVEL(vdd_lpimx, RWLM, 0); +DEFINE_RPMPD_VFL(vdd_lpimx_vfl, RWLM, 0); 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_LEVEL_vddmx, + [QCS404_VDDMX_AO] = &RWMX0_LEVEL_vddmx_ao, + [QCS404_VDDMX_VFL] = &RWMX0_vddmx_vfl, + [QCS404_LPICX] = &RWLC0_vdd_lpicx_lvl, + [QCS404_LPICX_VFL] = &RWLC0_vdd_lpicx_vfl, + [QCS404_LPIMX] = &RWLM0_vdd_lpimx_lvl, + [QCS404_LPIMX_VFL] = &RWLM0_vdd_lpimx_vfl, }; static const struct rpmpd_desc qcs404_desc = { @@ -354,29 +339,24 @@ 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); - -DEFINE_RPMPD_PAIR(sdm660, vddmx, vddmx_ao, RWMX, LEVEL, 0); -DEFINE_RPMPD_VFL(sdm660, vddmx_vfl, RWMX, 0); -DEFINE_RPMPD_LEVEL(sdm660, vdd_ssccx, RWLC, 0); -DEFINE_RPMPD_VFL(sdm660, vdd_ssccx_vfl, RWLC, 0); +DEFINE_RPMPD_LEVEL(vdd_ssccx, RWLC, 0); +DEFINE_RPMPD_VFL(vdd_ssccx_vfl, RWLC, 0); -DEFINE_RPMPD_LEVEL(sdm660, vdd_sscmx, RWLM, 0); -DEFINE_RPMPD_VFL(sdm660, vdd_sscmx_vfl, RWLM, 0); +DEFINE_RPMPD_LEVEL(vdd_sscmx, RWLM, 0); +DEFINE_RPMPD_VFL(vdd_sscmx_vfl, RWLM, 0); 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_LEVEL_vddcx, + [SDM660_VDDCX_AO] = &RWCX0_LEVEL_vddcx_ao, + [SDM660_VDDCX_VFL] = &RWCX0_vddcx_vfl, + [SDM660_VDDMX] = &RWMX0_LEVEL_vddmx, + [SDM660_VDDMX_AO] = &RWMX0_LEVEL_vddmx_ao, + [SDM660_VDDMX_VFL] = &RWMX0_vddmx_vfl, + [SDM660_SSCCX] = &RWLC0_vdd_ssccx_lvl, + [SDM660_SSCCX_VFL] = &RWLC0_vdd_ssccx_vfl, + [SDM660_SSCMX] = &RWLM0_vdd_sscmx_lvl, + [SDM660_SSCMX_VFL] = &RWLM0_vdd_sscmx_vfl, }; static const struct rpmpd_desc sdm660_desc = { @@ -386,24 +366,18 @@ 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); - -DEFINE_RPMPD_PAIR(sm6115, vddmx, vddmx_ao, RWMX, LEVEL, 0); -DEFINE_RPMPD_VFL(sm6115, vddmx_vfl, RWMX, 0); - -DEFINE_RPMPD_LEVEL(sm6115, vdd_lpi_cx, RWLC, 0); -DEFINE_RPMPD_LEVEL(sm6115, vdd_lpi_mx, RWLM, 0); +DEFINE_RPMPD_LEVEL(vdd_lpi_cx, RWLC, 0); +DEFINE_RPMPD_LEVEL(vdd_lpi_mx, RWLM, 0); 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_LEVEL_vddcx, + [SM6115_VDDCX_AO] = &RWCX0_LEVEL_vddcx_ao, + [SM6115_VDDCX_VFL] = &RWCX0_vddcx_vfl, + [SM6115_VDDMX] = &RWMX0_LEVEL_vddmx, + [SM6115_VDDMX_AO] = &RWMX0_LEVEL_vddmx_ao, + [SM6115_VDDMX_VFL] = &RWMX0_vddmx_vfl, + [SM6115_VDD_LPI_CX] = &RWLC0_vdd_lpi_cx_lvl, + [SM6115_VDD_LPI_MX] = &RWLM0_vdd_lpi_mx_lvl, }; static const struct rpmpd_desc sm6115_desc = { @@ -413,19 +387,13 @@ 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); - -DEFINE_RPMPD_PAIR(sm6125, vddmx, vddmx_ao, RWMX, LEVEL, 0); -DEFINE_RPMPD_VFL(sm6125, vddmx_vfl, RWMX, 0); - 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_LEVEL_vddcx, + [SM6125_VDDCX_AO] = &RWCX0_LEVEL_vddcx_ao, + [SM6125_VDDCX_VFL] = &RWCX0_vddcx_vfl, + [SM6125_VDDMX] = &RWMX0_LEVEL_vddmx, + [SM6125_VDDMX_AO] = &RWMX0_LEVEL_vddmx_ao, + [SM6125_VDDMX_VFL] = &RWMX0_vddmx_vfl, }; static const struct rpmpd_desc sm6125_desc = { @@ -434,18 +402,18 @@ static const struct rpmpd_desc sm6125_desc = { .max_state = RPM_SMD_LEVEL_BINNING, }; -DEFINE_RPMPD_PAIR(sm6375, vddgx, vddgx_ao, RWGX, LEVEL, 0); +DEFINE_RPMPD_PAIR(vddgx, vddgx_ao, RWGX, LEVEL, 0); 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_LEVEL_vddcx, + [SM6375_VDDCX_AO] = &RWCX0_LEVEL_vddcx_ao, + [SM6375_VDDCX_VFL] = &RWCX0_vddcx_vfl, + [SM6375_VDDMX] = &RWMX0_LEVEL_vddmx, + [SM6375_VDDMX_AO] = &RWMX0_LEVEL_vddmx_ao, + [SM6375_VDDMX_VFL] = &RWMX0_vddmx_vfl, + [SM6375_VDDGX] = &RWGX0_LEVEL_vddgx, + [SM6375_VDDGX_AO] = &RWGX0_LEVEL_vddgx_ao, + [SM6375_VDD_LPI_CX] = &RWLC0_vdd_lpi_cx_lvl, + [SM6375_VDD_LPI_MX] = &RWLM0_vdd_lpi_mx_lvl, }; static const struct rpmpd_desc sm6375_desc = { @@ -455,14 +423,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_LEVEL_vddcx, + [QCM2290_VDDCX_AO] = &RWCX0_LEVEL_vddcx_ao, + [QCM2290_VDDCX_VFL] = &RWCX0_vddcx_vfl, + [QCM2290_VDDMX] = &RWMX0_LEVEL_vddmx, + [QCM2290_VDDMX_AO] = &RWMX0_LEVEL_vddmx_ao, + [QCM2290_VDDMX_VFL] = &RWMX0_vddmx_vfl, + [QCM2290_VDD_LPI_CX] = &RWLC0_vdd_lpi_cx_lvl, + [QCM2290_VDD_LPI_MX] = &RWLM0_vdd_lpi_mx_lvl, }; static const struct rpmpd_desc qcm2290_desc = { From patchwork Mon Mar 13 20:00:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 69086 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1383059wrd; Mon, 13 Mar 2023 13:09:33 -0700 (PDT) X-Google-Smtp-Source: AK7set8NzyftKNbcpXlwkSoy+ZyE9gozVUjGDdM9pnZKs2Vuh6UpO/WqdWIEVOAgf23K5JOCU1im X-Received: by 2002:a17:903:1103:b0:19c:da7f:a234 with SMTP id n3-20020a170903110300b0019cda7fa234mr42207083plh.67.1678738173092; Mon, 13 Mar 2023 13:09:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678738173; cv=none; d=google.com; s=arc-20160816; b=gC2ypH7+lNc+y8AUBe8mOEkyR0sjJwJDMFJmV2FrKmPE1BUzImCpFzcZQup0FytLHm RdMKiFSqf6xadLhKR1DN+ak9rKMpxkw3iOsd5s3FVEBpz8h0DwyYV8pp3JbqXPV1B2Tv P0SuXOskOrp+1OF0Pp5sv3z0coFHZKf2YATXVdoeCVSXe2VuMSAKQ0mb7lGPMNCZ6SwO 92r9ADjGkOAdIt9bX8C0KoK5iuR9fculs9WY+1rO8DgxWrSXSZ8AGmGf3YgiUzeV6Jqn yDJjIbz/qlQF4uoaFJc7sx+nV/Er1h+D9oHt/aDV9V/FItdbInprDZx12RvQYnqKCjTe X90g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=L+EYu8ePA3dMFVGocNPG9pYEHQq3W3rsNMZsR1ocQOs=; b=njRchLqTF2tpyedkR6XMC0qQsI6MDl5/kp+9BX/p3uykNZpv4H1rLHNo67oHSxyUu+ SpafuEHRoJF5oyr28oP6xpkHhyOxnSUW24Ydamaj3Jjmxo5L9kEERVJTNFtFwicL4o8h cO1NQZqGLZGfYQkKvLfq51SQo3SNCezDNhJSBUcDssuQlljO1OrJ6AA9vJHANCVMlCow Xex87a4o5fyqsnp+XqG7zeg0i07x4YsT/HTeKAl7pvAcup+DETHAvwucKKQc5SxvOHYj zqnOcX8+3n3BwdlVFLdCDV+oRWY8rRXJR3lpJP030IRd2T4uFBxG7FHpL2pa5UmxtJg8 +0yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="EOPBO/DQ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p15-20020a170902ebcf00b0019c93e0dce0si512932plg.254.2023.03.13.13.09.20; Mon, 13 Mar 2023 13:09:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="EOPBO/DQ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230110AbjCMUAW (ORCPT + 99 others); Mon, 13 Mar 2023 16:00:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229986AbjCMUAM (ORCPT ); Mon, 13 Mar 2023 16:00:12 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 600D26BDCC for ; Mon, 13 Mar 2023 13:00:09 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id i28so17254066lfv.0 for ; Mon, 13 Mar 2023 13:00:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678737607; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=L+EYu8ePA3dMFVGocNPG9pYEHQq3W3rsNMZsR1ocQOs=; b=EOPBO/DQgdT2smOCJIOatrYCqLW+OhFpXU1JyPSWeQeFsgHANq8pxS5zO3TWwZErnA epJ1IiEV7x8P1/pEc7pmvCN44xYzRL24heE/nC9fhwDfy1I+4fnWRhE9p1/e+mEsvsSx cUcQqSf+4ywtXtx2FDn09poEIrk9gVi/4TkB5ufxBVlf9C6x1SfpoVprgmyVmVNWSdwn FZauV7payRJmE69Eaxzj7uCpFG3UfufWC9/a3noay9xPLv64zAjcgDPV33UmiIQ7tbOm 7Mo1pz1P1g3gD9cYQnrFx6AH2NDek3dgLSLRbvYr9O/eUMaRZ4zXTKQMVkx3yH2A8Hgk d2cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678737607; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L+EYu8ePA3dMFVGocNPG9pYEHQq3W3rsNMZsR1ocQOs=; b=xBgZh2kosesr1zEN4/97aPLzpn4RPdyto2VeYisDW3u9l0aZ8BMtK1ycmWxliBiOdl +NoOe6sEou0PG7EvV3Vr+yvhF4Zop3/dDB3IUYb6hjcelSOUssf53Zq9mXSa7GbUk8Q/ orNrDbk7N796UvtZQVznJNFqNkG+iHcjMjQs9KoZl0PaMF/Nw4vI3F94THh7g3L4sbEQ SwchmbAX5vQPK64WpjdcyDqaExZ0ekyn1dmhXex4ib553EHarPw83bD8eN/mpbuDUOPv IfcOkqvtAt67jMGxto/1DyjszxwXzA0xAlh338flhE9ISWhzzg3exLdsBXhZOPUz9lde pLhQ== X-Gm-Message-State: AO0yUKXm6TOEhOi8YwzLGuk4dVwECf9l6pW+hBhUE9S5dQaedCiozgWX oOeHTl4bibz+AnFxlH4zjtRzpg== X-Received: by 2002:ac2:442f:0:b0:4e0:54a3:4b3b with SMTP id w15-20020ac2442f000000b004e054a34b3bmr9905964lfl.69.1678737607704; Mon, 13 Mar 2023 13:00:07 -0700 (PDT) Received: from [192.168.1.101] (abyj16.neoplus.adsl.tpnet.pl. [83.9.29.16]) by smtp.gmail.com with ESMTPSA id w3-20020ac254a3000000b004cc800b1f2csm75431lfk.238.2023.03.13.13.00.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 13:00:07 -0700 (PDT) From: Konrad Dybcio Date: Mon, 13 Mar 2023 21:00:00 +0100 Subject: [PATCH v3 02/10] soc: qcom: rpmpd: Bring all definitions to the top MIME-Version: 1.0 Message-Id: <20230313-topic-rpmpd-v3-2-06a4f448ff90@linaro.org> References: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> In-Reply-To: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678737603; l=7583; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=tJz8D8f4CiouFxKHQ2BGayGyHthMiA7cOqLsJJ8H5rs=; b=7QrJX4Q0QrINj4LIQQYkyl62HC2ZAE60PjMkhac99xeHqD1P3pK2UOfhn4iIKF2hYnrUuyrU57Tk V8TSkzccAD6CqZIgru7VgVKY90C2hCiFl5ESJazdt4u6AOmxonSH X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_HTTP,RCVD_IN_SORBS_SOCKS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760284558755146701?= X-GMAIL-MSGID: =?utf-8?q?1760284558755146701?= Keep all definitions in one place in preparation for a cleanup to make things tidier. Signed-off-by: Konrad Dybcio --- drivers/soc/qcom/rpmpd.c | 111 +++++++++++++++++++++-------------------------- 1 file changed, 49 insertions(+), 62 deletions(-) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index d99a56509e33..7d9e762232ea 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -117,12 +117,58 @@ struct rpmpd_desc { static DEFINE_MUTEX(rpmpd_lock); -/* mdm9607 RPM Power Domains */ +DEFINE_RPMPD_PAIR(vddcx, vddcx_ao, RWCX, LEVEL, 0); +DEFINE_RPMPD_PAIR(vddcx, vddcx_ao, SMPA, CORNER, 1); +DEFINE_RPMPD_PAIR(vddcx, vddcx_ao, SMPA, CORNER, 2); +DEFINE_RPMPD_PAIR(vddcx, vddcx_ao, SMPA, LEVEL, 2); DEFINE_RPMPD_PAIR(vddcx, vddcx_ao, SMPA, LEVEL, 3); +DEFINE_RPMPD_VFL(vddcx_vfl, RWCX, 0); +DEFINE_RPMPD_VFL(vddcx_vfl, RWSC, 2); +DEFINE_RPMPD_VFC(vddcx_vfc, SMPA, 1); +DEFINE_RPMPD_VFC(vddcx_vfc, SMPA, 2); +DEFINE_RPMPD_VFL(vddcx_vfl, SMPA, 2); DEFINE_RPMPD_VFL(vddcx_vfl, SMPA, 3); +DEFINE_RPMPD_CORNER(vddgfx, SMPB, 2); +DEFINE_RPMPD_VFC(vddgfx_vfc, SMPB, 2); + +DEFINE_RPMPD_PAIR(vddgx, vddgx_ao, RWGX, LEVEL, 0); + +DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, LDOA, CORNER, 3); DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, LDOA, LEVEL, 12); +DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, SMPA, CORNER, 2); +DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, RWMX, LEVEL, 0); +DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, SMPA, LEVEL, 6); +DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, SMPA, LEVEL, 7); DEFINE_RPMPD_VFL(vddmx_vfl, LDOA, 12); +DEFINE_RPMPD_VFL(vddmx_vfl, RWMX, 0); +DEFINE_RPMPD_VFL(vddmx_vfl, RWSM, 6); + +DEFINE_RPMPD_PAIR(vddmd, vddmd_ao, SMPA, CORNER, 1); +DEFINE_RPMPD_PAIR(vddmd, vddmd_ao, SMPA, LEVEL, 1); +DEFINE_RPMPD_VFC(vddmd_vfc, SMPA, 1); + +DEFINE_RPMPD_LEVEL(vdd_lpi_cx, RWLC, 0); +DEFINE_RPMPD_LEVEL(vdd_lpicx, RWLC, 0); +DEFINE_RPMPD_VFL(vdd_lpicx_vfl, RWLC, 0); + +DEFINE_RPMPD_LEVEL(vdd_lpi_mx, RWLM, 0); +DEFINE_RPMPD_LEVEL(vdd_lpimx, RWLM, 0); +DEFINE_RPMPD_VFL(vdd_lpimx_vfl, RWLM, 0); + +DEFINE_RPMPD_CORNER(vddsscx, LDOA, 26); +DEFINE_RPMPD_LEVEL(vdd_ssccx, RWLC, 0); +DEFINE_RPMPD_LEVEL(vdd_ssccx, RWSC, 0); +DEFINE_RPMPD_VFC(vddsscx_vfc, LDOA, 26); +DEFINE_RPMPD_VFL(vdd_ssccx_vfl, RWLC, 0); +DEFINE_RPMPD_VFL(vdd_ssccx_vfl, RWSC, 0); + +DEFINE_RPMPD_LEVEL(vdd_sscmx, RWLM, 0); +DEFINE_RPMPD_LEVEL(vdd_sscmx, RWSM, 0); +DEFINE_RPMPD_VFL(vdd_sscmx_vfl, RWLM, 0); +DEFINE_RPMPD_VFL(vdd_sscmx_vfl, RWSM, 0); + +/* mdm9607 RPM Power Domains */ static struct rpmpd *mdm9607_rpmpds[] = { [MDM9607_VDDCX] = &SMPA3_LEVEL_vddcx, [MDM9607_VDDCX_AO] = &SMPA3_LEVEL_vddcx_ao, @@ -139,9 +185,6 @@ static const struct rpmpd_desc mdm9607_desc = { }; /* msm8226 RPM Power Domains */ -DEFINE_RPMPD_PAIR(vddcx, vddcx_ao, SMPA, CORNER, 1); -DEFINE_RPMPD_VFC(vddcx_vfc, SMPA, 1); - static struct rpmpd *msm8226_rpmpds[] = { [MSM8226_VDDCX] = &SMPA1_CORNER_vddcx, [MSM8226_VDDCX_AO] = &SMPA1_CORNER_vddcx_ao, @@ -155,14 +198,6 @@ static const struct rpmpd_desc msm8226_desc = { }; /* msm8939 RPM Power Domains */ -DEFINE_RPMPD_PAIR(vddmd, vddmd_ao, SMPA, CORNER, 1); -DEFINE_RPMPD_VFC(vddmd_vfc, SMPA, 1); - -DEFINE_RPMPD_PAIR(vddcx, vddcx_ao, SMPA, CORNER, 2); -DEFINE_RPMPD_VFC(vddcx_vfc, SMPA, 2); - -DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, LDOA, CORNER, 3); - static struct rpmpd *msm8939_rpmpds[] = { [MSM8939_VDDMDCX] = &SMPA1_CORNER_vddmd, [MSM8939_VDDMDCX_AO] = &SMPA1_CORNER_vddmd_ao, @@ -196,12 +231,6 @@ static const struct rpmpd_desc msm8916_desc = { }; /* msm8953 RPM Power Domains */ -DEFINE_RPMPD_PAIR(vddmd, vddmd_ao, SMPA, LEVEL, 1); -DEFINE_RPMPD_PAIR(vddcx, vddcx_ao, SMPA, LEVEL, 2); -DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, SMPA, LEVEL, 7); - -DEFINE_RPMPD_VFL(vddcx_vfl, SMPA, 2); - static struct rpmpd *msm8953_rpmpds[] = { [MSM8953_VDDMD] = &SMPA1_LEVEL_vddmd, [MSM8953_VDDMD_AO] = &SMPA1_LEVEL_vddmd_ao, @@ -219,11 +248,6 @@ static const struct rpmpd_desc msm8953_desc = { }; /* msm8976 RPM Power Domains */ -DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, SMPA, LEVEL, 6); - -DEFINE_RPMPD_VFL(vddcx_vfl, RWSC, 2); -DEFINE_RPMPD_VFL(vddmx_vfl, RWSM, 6); - static struct rpmpd *msm8976_rpmpds[] = { [MSM8976_VDDCX] = &SMPA2_LEVEL_vddcx, [MSM8976_VDDCX_AO] = &SMPA2_LEVEL_vddcx_ao, @@ -240,18 +264,14 @@ static const struct rpmpd_desc msm8976_desc = { }; /* msm8994 RPM Power domains */ -DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, SMPA, CORNER, 2); -/* Attention! *Some* 8994 boards with pm8004 may use SMPC here! */ -DEFINE_RPMPD_CORNER(vddgfx, SMPB, 2); - -DEFINE_RPMPD_VFC(vddgfx_vfc, SMPB, 2); - static struct rpmpd *msm8994_rpmpds[] = { [MSM8994_VDDCX] = &SMPA1_CORNER_vddcx, [MSM8994_VDDCX_AO] = &SMPA1_CORNER_vddcx_ao, [MSM8994_VDDCX_VFC] = &SMPA1_vddcx_vfc, [MSM8994_VDDMX] = &SMPA2_CORNER_vddmx, [MSM8994_VDDMX_AO] = &SMPA2_CORNER_vddmx_ao, + + /* Attention! *Some* 8994 boards with pm8004 may use SMPC here! */ [MSM8994_VDDGFX] = &SMPB2_vddgfx_corner, [MSM8994_VDDGFX_VFC] = &SMPB2_vddgfx_vfc, }; @@ -263,10 +283,6 @@ static const struct rpmpd_desc msm8994_desc = { }; /* msm8996 RPM Power domains */ -DEFINE_RPMPD_CORNER(vddsscx, LDOA, 26); - -DEFINE_RPMPD_VFC(vddsscx_vfc, LDOA, 26); - static struct rpmpd *msm8996_rpmpds[] = { [MSM8996_VDDCX] = &SMPA1_CORNER_vddcx, [MSM8996_VDDCX_AO] = &SMPA1_CORNER_vddcx_ao, @@ -284,18 +300,6 @@ static const struct rpmpd_desc msm8996_desc = { }; /* msm8998 RPM Power domains */ -DEFINE_RPMPD_PAIR(vddcx, vddcx_ao, RWCX, LEVEL, 0); -DEFINE_RPMPD_VFL(vddcx_vfl, RWCX, 0); - -DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, RWMX, LEVEL, 0); -DEFINE_RPMPD_VFL(vddmx_vfl, RWMX, 0); - -DEFINE_RPMPD_LEVEL(vdd_ssccx, RWSC, 0); -DEFINE_RPMPD_VFL(vdd_ssccx_vfl, RWSC, 0); - -DEFINE_RPMPD_LEVEL(vdd_sscmx, RWSM, 0); -DEFINE_RPMPD_VFL(vdd_sscmx_vfl, RWSM, 0); - static struct rpmpd *msm8998_rpmpds[] = { [MSM8998_VDDCX] = &RWCX0_LEVEL_vddcx, [MSM8998_VDDCX_AO] = &RWCX0_LEVEL_vddcx_ao, @@ -316,12 +320,6 @@ static const struct rpmpd_desc msm8998_desc = { }; /* qcs404 RPM Power domains */ -DEFINE_RPMPD_LEVEL(vdd_lpicx, RWLC, 0); -DEFINE_RPMPD_VFL(vdd_lpicx_vfl, RWLC, 0); - -DEFINE_RPMPD_LEVEL(vdd_lpimx, RWLM, 0); -DEFINE_RPMPD_VFL(vdd_lpimx_vfl, RWLM, 0); - static struct rpmpd *qcs404_rpmpds[] = { [QCS404_VDDMX] = &RWMX0_LEVEL_vddmx, [QCS404_VDDMX_AO] = &RWMX0_LEVEL_vddmx_ao, @@ -339,13 +337,6 @@ static const struct rpmpd_desc qcs404_desc = { }; /* sdm660 RPM Power domains */ - -DEFINE_RPMPD_LEVEL(vdd_ssccx, RWLC, 0); -DEFINE_RPMPD_VFL(vdd_ssccx_vfl, RWLC, 0); - -DEFINE_RPMPD_LEVEL(vdd_sscmx, RWLM, 0); -DEFINE_RPMPD_VFL(vdd_sscmx_vfl, RWLM, 0); - static struct rpmpd *sdm660_rpmpds[] = { [SDM660_VDDCX] = &RWCX0_LEVEL_vddcx, [SDM660_VDDCX_AO] = &RWCX0_LEVEL_vddcx_ao, @@ -366,9 +357,6 @@ static const struct rpmpd_desc sdm660_desc = { }; /* sm4250/6115 RPM Power domains */ -DEFINE_RPMPD_LEVEL(vdd_lpi_cx, RWLC, 0); -DEFINE_RPMPD_LEVEL(vdd_lpi_mx, RWLM, 0); - static struct rpmpd *sm6115_rpmpds[] = { [SM6115_VDDCX] = &RWCX0_LEVEL_vddcx, [SM6115_VDDCX_AO] = &RWCX0_LEVEL_vddcx_ao, @@ -402,7 +390,6 @@ static const struct rpmpd_desc sm6125_desc = { .max_state = RPM_SMD_LEVEL_BINNING, }; -DEFINE_RPMPD_PAIR(vddgx, vddgx_ao, RWGX, LEVEL, 0); static struct rpmpd *sm6375_rpmpds[] = { [SM6375_VDDCX] = &RWCX0_LEVEL_vddcx, [SM6375_VDDCX_AO] = &RWCX0_LEVEL_vddcx_ao, From patchwork Mon Mar 13 20:00:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 69078 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1379565wrd; Mon, 13 Mar 2023 13:02:15 -0700 (PDT) X-Google-Smtp-Source: AK7set+6DzjGJh6pgMh0iVoR95YoIWtyTyQQ3NCzuGN4/S50GB15sneZdVkz/cG7irUcWtT3DVQr X-Received: by 2002:a17:903:22c4:b0:19d:1897:8192 with SMTP id y4-20020a17090322c400b0019d18978192mr42889407plg.47.1678737735101; Mon, 13 Mar 2023 13:02:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678737735; cv=none; d=google.com; s=arc-20160816; b=pfL0+c9268fEQ52GYtDhx2Po2D2wp4YTSEikN1I3U+w1H2HniYmQrL1CRraUXmmWCH xo6XP4ecDJPdHMBqn64WHy1lR8pF3VVjqORj6u0L2bnV0eEZNGfkCltzEPx6ssDjFYJa fliuuuV9qXk/m42Ein4MvABkvml6en7ADdpuB0QtSottkHcapPiHqX6y9AMgK+uXjvhI mDW5kbUqRk6AH/U9F0xmWE/UwA0bJDmfi55IQegKamBb3iGH8LsM9ReElkPeNQCzb0mD 6LbNhbtJgQzkDqAWzNxac6qg9eK6EHVK0inVLxSUDqhBxA6OFUHUUTq4IN2+42YbCizZ gXpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=WpJu9aK6C1Wq/bOWJwZJEPNTv5iMsR3EtRhnCHCKB+U=; b=zmdiYNoq3eOWF6s28WOnuWNRm4UAsHlqTrj3OC21U1oGPL+8WMkzqHtlGpbhr6JjgV +V5C/dxhpVqUz+1yJ6NldmhUg1kOYedme0gbXjtqkOS2AIoypF1BjkylDkI6117Eoad7 NUIs0d/5HFjnp3uwMnsABa5b34fj1hGHMSltGcU82GUX6OPwNgtTRydOY+EsQmwAtqNo IT+aZAcZr+L9MMwzDt6MUOIsEOxOPTKg6Ac+nlCjKEwfyZ272zvM0AzY8r4YtZmJbwbO iOZxAkzBXbeAcRdgvu/KYxAQHOfbypyuAQyPYBRas6TuHwFl/WShgC2BGEPypwcsLT45 o2bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="EIQFJv/v"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v3-20020a1709029a0300b0019ca7a76d68si535836plp.67.2023.03.13.13.02.00; Mon, 13 Mar 2023 13:02:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="EIQFJv/v"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229987AbjCMUAT (ORCPT + 99 others); Mon, 13 Mar 2023 16:00:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229968AbjCMUAM (ORCPT ); Mon, 13 Mar 2023 16:00:12 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7149074A51 for ; Mon, 13 Mar 2023 13:00:10 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id m4so4202382lfj.2 for ; Mon, 13 Mar 2023 13:00:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678737609; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=WpJu9aK6C1Wq/bOWJwZJEPNTv5iMsR3EtRhnCHCKB+U=; b=EIQFJv/vqrvhHoGChAjmk16eoqj5wuQ/JJF0AFO/tWRzp4IjBoi7Iae5HHVjP7zToz Upy6Icd8/A2c9zBA62rO1f1yjKJYwv5hquPHPVaEyCE7syRO9M74j3A+wlrVzc2fe/L+ jKo62ZF0bJAZwDCpdTKaEIP+N+a9YEEcoPt6ZpwdZtvvDl9qw5TgLMNlfQCPantc5G0i nekbu8MXMV6QmcBIlaUK9r5hR+P0viY06x0yV+aVPbP5HZIrS0pIJ7Rlhx3r+iFDYsYc inALgF9Z5BUjT93ZrMJad+ShSAlPfUOkYDBMAdnqo87In019OXAPJSXCij/ivUq/wQux ufKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678737609; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WpJu9aK6C1Wq/bOWJwZJEPNTv5iMsR3EtRhnCHCKB+U=; b=BhbJICmtXONt1fcxR/yCDNwEVwCB+qDHWmMv1ZiOeTxH2wZAtlHLfrTzfT31zS8EcJ Jwr3M4rNrpcbv0pBvo2PHjXIVKGcXEHfz14I/E1H0bBLkou0oNP/+9tGMb9789mulLKk 0ou7bK+hH55gYxsdW9hl7meRQ/pSwjGDqm3bJrp/76IumWkacjiWjAdilOGMaySP0lfD NLGIcFUy9ukOf5KmPnmjcPEjhfEeGAITtOH3uFmZtcTi6e37LlC9B2ShksR0iS2x4aRF Jb2ojCFHgqQmHi6JAatXuZ6L8eZUDeLs96W0ozYbRmFXBFp38122szduKB5Ut5gAzGua eiPw== X-Gm-Message-State: AO0yUKVS/RPfnCVrTH06At3C9crD22WdXEMy7t1HFz+Kc2KRPkHI0jzv k+xHCU0aNKUBJgX5uNk9W5z9UA== X-Received: by 2002:ac2:5106:0:b0:4df:c2bd:58e0 with SMTP id q6-20020ac25106000000b004dfc2bd58e0mr9878773lfb.59.1678737608786; Mon, 13 Mar 2023 13:00:08 -0700 (PDT) Received: from [192.168.1.101] (abyj16.neoplus.adsl.tpnet.pl. [83.9.29.16]) by smtp.gmail.com with ESMTPSA id w3-20020ac254a3000000b004cc800b1f2csm75431lfk.238.2023.03.13.13.00.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 13:00:08 -0700 (PDT) From: Konrad Dybcio Date: Mon, 13 Mar 2023 21:00:01 +0100 Subject: [PATCH v3 03/10] soc: qcom: rpmpd: Unify Low Power Island definitions MIME-Version: 1.0 Message-Id: <20230313-topic-rpmpd-v3-3-06a4f448ff90@linaro.org> References: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> In-Reply-To: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678737603; l=1353; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=mKejTkicxehr99wJklnHdnLAyKORPeX6SnazDDhGxh4=; b=NKvWACzeiN94Hug06gNAvVTWhDpa83B//+OWpPPb+xsE4nqQtVWc9V04UlrF7dFuz/0uJbzhemQV ZDnyea5DBHnFyFEB5lu4B0qez21ldJPc5Hpu1p55amBFey2Fjjg6 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_HTTP,RCVD_IN_SORBS_SOCKS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760284099264470029?= X-GMAIL-MSGID: =?utf-8?q?1760284099264470029?= Up until now, we had 2 separate entries for VDD_LPI[CM]X and VDD_LPI_[CM]X which both pointed to the same RPM resource. Fix it. Signed-off-by: Konrad Dybcio --- drivers/soc/qcom/rpmpd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 7d9e762232ea..8ba025c4eca3 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -149,11 +149,9 @@ DEFINE_RPMPD_PAIR(vddmd, vddmd_ao, SMPA, LEVEL, 1); DEFINE_RPMPD_VFC(vddmd_vfc, SMPA, 1); DEFINE_RPMPD_LEVEL(vdd_lpi_cx, RWLC, 0); -DEFINE_RPMPD_LEVEL(vdd_lpicx, RWLC, 0); DEFINE_RPMPD_VFL(vdd_lpicx_vfl, RWLC, 0); DEFINE_RPMPD_LEVEL(vdd_lpi_mx, RWLM, 0); -DEFINE_RPMPD_LEVEL(vdd_lpimx, RWLM, 0); DEFINE_RPMPD_VFL(vdd_lpimx_vfl, RWLM, 0); DEFINE_RPMPD_CORNER(vddsscx, LDOA, 26); @@ -324,9 +322,9 @@ static struct rpmpd *qcs404_rpmpds[] = { [QCS404_VDDMX] = &RWMX0_LEVEL_vddmx, [QCS404_VDDMX_AO] = &RWMX0_LEVEL_vddmx_ao, [QCS404_VDDMX_VFL] = &RWMX0_vddmx_vfl, - [QCS404_LPICX] = &RWLC0_vdd_lpicx_lvl, + [QCS404_LPICX] = &RWLC0_vdd_lpi_cx_lvl, [QCS404_LPICX_VFL] = &RWLC0_vdd_lpicx_vfl, - [QCS404_LPIMX] = &RWLM0_vdd_lpimx_lvl, + [QCS404_LPIMX] = &RWLM0_vdd_lpi_mx_lvl, [QCS404_LPIMX_VFL] = &RWLM0_vdd_lpimx_vfl, }; From patchwork Mon Mar 13 20:00:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 69084 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1382462wrd; Mon, 13 Mar 2023 13:08:12 -0700 (PDT) X-Google-Smtp-Source: AK7set8B3BdjqoB+yZbJu2VQt2IkaJjkDwwSQ6Wb8MfihhvA2Ub5k4YKinKtHEPBm5OoO6h3viI6 X-Received: by 2002:a17:902:db07:b0:19f:2c89:c0d0 with SMTP id m7-20020a170902db0700b0019f2c89c0d0mr8805153plx.56.1678738091782; Mon, 13 Mar 2023 13:08:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678738091; cv=none; d=google.com; s=arc-20160816; b=oedWF/WdUsMhZDUZGbbng0DiAWzOac/HUcugqM26D4cudontKf/EqkjDY0RyS9LqXc g/YJ1+XrsYOis/TaBzakdx4bVrDowswgDxD583lvKqO7f4UbYYFHlhQoa9eNq3Xp88k0 UqMDvKgcc40ZwjFvCGVeBPkXtvrl9XMZlVNnXkbBfegI3ebpF5UPidvX1XVOekGKV0AN ZKc2Oj9poz6hzCGTvLWBMfzACPlgap/XnLYw3QVqCYovu28maQMpll+ncKbREOSrGzBh zmN88bxGz9m2W1+HhAZxyGlp7/AKgW9VkJ6d78w6rw88sh5y6H6WUTOy9JoLmkWmDhhA D16Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=5dQKRBahUfx4Daxd8fx9pj3iAoX6zaBqVdrQHf+P5Uo=; b=lhiOyQy8xq0XwAFmbj3xFPtc1iFVAOhE9OzBV/6BBl3aofqkn0kVnLMmFTT4w7b8Sr 6hceTI7mFIGpqnuf98NBXQBJfpmg0ZJ2NqOIqv8CjzuwXxSXxSurp5Nb8GkBIlWaA5J/ XxiAY0KHSN6ELQo5ZnSB0+bhz/KCVmraVaK5zRzRRFtcmFVL+LDuQynXrLMjAkI4qJf4 Ph1x4uoo0QEcZ3mzPAPPKAfHsFXpjM8Y5NudkpiK2KNVKJa7LTeusoH8zbLwkzfW/PNx ptkOIbpLUdLmk8GiwtP4evPmKj0hjAIISxnRGiISGPpviEBPdQVqXcluLJc97boozHS5 cKng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Y52S4Q/L"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c20-20020a6566d4000000b00509bd53cd90si302093pgw.436.2023.03.13.13.07.58; Mon, 13 Mar 2023 13:08:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Y52S4Q/L"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230117AbjCMUAY (ORCPT + 99 others); Mon, 13 Mar 2023 16:00:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229998AbjCMUAO (ORCPT ); Mon, 13 Mar 2023 16:00:14 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A6F2559FB for ; Mon, 13 Mar 2023 13:00:12 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id f18so17235311lfa.3 for ; Mon, 13 Mar 2023 13:00:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678737610; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=5dQKRBahUfx4Daxd8fx9pj3iAoX6zaBqVdrQHf+P5Uo=; b=Y52S4Q/LZEzNrN+mCGfp8KZYZ4sDJA+G2x4Dx7Pz2CWno28zMsjhnkC5Dc/dZ0eGC/ 2zd1PW6JpLf6jkxQZjR2uMq6wbvPol1bTef6NhQr3UuFJpdFL+B055+DHl6letYY9WnB xValIkIuZCOdUq1EtJ7VQLRnr/dAt37ru9pM5tU3UujUM8quic119Z4AXMRQJHCInDeF Vwp+v74QuhVi+nAFG6tVFC94rTOHvyLpqgWxjUMiVExjOIvFFyBsZFevgX9B9eaNrYH/ nEN2DOTTt4UwRQcq6zF80OligOiyf0LcYkrqCu8YsVtEnZj9yVN6+jmoh3rw67wtIlf/ 12pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678737610; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5dQKRBahUfx4Daxd8fx9pj3iAoX6zaBqVdrQHf+P5Uo=; b=Y1YsAK5OTqwT2U3voeSmW4I1D779KRIlA6FYG7vcQyUxnGacWu7txWHuSVoPwOpHZ2 qp5aWwmik/XsrU74rVKym//QxoXbfR7kpVCyooomZn3U8NCWkI58eUYD01LiDqKClbxb OcvH8U+akA7yWOjlFeaUadUERna8NgO8+obIhFmvJ6uWPtBCQLc+mQ3rIZ9OG6NnNql/ QauOAdriZcmRqs/iOlUmR16gAbEmDVOrhGN653bpI3kGjgGVkhofMT7xiXk0NZrKyiTX tApEwUh/jY1WkvtzC3UtmycUUFuh1CW2Yh+fprDqKxZN3qkmSvO3aDlpriFI6TDwzr8j 3rwg== X-Gm-Message-State: AO0yUKXoMDGmYA4C/CmhMis7hi2ncF7ftF8wdv/HAWzCDPCNjY1jv4Dv s2Fa8X6JvAv4LxcFsl/zJSBSpw== X-Received: by 2002:ac2:51c8:0:b0:4cb:1189:2862 with SMTP id u8-20020ac251c8000000b004cb11892862mr10463228lfm.13.1678737610056; Mon, 13 Mar 2023 13:00:10 -0700 (PDT) Received: from [192.168.1.101] (abyj16.neoplus.adsl.tpnet.pl. [83.9.29.16]) by smtp.gmail.com with ESMTPSA id w3-20020ac254a3000000b004cc800b1f2csm75431lfk.238.2023.03.13.13.00.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 13:00:09 -0700 (PDT) From: Konrad Dybcio Date: Mon, 13 Mar 2023 21:00:02 +0100 Subject: [PATCH v3 04/10] soc: qcom: rpmpd: Remove vdd* from struct names MIME-Version: 1.0 Message-Id: <20230313-topic-rpmpd-v3-4-06a4f448ff90@linaro.org> References: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> In-Reply-To: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678737603; l=16550; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=DxEe9oWFMzX9ozqd6RRE/zQXnj40TR2ma+Ykt5VrwcE=; b=F5/ODIaUPz9L5GKVeLpHFNo0OhYN4G0sYZ7vGTIRFi/ptw/uyhlv8N2AoVZpkvdr5VsoykBWCcaA Y56UnCq0DMNS/H4qhLx/3HAsq5WYPOMqkRFRxzLMZL976lzLGZls X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_HTTP,RCVD_IN_SORBS_SOCKS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760284473516793748?= X-GMAIL-MSGID: =?utf-8?q?1760284473516793748?= It's rather obvious by the characteristic of these resources that they correspond to some voltage lines governed by RPM. Remove the "vdd" unnecessary prefix from them. Signed-off-by: Konrad Dybcio --- drivers/soc/qcom/rpmpd.c | 312 +++++++++++++++++++++++------------------------ 1 file changed, 156 insertions(+), 156 deletions(-) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 8ba025c4eca3..8f145663af9a 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -117,63 +117,63 @@ struct rpmpd_desc { static DEFINE_MUTEX(rpmpd_lock); -DEFINE_RPMPD_PAIR(vddcx, vddcx_ao, RWCX, LEVEL, 0); -DEFINE_RPMPD_PAIR(vddcx, vddcx_ao, SMPA, CORNER, 1); -DEFINE_RPMPD_PAIR(vddcx, vddcx_ao, SMPA, CORNER, 2); -DEFINE_RPMPD_PAIR(vddcx, vddcx_ao, SMPA, LEVEL, 2); -DEFINE_RPMPD_PAIR(vddcx, vddcx_ao, SMPA, LEVEL, 3); -DEFINE_RPMPD_VFL(vddcx_vfl, RWCX, 0); -DEFINE_RPMPD_VFL(vddcx_vfl, RWSC, 2); -DEFINE_RPMPD_VFC(vddcx_vfc, SMPA, 1); -DEFINE_RPMPD_VFC(vddcx_vfc, SMPA, 2); -DEFINE_RPMPD_VFL(vddcx_vfl, SMPA, 2); -DEFINE_RPMPD_VFL(vddcx_vfl, SMPA, 3); - -DEFINE_RPMPD_CORNER(vddgfx, SMPB, 2); -DEFINE_RPMPD_VFC(vddgfx_vfc, SMPB, 2); - -DEFINE_RPMPD_PAIR(vddgx, vddgx_ao, RWGX, LEVEL, 0); - -DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, LDOA, CORNER, 3); -DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, LDOA, LEVEL, 12); -DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, SMPA, CORNER, 2); -DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, RWMX, LEVEL, 0); -DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, SMPA, LEVEL, 6); -DEFINE_RPMPD_PAIR(vddmx, vddmx_ao, SMPA, LEVEL, 7); -DEFINE_RPMPD_VFL(vddmx_vfl, LDOA, 12); -DEFINE_RPMPD_VFL(vddmx_vfl, RWMX, 0); -DEFINE_RPMPD_VFL(vddmx_vfl, RWSM, 6); - -DEFINE_RPMPD_PAIR(vddmd, vddmd_ao, SMPA, CORNER, 1); -DEFINE_RPMPD_PAIR(vddmd, vddmd_ao, SMPA, LEVEL, 1); -DEFINE_RPMPD_VFC(vddmd_vfc, SMPA, 1); - -DEFINE_RPMPD_LEVEL(vdd_lpi_cx, RWLC, 0); -DEFINE_RPMPD_VFL(vdd_lpicx_vfl, RWLC, 0); - -DEFINE_RPMPD_LEVEL(vdd_lpi_mx, RWLM, 0); -DEFINE_RPMPD_VFL(vdd_lpimx_vfl, RWLM, 0); - -DEFINE_RPMPD_CORNER(vddsscx, LDOA, 26); -DEFINE_RPMPD_LEVEL(vdd_ssccx, RWLC, 0); -DEFINE_RPMPD_LEVEL(vdd_ssccx, RWSC, 0); -DEFINE_RPMPD_VFC(vddsscx_vfc, LDOA, 26); -DEFINE_RPMPD_VFL(vdd_ssccx_vfl, RWLC, 0); -DEFINE_RPMPD_VFL(vdd_ssccx_vfl, RWSC, 0); - -DEFINE_RPMPD_LEVEL(vdd_sscmx, RWLM, 0); -DEFINE_RPMPD_LEVEL(vdd_sscmx, RWSM, 0); -DEFINE_RPMPD_VFL(vdd_sscmx_vfl, RWLM, 0); -DEFINE_RPMPD_VFL(vdd_sscmx_vfl, RWSM, 0); +DEFINE_RPMPD_PAIR(cx, cx_ao, RWCX, LEVEL, 0); +DEFINE_RPMPD_PAIR(cx, cx_ao, SMPA, CORNER, 1); +DEFINE_RPMPD_PAIR(cx, cx_ao, SMPA, CORNER, 2); +DEFINE_RPMPD_PAIR(cx, cx_ao, SMPA, LEVEL, 2); +DEFINE_RPMPD_PAIR(cx, cx_ao, SMPA, LEVEL, 3); +DEFINE_RPMPD_VFL(cx_vfl, RWCX, 0); +DEFINE_RPMPD_VFL(cx_vfl, RWSC, 2); +DEFINE_RPMPD_VFC(cx_vfc, SMPA, 1); +DEFINE_RPMPD_VFC(cx_vfc, SMPA, 2); +DEFINE_RPMPD_VFL(cx_vfl, SMPA, 2); +DEFINE_RPMPD_VFL(cx_vfl, SMPA, 3); + +DEFINE_RPMPD_CORNER(gfx, SMPB, 2); +DEFINE_RPMPD_VFC(gfx_vfc, SMPB, 2); + +DEFINE_RPMPD_PAIR(gx, gx_ao, RWGX, LEVEL, 0); + +DEFINE_RPMPD_PAIR(mx, mx_ao, LDOA, CORNER, 3); +DEFINE_RPMPD_PAIR(mx, mx_ao, LDOA, LEVEL, 12); +DEFINE_RPMPD_PAIR(mx, mx_ao, SMPA, CORNER, 2); +DEFINE_RPMPD_PAIR(mx, mx_ao, RWMX, LEVEL, 0); +DEFINE_RPMPD_PAIR(mx, mx_ao, SMPA, LEVEL, 6); +DEFINE_RPMPD_PAIR(mx, mx_ao, SMPA, LEVEL, 7); +DEFINE_RPMPD_VFL(mx_vfl, LDOA, 12); +DEFINE_RPMPD_VFL(mx_vfl, RWMX, 0); +DEFINE_RPMPD_VFL(mx_vfl, RWSM, 6); + +DEFINE_RPMPD_PAIR(md, md_ao, SMPA, CORNER, 1); +DEFINE_RPMPD_PAIR(md, md_ao, SMPA, LEVEL, 1); +DEFINE_RPMPD_VFC(md_vfc, SMPA, 1); + +DEFINE_RPMPD_LEVEL(lpi_cx, RWLC, 0); +DEFINE_RPMPD_VFL(lpicx_vfl, RWLC, 0); + +DEFINE_RPMPD_LEVEL(lpi_mx, RWLM, 0); +DEFINE_RPMPD_VFL(lpimx_vfl, RWLM, 0); + +DEFINE_RPMPD_CORNER(sscx, LDOA, 26); +DEFINE_RPMPD_LEVEL(ssccx, RWLC, 0); +DEFINE_RPMPD_LEVEL(ssccx, RWSC, 0); +DEFINE_RPMPD_VFC(sscx_vfc, LDOA, 26); +DEFINE_RPMPD_VFL(ssccx_vfl, RWLC, 0); +DEFINE_RPMPD_VFL(ssccx_vfl, RWSC, 0); + +DEFINE_RPMPD_LEVEL(sscmx, RWLM, 0); +DEFINE_RPMPD_LEVEL(sscmx, RWSM, 0); +DEFINE_RPMPD_VFL(sscmx_vfl, RWLM, 0); +DEFINE_RPMPD_VFL(sscmx_vfl, RWSM, 0); /* mdm9607 RPM Power Domains */ static struct rpmpd *mdm9607_rpmpds[] = { - [MDM9607_VDDCX] = &SMPA3_LEVEL_vddcx, - [MDM9607_VDDCX_AO] = &SMPA3_LEVEL_vddcx_ao, - [MDM9607_VDDCX_VFL] = &SMPA3_vddcx_vfl, - [MDM9607_VDDMX] = &LDOA12_LEVEL_vddmx, - [MDM9607_VDDMX_AO] = &LDOA12_LEVEL_vddmx_ao, - [MDM9607_VDDMX_VFL] = &LDOA12_vddmx_vfl, + [MDM9607_VDDCX] = &SMPA3_LEVEL_cx, + [MDM9607_VDDCX_AO] = &SMPA3_LEVEL_cx_ao, + [MDM9607_VDDCX_VFL] = &SMPA3_cx_vfl, + [MDM9607_VDDMX] = &LDOA12_LEVEL_mx, + [MDM9607_VDDMX_AO] = &LDOA12_LEVEL_mx_ao, + [MDM9607_VDDMX_VFL] = &LDOA12_mx_vfl, }; static const struct rpmpd_desc mdm9607_desc = { @@ -184,9 +184,9 @@ static const struct rpmpd_desc mdm9607_desc = { /* msm8226 RPM Power Domains */ static struct rpmpd *msm8226_rpmpds[] = { - [MSM8226_VDDCX] = &SMPA1_CORNER_vddcx, - [MSM8226_VDDCX_AO] = &SMPA1_CORNER_vddcx_ao, - [MSM8226_VDDCX_VFC] = &SMPA1_vddcx_vfc, + [MSM8226_VDDCX] = &SMPA1_CORNER_cx, + [MSM8226_VDDCX_AO] = &SMPA1_CORNER_cx_ao, + [MSM8226_VDDCX_VFC] = &SMPA1_cx_vfc, }; static const struct rpmpd_desc msm8226_desc = { @@ -197,14 +197,14 @@ static const struct rpmpd_desc msm8226_desc = { /* msm8939 RPM Power Domains */ static struct rpmpd *msm8939_rpmpds[] = { - [MSM8939_VDDMDCX] = &SMPA1_CORNER_vddmd, - [MSM8939_VDDMDCX_AO] = &SMPA1_CORNER_vddmd_ao, - [MSM8939_VDDMDCX_VFC] = &SMPA1_vddmd_vfc, - [MSM8939_VDDCX] = &SMPA2_CORNER_vddcx, - [MSM8939_VDDCX_AO] = &SMPA2_CORNER_vddcx_ao, - [MSM8939_VDDCX_VFC] = &SMPA2_vddcx_vfc, - [MSM8939_VDDMX] = &LDOA3_CORNER_vddmx, - [MSM8939_VDDMX_AO] = &LDOA3_CORNER_vddmx_ao, + [MSM8939_VDDMDCX] = &SMPA1_CORNER_md, + [MSM8939_VDDMDCX_AO] = &SMPA1_CORNER_md_ao, + [MSM8939_VDDMDCX_VFC] = &SMPA1_md_vfc, + [MSM8939_VDDCX] = &SMPA2_CORNER_cx, + [MSM8939_VDDCX_AO] = &SMPA2_CORNER_cx_ao, + [MSM8939_VDDCX_VFC] = &SMPA2_cx_vfc, + [MSM8939_VDDMX] = &LDOA3_CORNER_mx, + [MSM8939_VDDMX_AO] = &LDOA3_CORNER_mx_ao, }; static const struct rpmpd_desc msm8939_desc = { @@ -215,11 +215,11 @@ static const struct rpmpd_desc msm8939_desc = { /* msm8916 RPM Power Domains */ static struct rpmpd *msm8916_rpmpds[] = { - [MSM8916_VDDCX] = &SMPA1_CORNER_vddcx, - [MSM8916_VDDCX_AO] = &SMPA1_CORNER_vddcx_ao, - [MSM8916_VDDCX_VFC] = &SMPA1_vddcx_vfc, - [MSM8916_VDDMX] = &LDOA3_CORNER_vddmx, - [MSM8916_VDDMX_AO] = &LDOA3_CORNER_vddmx_ao, + [MSM8916_VDDCX] = &SMPA1_CORNER_cx, + [MSM8916_VDDCX_AO] = &SMPA1_CORNER_cx_ao, + [MSM8916_VDDCX_VFC] = &SMPA1_cx_vfc, + [MSM8916_VDDMX] = &LDOA3_CORNER_mx, + [MSM8916_VDDMX_AO] = &LDOA3_CORNER_mx_ao, }; static const struct rpmpd_desc msm8916_desc = { @@ -230,13 +230,13 @@ static const struct rpmpd_desc msm8916_desc = { /* msm8953 RPM Power Domains */ static struct rpmpd *msm8953_rpmpds[] = { - [MSM8953_VDDMD] = &SMPA1_LEVEL_vddmd, - [MSM8953_VDDMD_AO] = &SMPA1_LEVEL_vddmd_ao, - [MSM8953_VDDCX] = &SMPA2_LEVEL_vddcx, - [MSM8953_VDDCX_AO] = &SMPA2_LEVEL_vddcx_ao, - [MSM8953_VDDCX_VFL] = &SMPA2_vddcx_vfl, - [MSM8953_VDDMX] = &SMPA7_LEVEL_vddmx, - [MSM8953_VDDMX_AO] = &SMPA7_LEVEL_vddmx_ao, + [MSM8953_VDDMD] = &SMPA1_LEVEL_md, + [MSM8953_VDDMD_AO] = &SMPA1_LEVEL_md_ao, + [MSM8953_VDDCX] = &SMPA2_LEVEL_cx, + [MSM8953_VDDCX_AO] = &SMPA2_LEVEL_cx_ao, + [MSM8953_VDDCX_VFL] = &SMPA2_cx_vfl, + [MSM8953_VDDMX] = &SMPA7_LEVEL_mx, + [MSM8953_VDDMX_AO] = &SMPA7_LEVEL_mx_ao, }; static const struct rpmpd_desc msm8953_desc = { @@ -247,12 +247,12 @@ static const struct rpmpd_desc msm8953_desc = { /* msm8976 RPM Power Domains */ static struct rpmpd *msm8976_rpmpds[] = { - [MSM8976_VDDCX] = &SMPA2_LEVEL_vddcx, - [MSM8976_VDDCX_AO] = &SMPA2_LEVEL_vddcx_ao, - [MSM8976_VDDCX_VFL] = &RWSC2_vddcx_vfl, - [MSM8976_VDDMX] = &SMPA6_LEVEL_vddmx, - [MSM8976_VDDMX_AO] = &SMPA6_LEVEL_vddmx_ao, - [MSM8976_VDDMX_VFL] = &RWSM6_vddmx_vfl, + [MSM8976_VDDCX] = &SMPA2_LEVEL_cx, + [MSM8976_VDDCX_AO] = &SMPA2_LEVEL_cx_ao, + [MSM8976_VDDCX_VFL] = &RWSC2_cx_vfl, + [MSM8976_VDDMX] = &SMPA6_LEVEL_mx, + [MSM8976_VDDMX_AO] = &SMPA6_LEVEL_mx_ao, + [MSM8976_VDDMX_VFL] = &RWSM6_mx_vfl, }; static const struct rpmpd_desc msm8976_desc = { @@ -263,15 +263,15 @@ static const struct rpmpd_desc msm8976_desc = { /* msm8994 RPM Power domains */ static struct rpmpd *msm8994_rpmpds[] = { - [MSM8994_VDDCX] = &SMPA1_CORNER_vddcx, - [MSM8994_VDDCX_AO] = &SMPA1_CORNER_vddcx_ao, - [MSM8994_VDDCX_VFC] = &SMPA1_vddcx_vfc, - [MSM8994_VDDMX] = &SMPA2_CORNER_vddmx, - [MSM8994_VDDMX_AO] = &SMPA2_CORNER_vddmx_ao, + [MSM8994_VDDCX] = &SMPA1_CORNER_cx, + [MSM8994_VDDCX_AO] = &SMPA1_CORNER_cx_ao, + [MSM8994_VDDCX_VFC] = &SMPA1_cx_vfc, + [MSM8994_VDDMX] = &SMPA2_CORNER_mx, + [MSM8994_VDDMX_AO] = &SMPA2_CORNER_mx_ao, /* Attention! *Some* 8994 boards with pm8004 may use SMPC here! */ - [MSM8994_VDDGFX] = &SMPB2_vddgfx_corner, - [MSM8994_VDDGFX_VFC] = &SMPB2_vddgfx_vfc, + [MSM8994_VDDGFX] = &SMPB2_gfx_corner, + [MSM8994_VDDGFX_VFC] = &SMPB2_gfx_vfc, }; static const struct rpmpd_desc msm8994_desc = { @@ -282,13 +282,13 @@ static const struct rpmpd_desc msm8994_desc = { /* msm8996 RPM Power domains */ static struct rpmpd *msm8996_rpmpds[] = { - [MSM8996_VDDCX] = &SMPA1_CORNER_vddcx, - [MSM8996_VDDCX_AO] = &SMPA1_CORNER_vddcx_ao, - [MSM8996_VDDCX_VFC] = &SMPA1_vddcx_vfc, - [MSM8996_VDDMX] = &SMPA2_CORNER_vddmx, - [MSM8996_VDDMX_AO] = &SMPA2_CORNER_vddmx_ao, - [MSM8996_VDDSSCX] = &LDOA26_vddsscx_corner, - [MSM8996_VDDSSCX_VFC] = &LDOA26_vddsscx_vfc, + [MSM8996_VDDCX] = &SMPA1_CORNER_cx, + [MSM8996_VDDCX_AO] = &SMPA1_CORNER_cx_ao, + [MSM8996_VDDCX_VFC] = &SMPA1_cx_vfc, + [MSM8996_VDDMX] = &SMPA2_CORNER_mx, + [MSM8996_VDDMX_AO] = &SMPA2_CORNER_mx_ao, + [MSM8996_VDDSSCX] = &LDOA26_sscx_corner, + [MSM8996_VDDSSCX_VFC] = &LDOA26_sscx_vfc, }; static const struct rpmpd_desc msm8996_desc = { @@ -299,16 +299,16 @@ static const struct rpmpd_desc msm8996_desc = { /* msm8998 RPM Power domains */ static struct rpmpd *msm8998_rpmpds[] = { - [MSM8998_VDDCX] = &RWCX0_LEVEL_vddcx, - [MSM8998_VDDCX_AO] = &RWCX0_LEVEL_vddcx_ao, - [MSM8998_VDDCX_VFL] = &RWCX0_vddcx_vfl, - [MSM8998_VDDMX] = &RWMX0_LEVEL_vddmx, - [MSM8998_VDDMX_AO] = &RWMX0_LEVEL_vddmx_ao, - [MSM8998_VDDMX_VFL] = &RWMX0_vddmx_vfl, - [MSM8998_SSCCX] = &RWSC0_vdd_ssccx_lvl, - [MSM8998_SSCCX_VFL] = &RWSC0_vdd_ssccx_vfl, - [MSM8998_SSCMX] = &RWSM0_vdd_sscmx_lvl, - [MSM8998_SSCMX_VFL] = &RWSM0_vdd_sscmx_vfl, + [MSM8998_VDDCX] = &RWCX0_LEVEL_cx, + [MSM8998_VDDCX_AO] = &RWCX0_LEVEL_cx_ao, + [MSM8998_VDDCX_VFL] = &RWCX0_cx_vfl, + [MSM8998_VDDMX] = &RWMX0_LEVEL_mx, + [MSM8998_VDDMX_AO] = &RWMX0_LEVEL_mx_ao, + [MSM8998_VDDMX_VFL] = &RWMX0_mx_vfl, + [MSM8998_SSCCX] = &RWSC0_ssccx_lvl, + [MSM8998_SSCCX_VFL] = &RWSC0_ssccx_vfl, + [MSM8998_SSCMX] = &RWSM0_sscmx_lvl, + [MSM8998_SSCMX_VFL] = &RWSM0_sscmx_vfl, }; static const struct rpmpd_desc msm8998_desc = { @@ -319,13 +319,13 @@ static const struct rpmpd_desc msm8998_desc = { /* qcs404 RPM Power domains */ static struct rpmpd *qcs404_rpmpds[] = { - [QCS404_VDDMX] = &RWMX0_LEVEL_vddmx, - [QCS404_VDDMX_AO] = &RWMX0_LEVEL_vddmx_ao, - [QCS404_VDDMX_VFL] = &RWMX0_vddmx_vfl, - [QCS404_LPICX] = &RWLC0_vdd_lpi_cx_lvl, - [QCS404_LPICX_VFL] = &RWLC0_vdd_lpicx_vfl, - [QCS404_LPIMX] = &RWLM0_vdd_lpi_mx_lvl, - [QCS404_LPIMX_VFL] = &RWLM0_vdd_lpimx_vfl, + [QCS404_VDDMX] = &RWMX0_LEVEL_mx, + [QCS404_VDDMX_AO] = &RWMX0_LEVEL_mx_ao, + [QCS404_VDDMX_VFL] = &RWMX0_mx_vfl, + [QCS404_LPICX] = &RWLC0_lpi_cx_lvl, + [QCS404_LPICX_VFL] = &RWLC0_lpicx_vfl, + [QCS404_LPIMX] = &RWLM0_lpi_mx_lvl, + [QCS404_LPIMX_VFL] = &RWLM0_lpimx_vfl, }; static const struct rpmpd_desc qcs404_desc = { @@ -336,16 +336,16 @@ static const struct rpmpd_desc qcs404_desc = { /* sdm660 RPM Power domains */ static struct rpmpd *sdm660_rpmpds[] = { - [SDM660_VDDCX] = &RWCX0_LEVEL_vddcx, - [SDM660_VDDCX_AO] = &RWCX0_LEVEL_vddcx_ao, - [SDM660_VDDCX_VFL] = &RWCX0_vddcx_vfl, - [SDM660_VDDMX] = &RWMX0_LEVEL_vddmx, - [SDM660_VDDMX_AO] = &RWMX0_LEVEL_vddmx_ao, - [SDM660_VDDMX_VFL] = &RWMX0_vddmx_vfl, - [SDM660_SSCCX] = &RWLC0_vdd_ssccx_lvl, - [SDM660_SSCCX_VFL] = &RWLC0_vdd_ssccx_vfl, - [SDM660_SSCMX] = &RWLM0_vdd_sscmx_lvl, - [SDM660_SSCMX_VFL] = &RWLM0_vdd_sscmx_vfl, + [SDM660_VDDCX] = &RWCX0_LEVEL_cx, + [SDM660_VDDCX_AO] = &RWCX0_LEVEL_cx_ao, + [SDM660_VDDCX_VFL] = &RWCX0_cx_vfl, + [SDM660_VDDMX] = &RWMX0_LEVEL_mx, + [SDM660_VDDMX_AO] = &RWMX0_LEVEL_mx_ao, + [SDM660_VDDMX_VFL] = &RWMX0_mx_vfl, + [SDM660_SSCCX] = &RWLC0_ssccx_lvl, + [SDM660_SSCCX_VFL] = &RWLC0_ssccx_vfl, + [SDM660_SSCMX] = &RWLM0_sscmx_lvl, + [SDM660_SSCMX_VFL] = &RWLM0_sscmx_vfl, }; static const struct rpmpd_desc sdm660_desc = { @@ -356,14 +356,14 @@ static const struct rpmpd_desc sdm660_desc = { /* sm4250/6115 RPM Power domains */ static struct rpmpd *sm6115_rpmpds[] = { - [SM6115_VDDCX] = &RWCX0_LEVEL_vddcx, - [SM6115_VDDCX_AO] = &RWCX0_LEVEL_vddcx_ao, - [SM6115_VDDCX_VFL] = &RWCX0_vddcx_vfl, - [SM6115_VDDMX] = &RWMX0_LEVEL_vddmx, - [SM6115_VDDMX_AO] = &RWMX0_LEVEL_vddmx_ao, - [SM6115_VDDMX_VFL] = &RWMX0_vddmx_vfl, - [SM6115_VDD_LPI_CX] = &RWLC0_vdd_lpi_cx_lvl, - [SM6115_VDD_LPI_MX] = &RWLM0_vdd_lpi_mx_lvl, + [SM6115_VDDCX] = &RWCX0_LEVEL_cx, + [SM6115_VDDCX_AO] = &RWCX0_LEVEL_cx_ao, + [SM6115_VDDCX_VFL] = &RWCX0_cx_vfl, + [SM6115_VDDMX] = &RWMX0_LEVEL_mx, + [SM6115_VDDMX_AO] = &RWMX0_LEVEL_mx_ao, + [SM6115_VDDMX_VFL] = &RWMX0_mx_vfl, + [SM6115_VDD_LPI_CX] = &RWLC0_lpi_cx_lvl, + [SM6115_VDD_LPI_MX] = &RWLM0_lpi_mx_lvl, }; static const struct rpmpd_desc sm6115_desc = { @@ -374,12 +374,12 @@ static const struct rpmpd_desc sm6115_desc = { /* sm6125 RPM Power domains */ static struct rpmpd *sm6125_rpmpds[] = { - [SM6125_VDDCX] = &RWCX0_LEVEL_vddcx, - [SM6125_VDDCX_AO] = &RWCX0_LEVEL_vddcx_ao, - [SM6125_VDDCX_VFL] = &RWCX0_vddcx_vfl, - [SM6125_VDDMX] = &RWMX0_LEVEL_vddmx, - [SM6125_VDDMX_AO] = &RWMX0_LEVEL_vddmx_ao, - [SM6125_VDDMX_VFL] = &RWMX0_vddmx_vfl, + [SM6125_VDDCX] = &RWCX0_LEVEL_cx, + [SM6125_VDDCX_AO] = &RWCX0_LEVEL_cx_ao, + [SM6125_VDDCX_VFL] = &RWCX0_cx_vfl, + [SM6125_VDDMX] = &RWMX0_LEVEL_mx, + [SM6125_VDDMX_AO] = &RWMX0_LEVEL_mx_ao, + [SM6125_VDDMX_VFL] = &RWMX0_mx_vfl, }; static const struct rpmpd_desc sm6125_desc = { @@ -389,16 +389,16 @@ static const struct rpmpd_desc sm6125_desc = { }; static struct rpmpd *sm6375_rpmpds[] = { - [SM6375_VDDCX] = &RWCX0_LEVEL_vddcx, - [SM6375_VDDCX_AO] = &RWCX0_LEVEL_vddcx_ao, - [SM6375_VDDCX_VFL] = &RWCX0_vddcx_vfl, - [SM6375_VDDMX] = &RWMX0_LEVEL_vddmx, - [SM6375_VDDMX_AO] = &RWMX0_LEVEL_vddmx_ao, - [SM6375_VDDMX_VFL] = &RWMX0_vddmx_vfl, - [SM6375_VDDGX] = &RWGX0_LEVEL_vddgx, - [SM6375_VDDGX_AO] = &RWGX0_LEVEL_vddgx_ao, - [SM6375_VDD_LPI_CX] = &RWLC0_vdd_lpi_cx_lvl, - [SM6375_VDD_LPI_MX] = &RWLM0_vdd_lpi_mx_lvl, + [SM6375_VDDCX] = &RWCX0_LEVEL_cx, + [SM6375_VDDCX_AO] = &RWCX0_LEVEL_cx_ao, + [SM6375_VDDCX_VFL] = &RWCX0_cx_vfl, + [SM6375_VDDMX] = &RWMX0_LEVEL_mx, + [SM6375_VDDMX_AO] = &RWMX0_LEVEL_mx_ao, + [SM6375_VDDMX_VFL] = &RWMX0_mx_vfl, + [SM6375_VDDGX] = &RWGX0_LEVEL_gx, + [SM6375_VDDGX_AO] = &RWGX0_LEVEL_gx_ao, + [SM6375_VDD_LPI_CX] = &RWLC0_lpi_cx_lvl, + [SM6375_VDD_LPI_MX] = &RWLM0_lpi_mx_lvl, }; static const struct rpmpd_desc sm6375_desc = { @@ -408,14 +408,14 @@ static const struct rpmpd_desc sm6375_desc = { }; static struct rpmpd *qcm2290_rpmpds[] = { - [QCM2290_VDDCX] = &RWCX0_LEVEL_vddcx, - [QCM2290_VDDCX_AO] = &RWCX0_LEVEL_vddcx_ao, - [QCM2290_VDDCX_VFL] = &RWCX0_vddcx_vfl, - [QCM2290_VDDMX] = &RWMX0_LEVEL_vddmx, - [QCM2290_VDDMX_AO] = &RWMX0_LEVEL_vddmx_ao, - [QCM2290_VDDMX_VFL] = &RWMX0_vddmx_vfl, - [QCM2290_VDD_LPI_CX] = &RWLC0_vdd_lpi_cx_lvl, - [QCM2290_VDD_LPI_MX] = &RWLM0_vdd_lpi_mx_lvl, + [QCM2290_VDDCX] = &RWCX0_LEVEL_cx, + [QCM2290_VDDCX_AO] = &RWCX0_LEVEL_cx_ao, + [QCM2290_VDDCX_VFL] = &RWCX0_cx_vfl, + [QCM2290_VDDMX] = &RWMX0_LEVEL_mx, + [QCM2290_VDDMX_AO] = &RWMX0_LEVEL_mx_ao, + [QCM2290_VDDMX_VFL] = &RWMX0_mx_vfl, + [QCM2290_VDD_LPI_CX] = &RWLC0_lpi_cx_lvl, + [QCM2290_VDD_LPI_MX] = &RWLM0_lpi_mx_lvl, }; static const struct rpmpd_desc qcm2290_desc = { From patchwork Mon Mar 13 20:00:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 69085 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1383035wrd; Mon, 13 Mar 2023 13:09:29 -0700 (PDT) X-Google-Smtp-Source: AK7set89uP1wBMLluofUQQFlnUgC1m/PzGxroGJ4qEB1SmR05cTlAL499h9nRuVeXA6D01MhI5ZE X-Received: by 2002:a05:6a21:6da3:b0:d4:6a16:18e with SMTP id wl35-20020a056a216da300b000d46a16018emr3987505pzb.23.1678738169537; Mon, 13 Mar 2023 13:09:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678738169; cv=none; d=google.com; s=arc-20160816; b=k17u24HY1T82GAgZVK4aGo7UKvm3rdEctSzOw48mgYFQTiXluxis71K24SYz6SENRz Fe/JNdzQqV5i1zgM0YwFydQWEuy2vGETV2DPziniRoHZMPsgZMLF5qKihpCIl3XnP4/0 rziR6kFpcsHdhNJbUtiGFtDiO2H/J+liV6GI2l2JdiNMPFLFuenAj+0U6ETuSn+oZNOV ZLE/y7V1ZkNcS9gGDXSZckkfySyED1UiuQsbWD+w04cOQF529BX7IEZjkP6Fp/RatwsV mHaBv5VR7MqZaIpGIEp3Y4R2udEaKnLYdwojU8cDdVtgjnQS9VEpJ5JxZRK8sVHYRHZo EIPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=LG9NJ+7VzcSXixzcJuGz/otV9zl3aRjMN7yJDrw95Iw=; b=r0024KY9GiXTdKWOn0dYhAUwyc/1WCUNtOKbzdwxwkOPGPrChmt61aKndkEmOhlho6 Ilcani23GVfYwIdctnlTUrCdpBwU2TD316SyTOOoP0t69YEeM6+NtEph6ynkRa2TxP4J D8DRGARkG8vEo04JfLDMMgv9xgsXAuH/Nxl7YAAtKePqcDsaBXuQmj8RivVI9jDjfsCm QVaFyzSLAfhEDyoG3n8Ap1qAUgOYwTIcgFy2FDgSNl1p5wjxIHaLEthZVqIU8Lwpa5Sf N0dBXJ4P0kUM1W8oq8zwZH4sbB7dfXQG/z74/MunrAJmU0xYpc02pmQpY3rAcIna07PL SzRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="b/z9VX0t"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h126-20020a625384000000b005a8ac97d6cdsi231852pfb.344.2023.03.13.13.09.17; Mon, 13 Mar 2023 13:09:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="b/z9VX0t"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230131AbjCMUAc (ORCPT + 99 others); Mon, 13 Mar 2023 16:00:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229988AbjCMUAQ (ORCPT ); Mon, 13 Mar 2023 16:00:16 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FCC77F00A for ; Mon, 13 Mar 2023 13:00:13 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id t11so17222576lfr.1 for ; Mon, 13 Mar 2023 13:00:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678737611; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=LG9NJ+7VzcSXixzcJuGz/otV9zl3aRjMN7yJDrw95Iw=; b=b/z9VX0t/E5CFoDxX4tZqENYL46VomKqx5y8vHR1zjryCVsXbRE5Yg2rELkJ+U03sj IT4YFr4ZN0p+U+ufJeMSIJeFAkLp5mVAqOCWqofSZjoWONUWv55i0LwaLnLvYAEST1a8 kBHjIHbAurfUKInww8klUJHgfc6+NeovhhbheuyqPgE0ww4OzMFpWcsHQu/X9Eiq+Xts v5/Gd485oIwFWXetqJHbiwDEA36uBWyrDqX2lK73KGVFtddLqTIVnBTkzGpELWuZyRpu nhBaVRK/UulrYqumG5+fkx7hk70aYhwBXYHa+iyBxws1dXgmzWk+Z76Wb+7WO/l8dfic BQsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678737611; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LG9NJ+7VzcSXixzcJuGz/otV9zl3aRjMN7yJDrw95Iw=; b=svIpl0rGKA2gTz7TMissFIsv25u28Kk7PdMk3K0JfYt4ZKjtyYuOlb+M5Je1g2Osyk BLQNPkxjsXElmj+i+MiU1PNkTwbAbTFe54/bgBwX6XMSryEc8oJbTC+nqExSuT5K6iZe 8c1vyrJyx88Xs7kJYydcqnVyLEFl+Laqc9CSyehfeeiRdjDNRq8r7icBJfXTgjfAoq/Z qXiMRb9mlkUwQHJVNqv1p4638GifpYjFA4dgV7h9ZgwRrooktb+8574aXRO8mzTtqQAR euBC/WozoVB4KnDdMxua6pYNL0S6IRZRfadtCgdk9D8mpEqlhT2fdt0glpppGaqpfu+U eVFA== X-Gm-Message-State: AO0yUKU9TgPXxMTOD6VjxLQariL8YuQAtCVzNVOk4Sr4joNjtWzADKgh bbT08HN6eQcfvzqNns3iwEkXDA== X-Received: by 2002:a19:a416:0:b0:4e1:8309:1db5 with SMTP id q22-20020a19a416000000b004e183091db5mr10137419lfc.2.1678737611255; Mon, 13 Mar 2023 13:00:11 -0700 (PDT) Received: from [192.168.1.101] (abyj16.neoplus.adsl.tpnet.pl. [83.9.29.16]) by smtp.gmail.com with ESMTPSA id w3-20020ac254a3000000b004cc800b1f2csm75431lfk.238.2023.03.13.13.00.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 13:00:10 -0700 (PDT) From: Konrad Dybcio Date: Mon, 13 Mar 2023 21:00:03 +0100 Subject: [PATCH v3 05/10] soc: qcom: rpmpd: Expand struct definition macros MIME-Version: 1.0 Message-Id: <20230313-topic-rpmpd-v3-5-06a4f448ff90@linaro.org> References: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> In-Reply-To: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678737603; l=13996; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=LqNYONkOs5cm7veJYbA2qMFrHJFjySasIXFxZdAbdrY=; b=gSRaUOsCkVSMgeAj4lBzicnESuk2deZzeseUqUR+ePeKEz+VEjFLps50BWfTuM9iiovTqPC9dNZs 3BGUFV5JDasp53KcaQyhntS6ENzMkO3rkfHXR2gibvrh6sfJSpXN X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_HTTP,RCVD_IN_SORBS_SOCKS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760284555072633742?= X-GMAIL-MSGID: =?utf-8?q?1760284555072633742?= Expand the struct definition macros to make things easier to see and maintain. Now that the macros are unnecessary, remove them. Signed-off-by: Konrad Dybcio --- drivers/soc/qcom/rpmpd.c | 539 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 441 insertions(+), 98 deletions(-) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 8f145663af9a..df4e0d8a2aa9 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -40,56 +40,6 @@ #define MAX_CORNER_RPMPD_STATE 6 -#define DEFINE_RPMPD_PAIR(_name, _active, r_type, r_key, r_id) \ - static struct rpmpd r_type##r_id##_##r_key##_##_active; \ - static struct rpmpd r_type##r_id##_##r_key##_##_name = { \ - .pd = { .name = #_name, }, \ - .peer = &r_type##r_id##_##r_key##_##_active, \ - .res_type = RPMPD_##r_type, \ - .res_id = r_id, \ - .key = KEY_##r_key, \ - }; \ - static struct rpmpd r_type##r_id##_##r_key##_##_active = { \ - .pd = { .name = #_active, }, \ - .peer = &r_type##r_id##_##r_key##_##_name, \ - .active_only = true, \ - .res_type = RPMPD_##r_type, \ - .res_id = r_id, \ - .key = KEY_##r_key, \ - } - -#define DEFINE_RPMPD_CORNER(_name, r_type, r_id) \ - static struct rpmpd r_type##r_id##_##_name##_corner = { \ - .pd = { .name = #_name, }, \ - .res_type = RPMPD_##r_type, \ - .res_id = r_id, \ - .key = KEY_CORNER, \ - } - -#define DEFINE_RPMPD_LEVEL(_name, r_type, r_id) \ - static struct rpmpd r_type##r_id##_##_name##_lvl = { \ - .pd = { .name = #_name, }, \ - .res_type = RPMPD_##r_type, \ - .res_id = r_id, \ - .key = KEY_LEVEL, \ - } - -#define DEFINE_RPMPD_VFC(_name, r_type, r_id) \ - static struct rpmpd r_type##r_id##_##_name = { \ - .pd = { .name = #_name, }, \ - .res_type = RPMPD_##r_type, \ - .res_id = r_id, \ - .key = KEY_FLOOR_CORNER, \ - } - -#define DEFINE_RPMPD_VFL(_name, r_type, r_id) \ - static struct rpmpd r_type##r_id##_##_name = { \ - .pd = { .name = #_name, }, \ - .res_type = RPMPD_##r_type, \ - .res_id = r_id, \ - .key = KEY_FLOOR_LEVEL, \ - } - struct rpmpd_req { __le32 key; __le32 nbytes; @@ -117,54 +67,447 @@ struct rpmpd_desc { static DEFINE_MUTEX(rpmpd_lock); -DEFINE_RPMPD_PAIR(cx, cx_ao, RWCX, LEVEL, 0); -DEFINE_RPMPD_PAIR(cx, cx_ao, SMPA, CORNER, 1); -DEFINE_RPMPD_PAIR(cx, cx_ao, SMPA, CORNER, 2); -DEFINE_RPMPD_PAIR(cx, cx_ao, SMPA, LEVEL, 2); -DEFINE_RPMPD_PAIR(cx, cx_ao, SMPA, LEVEL, 3); -DEFINE_RPMPD_VFL(cx_vfl, RWCX, 0); -DEFINE_RPMPD_VFL(cx_vfl, RWSC, 2); -DEFINE_RPMPD_VFC(cx_vfc, SMPA, 1); -DEFINE_RPMPD_VFC(cx_vfc, SMPA, 2); -DEFINE_RPMPD_VFL(cx_vfl, SMPA, 2); -DEFINE_RPMPD_VFL(cx_vfl, SMPA, 3); - -DEFINE_RPMPD_CORNER(gfx, SMPB, 2); -DEFINE_RPMPD_VFC(gfx_vfc, SMPB, 2); - -DEFINE_RPMPD_PAIR(gx, gx_ao, RWGX, LEVEL, 0); - -DEFINE_RPMPD_PAIR(mx, mx_ao, LDOA, CORNER, 3); -DEFINE_RPMPD_PAIR(mx, mx_ao, LDOA, LEVEL, 12); -DEFINE_RPMPD_PAIR(mx, mx_ao, SMPA, CORNER, 2); -DEFINE_RPMPD_PAIR(mx, mx_ao, RWMX, LEVEL, 0); -DEFINE_RPMPD_PAIR(mx, mx_ao, SMPA, LEVEL, 6); -DEFINE_RPMPD_PAIR(mx, mx_ao, SMPA, LEVEL, 7); -DEFINE_RPMPD_VFL(mx_vfl, LDOA, 12); -DEFINE_RPMPD_VFL(mx_vfl, RWMX, 0); -DEFINE_RPMPD_VFL(mx_vfl, RWSM, 6); - -DEFINE_RPMPD_PAIR(md, md_ao, SMPA, CORNER, 1); -DEFINE_RPMPD_PAIR(md, md_ao, SMPA, LEVEL, 1); -DEFINE_RPMPD_VFC(md_vfc, SMPA, 1); - -DEFINE_RPMPD_LEVEL(lpi_cx, RWLC, 0); -DEFINE_RPMPD_VFL(lpicx_vfl, RWLC, 0); - -DEFINE_RPMPD_LEVEL(lpi_mx, RWLM, 0); -DEFINE_RPMPD_VFL(lpimx_vfl, RWLM, 0); - -DEFINE_RPMPD_CORNER(sscx, LDOA, 26); -DEFINE_RPMPD_LEVEL(ssccx, RWLC, 0); -DEFINE_RPMPD_LEVEL(ssccx, RWSC, 0); -DEFINE_RPMPD_VFC(sscx_vfc, LDOA, 26); -DEFINE_RPMPD_VFL(ssccx_vfl, RWLC, 0); -DEFINE_RPMPD_VFL(ssccx_vfl, RWSC, 0); - -DEFINE_RPMPD_LEVEL(sscmx, RWLM, 0); -DEFINE_RPMPD_LEVEL(sscmx, RWSM, 0); -DEFINE_RPMPD_VFL(sscmx_vfl, RWLM, 0); -DEFINE_RPMPD_VFL(sscmx_vfl, RWSM, 0); +/* CX */ +static struct rpmpd RWCX0_LEVEL_cx_ao; +static struct rpmpd RWCX0_LEVEL_cx = { + .pd = { .name = "cx", }, + .peer = &RWCX0_LEVEL_cx_ao, + .res_type = RPMPD_RWCX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd RWCX0_LEVEL_cx_ao = { + .pd = { .name = "cx_ao", }, + .peer = &RWCX0_LEVEL_cx, + .active_only = true, + .res_type = RPMPD_RWCX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd SMPA1_CORNER_cx_ao; +static struct rpmpd SMPA1_CORNER_cx = { + .pd = { .name = "cx", }, + .peer = &SMPA1_CORNER_cx_ao, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_CORNER, +}; + +static struct rpmpd SMPA1_CORNER_cx_ao = { + .pd = { .name = "cx_ao", }, + .peer = &SMPA1_CORNER_cx, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_CORNER, +}; + +static struct rpmpd SMPA2_CORNER_cx_ao; +static struct rpmpd SMPA2_CORNER_cx = { + .pd = { .name = "cx", }, + .peer = &SMPA2_CORNER_cx_ao, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_CORNER, +}; + +static struct rpmpd SMPA2_CORNER_cx_ao = { + .pd = { .name = "cx_ao", }, + .peer = &SMPA2_CORNER_cx, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_CORNER, +}; + +static struct rpmpd SMPA2_LEVEL_cx_ao; +static struct rpmpd SMPA2_LEVEL_cx = { + .pd = { .name = "cx", }, + .peer = &SMPA2_LEVEL_cx_ao, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_LEVEL, +}; + +static struct rpmpd SMPA2_LEVEL_cx_ao = { + .pd = { .name = "cx_ao", }, + .peer = &SMPA2_LEVEL_cx, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_LEVEL, +}; + +static struct rpmpd SMPA3_LEVEL_cx_ao; +static struct rpmpd SMPA3_LEVEL_cx = { + .pd = { .name = "cx", }, + .peer = &SMPA3_LEVEL_cx_ao, + .res_type = RPMPD_SMPA, + .res_id = 3, + .key = KEY_LEVEL, +}; + +static struct rpmpd SMPA3_LEVEL_cx_ao = { + .pd = { .name = "cx_ao", }, + .peer = &SMPA3_LEVEL_cx, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 3, + .key = KEY_LEVEL, +}; + +static struct rpmpd RWCX0_cx_vfl = { + .pd = { .name = "cx_vfl", }, + .res_type = RPMPD_RWCX, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; + +static struct rpmpd RWSC2_cx_vfl = { + .pd = { .name = "cx_vfl", }, + .res_type = RPMPD_RWSC, + .res_id = 2, + .key = KEY_FLOOR_LEVEL, +}; + +static struct rpmpd SMPA1_cx_vfc = { + .pd = { .name = "cx_vfc", }, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_FLOOR_CORNER, +}; + +static struct rpmpd SMPA2_cx_vfc = { + .pd = { .name = "cx_vfc", }, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_FLOOR_CORNER, +}; + +static struct rpmpd SMPA2_cx_vfl = { + .pd = { .name = "cx_vfl", }, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_FLOOR_LEVEL, +}; + +static struct rpmpd SMPA3_cx_vfl = { + .pd = { .name = "cx_vfl", }, + .res_type = RPMPD_SMPA, + .res_id = 3, + .key = KEY_FLOOR_LEVEL, +}; + +/* G(F)X */ +static struct rpmpd SMPB2_gfx_corner = { + .pd = { .name = "gfx", }, + .res_type = RPMPD_SMPB, + .res_id = 2, + .key = KEY_CORNER, +}; + +static struct rpmpd SMPB2_gfx_vfc = { + .pd = { .name = "gfx_vfc", }, + .res_type = RPMPD_SMPB, + .res_id = 2, + .key = KEY_FLOOR_CORNER, +}; + +static struct rpmpd RWGX0_LEVEL_gx_ao; +static struct rpmpd RWGX0_LEVEL_gx = { + .pd = { .name = "gx", }, + .peer = &RWGX0_LEVEL_gx_ao, + .res_type = RPMPD_RWGX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd RWGX0_LEVEL_gx_ao = { + .pd = { .name = "gx_ao", }, + .peer = &RWGX0_LEVEL_gx, + .active_only = true, + .res_type = RPMPD_RWGX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +/* MX */ +static struct rpmpd LDOA3_CORNER_mx_ao; +static struct rpmpd LDOA3_CORNER_mx = { + .pd = { .name = "mx", }, + .peer = &LDOA3_CORNER_mx_ao, + .res_type = RPMPD_LDOA, + .res_id = 3, + .key = KEY_CORNER, +}; + +static struct rpmpd LDOA3_CORNER_mx_ao = { + .pd = { .name = "mx_ao", }, + .peer = &LDOA3_CORNER_mx, + .active_only = true, + .res_type = RPMPD_LDOA, + .res_id = 3, + .key = KEY_CORNER, +}; + +static struct rpmpd LDOA12_LEVEL_mx_ao; +static struct rpmpd LDOA12_LEVEL_mx = { + .pd = { .name = "mx", }, + .peer = &LDOA12_LEVEL_mx_ao, + .res_type = RPMPD_LDOA, + .res_id = 12, + .key = KEY_LEVEL, +}; + +static struct rpmpd LDOA12_LEVEL_mx_ao = { + .pd = { .name = "mx_ao", }, + .peer = &LDOA12_LEVEL_mx, + .active_only = true, + .res_type = RPMPD_LDOA, + .res_id = 12, + .key = KEY_LEVEL, +}; + +static struct rpmpd SMPA2_CORNER_mx_ao; +static struct rpmpd SMPA2_CORNER_mx = { + .pd = { .name = "mx", }, + .peer = &SMPA2_CORNER_mx_ao, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_CORNER, +}; + +static struct rpmpd SMPA2_CORNER_mx_ao = { + .pd = { .name = "mx_ao", }, + .peer = &SMPA2_CORNER_mx, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 2, + .key = KEY_CORNER, +}; + +static struct rpmpd RWMX0_LEVEL_mx_ao; +static struct rpmpd RWMX0_LEVEL_mx = { + .pd = { .name = "mx", }, + .peer = &RWMX0_LEVEL_mx_ao, + .res_type = RPMPD_RWMX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd RWMX0_LEVEL_mx_ao = { + .pd = { .name = "mx_ao", }, + .peer = &RWMX0_LEVEL_mx, + .active_only = true, + .res_type = RPMPD_RWMX, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd SMPA6_LEVEL_mx_ao; +static struct rpmpd SMPA6_LEVEL_mx = { + .pd = { .name = "mx", }, + .peer = &SMPA6_LEVEL_mx_ao, + .res_type = RPMPD_SMPA, + .res_id = 6, + .key = KEY_LEVEL, +}; + +static struct rpmpd SMPA6_LEVEL_mx_ao = { + .pd = { .name = "mx_ao", }, + .peer = &SMPA6_LEVEL_mx, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 6, + .key = KEY_LEVEL, +}; + +static struct rpmpd SMPA7_LEVEL_mx_ao; +static struct rpmpd SMPA7_LEVEL_mx = { + .pd = { .name = "mx", }, + .peer = &SMPA7_LEVEL_mx_ao, + .res_type = RPMPD_SMPA, + .res_id = 7, + .key = KEY_LEVEL, +}; + +static struct rpmpd SMPA7_LEVEL_mx_ao = { + .pd = { .name = "mx_ao", }, + .peer = &SMPA7_LEVEL_mx, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 7, + .key = KEY_LEVEL, +}; + +static struct rpmpd LDOA12_mx_vfl = { + .pd = { .name = "mx_vfl", }, + .res_type = RPMPD_LDOA, + .res_id = 12, + .key = KEY_FLOOR_LEVEL, +}; + +static struct rpmpd RWMX0_mx_vfl = { + .pd = { .name = "mx_vfl", }, + .res_type = RPMPD_RWMX, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; + +static struct rpmpd RWSM6_mx_vfl = { + .pd = { .name = "mx_vfl", }, + .res_type = RPMPD_RWSM, + .res_id = 6, + .key = KEY_FLOOR_LEVEL, +}; + +/* MD */ +static struct rpmpd SMPA1_CORNER_md_ao; +static struct rpmpd SMPA1_CORNER_md = { + .pd = { .name = "md", }, + .peer = &SMPA1_CORNER_md_ao, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_CORNER, +}; + +static struct rpmpd SMPA1_CORNER_md_ao = { + .pd = { .name = "md_ao", }, + .peer = &SMPA1_CORNER_md, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_CORNER, +}; + +static struct rpmpd SMPA1_LEVEL_md_ao; +static struct rpmpd SMPA1_LEVEL_md = { + .pd = { .name = "md", }, + .peer = &SMPA1_LEVEL_md_ao, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_LEVEL, +}; + +static struct rpmpd SMPA1_LEVEL_md_ao = { + .pd = { .name = "md_ao", }, + .peer = &SMPA1_LEVEL_md, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_LEVEL, +}; + +static struct rpmpd SMPA1_md_vfc = { + .pd = { .name = "md_vfc", }, + .res_type = RPMPD_SMPA, + .res_id = 1, + .key = KEY_FLOOR_CORNER, +}; + +/* LPI_CX */ +static struct rpmpd RWLC0_lpi_cx_lvl = { + .pd = { .name = "lpi_cx", }, + .res_type = RPMPD_RWLC, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd RWLC0_lpicx_vfl = { + .pd = { .name = "lpicx_vfl", }, + .res_type = RPMPD_RWLC, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; + +/* LPI_MX */ +static struct rpmpd RWLM0_lpi_mx_lvl = { + .pd = { .name = "lpi_mx", }, + .res_type = RPMPD_RWLM, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd RWLM0_lpimx_vfl = { + .pd = { .name = "lpimx_vfl", }, + .res_type = RPMPD_RWLM, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; + +/* SSC_CX */ +static struct rpmpd LDOA26_sscx_corner = { + .pd = { .name = "sscx", }, + .res_type = RPMPD_LDOA, + .res_id = 26, + .key = KEY_CORNER, +}; + +static struct rpmpd RWLC0_ssccx_lvl = { + .pd = { .name = "ssccx", }, + .res_type = RPMPD_RWLC, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd RWSC0_ssccx_lvl = { + .pd = { .name = "ssccx", }, + .res_type = RPMPD_RWSC, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd LDOA26_sscx_vfc = { + .pd = { .name = "sscx_vfc", }, + .res_type = RPMPD_LDOA, + .res_id = 26, + .key = KEY_FLOOR_CORNER, +}; + +static struct rpmpd RWLC0_ssccx_vfl = { + .pd = { .name = "ssccx_vfl", }, + .res_type = RPMPD_RWLC, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; + +static struct rpmpd RWSC0_ssccx_vfl = { + .pd = { .name = "ssccx_vfl", }, + .res_type = RPMPD_RWSC, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; + +/* SSC_MX */ +static struct rpmpd RWLM0_sscmx_lvl = { + .pd = { .name = "sscmx", }, + .res_type = RPMPD_RWLM, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd RWSM0_sscmx_lvl = { + .pd = { .name = "sscmx", }, + .res_type = RPMPD_RWSM, + .res_id = 0, + .key = KEY_LEVEL, +}; + +static struct rpmpd RWLM0_sscmx_vfl = { + .pd = { .name = "sscmx_vfl", }, + .res_type = RPMPD_RWLM, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; + +static struct rpmpd RWSM0_sscmx_vfl = { + .pd = { .name = "sscmx_vfl", }, + .res_type = RPMPD_RWSM, + .res_id = 0, + .key = KEY_FLOOR_LEVEL, +}; /* mdm9607 RPM Power Domains */ static struct rpmpd *mdm9607_rpmpds[] = { From patchwork Mon Mar 13 20:00:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 69083 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1380867wrd; Mon, 13 Mar 2023 13:04:47 -0700 (PDT) X-Google-Smtp-Source: AK7set+AfBCNBEMhwrkGX7yUHQwxemQfK9GmBoWJn5iANvb9x9X6uZM6eR3BH88fY80vEI4Zc+Bt X-Received: by 2002:a05:6a20:698c:b0:cc:c5db:ea4a with SMTP id t12-20020a056a20698c00b000ccc5dbea4amr54975916pzk.33.1678737887026; Mon, 13 Mar 2023 13:04:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678737887; cv=none; d=google.com; s=arc-20160816; b=wELPYQ/EcM0LPFII/wpH5JHAxuQwIoFoDpgUH5Mab3yespE9+OZFSBMNcYTm/iU/KZ fMd2Jlwipyuwpr3dBjmlgkUsN+2k52A/qAd0FOutex/p2W0gDTT9VF1x4V5KWlEMKPxc 2ZXgdkiiufqUqFx3xbJIQdduCCCeOw9Aj2oiSjpOy8q8AWgPvGa1yP+15I+3aTVlIGmz eS9T13VrWVsrNn7+g2GueQgG+cGDIHZtCyqTWhdC3h+DsenTV/DcLi5Xu8uUoMMoHynv DBfsmK4Fok6z1PiFqPL34nJEIyBN2Nn1W33fxpj4A4BEEERjhuX8/bIXE/47V/fKFvyf MEpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=wVLgoHd5JRg28f+yh6JSFUHtXvcJzOao7oRBs3X+6SI=; b=vyIYP5PWHQ/xRkYthdJZ1OSLF909XyG3x8O+OQYz7EVN+gp0vmKhaqgMvfvqZHD4vg c1S698VOio46joQUCe/tsYs8YIhLsCql3FzBMDd+V5ESAoDqfJeduuc3flEFZx5HNP8q 6f+zFnETbzIyvfYw7EmborTXCI53s/NsFXjToLUvkMBH9S9NdYwuhi8XcSuhpsu+c11R vy9tnyYask89RyyWWJH19gt6J8s4G3TAl1giBxW4yajk0IR1vQnAXgAD03VgtfdTWTcn f4k0p6wek63KHhsdxuVVJzUECzpud44n2XXC1K+bseB+USCxK2mrk+fbIIxJfjzpijRx YD8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l7YZPug7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b14-20020a63d30e000000b00507249cdbb4si318014pgg.296.2023.03.13.13.04.31; Mon, 13 Mar 2023 13:04:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l7YZPug7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229723AbjCMUAq (ORCPT + 99 others); Mon, 13 Mar 2023 16:00:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230083AbjCMUAS (ORCPT ); Mon, 13 Mar 2023 16:00:18 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7321E738B7 for ; Mon, 13 Mar 2023 13:00:14 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id r27so17184567lfe.10 for ; Mon, 13 Mar 2023 13:00:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678737613; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=wVLgoHd5JRg28f+yh6JSFUHtXvcJzOao7oRBs3X+6SI=; b=l7YZPug7DZS32EIX8jDfsfrfcQWaFlddBm25jm86BggG4JTA/lhqLY5RtdBVUD32vI H/utAVFetq9kFczvfx+B2EERVQdvqfSTm0ev/TBwtbp9n2z41sAuKe1T23qJeQlAc5l9 Q+ctTuVEBOOXUKPDXkSIT3Qs1VFKj4VVLVCg3AJj71IpNhSu2mv+IQ4Uc+dGj3iMz/L7 KCv7miHVRXUCLbgycEmSrDHY1k3YL/bzfo+YTm/SQHow4GNLYbc391gNrsiSjLBXJRHa ZTJG5k9lfFVDVR8b0P4QcsUWzMQpeTmYUKVBAU0+MDXYWj/H556G7FRoBroegf0U4p7E sCuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678737613; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wVLgoHd5JRg28f+yh6JSFUHtXvcJzOao7oRBs3X+6SI=; b=GDUhodcoBE9Muhs92ZqNEN9iU9ecvbHhAJQqT3iV9eX4R1Q76/Kx5OfE0x8Or00Ffl 2vUEyO4iqppGhHb8lwRY1/Aj6V2cTnzZaTJz/6NLxDSWftCTkhdV7mnSQvGVW9bk77FK KrncOxFbvAYoQ0YTGaNWmhpx6JYwmFosEQqm4MdBxIorDeRDpjIeoe6N9UW4imzb5LN6 3+PGtDpfqKkZwrV0iwS4DO3ppgAz0zDmq3brNOKmZAFDtueNbQARdfQATEARnDRob2ko NOCUMmGb3rxKbCkLhnR/YXTXQF5V0LgTJhwBlJS/5AFVkWdUyDNBRpYJhOVJPKNRVGNu n1Pg== X-Gm-Message-State: AO0yUKUmGZZYPdgwbw+Jt1rpuGkA6KnQxGj+yuR58n7HDygu3JNuHWVF vLZ0fXWOobSuUul1Ec8osqk51w== X-Received: by 2002:a05:6512:4c7:b0:4e8:20f6:83f4 with SMTP id w7-20020a05651204c700b004e820f683f4mr6278101lfq.21.1678737612734; Mon, 13 Mar 2023 13:00:12 -0700 (PDT) Received: from [192.168.1.101] (abyj16.neoplus.adsl.tpnet.pl. [83.9.29.16]) by smtp.gmail.com with ESMTPSA id w3-20020ac254a3000000b004cc800b1f2csm75431lfk.238.2023.03.13.13.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 13:00:12 -0700 (PDT) From: Konrad Dybcio Date: Mon, 13 Mar 2023 21:00:04 +0100 Subject: [PATCH v3 06/10] soc: qcom: rpmpd: Improve the naming MIME-Version: 1.0 Message-Id: <20230313-topic-rpmpd-v3-6-06a4f448ff90@linaro.org> References: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> In-Reply-To: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678737603; l=26373; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=YPgvOib1w7EbBNa6mq+JUfbfGLE9w0c535k+nwrzZfQ=; b=zIrMyrFOipy+67hbIVhZ+ZMAL4ZbhKVGhT1+w6ubDSDhscC8qHRLcBtZlEwOYTaZuD5PgheLNCqo u79UDmIBDdcE+i2nKenwpTzJylgTuLFTG57XcHr0Wr/m63ZTVIVt X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_HTTP,RCVD_IN_SORBS_SOCKS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760284258838764907?= X-GMAIL-MSGID: =?utf-8?q?1760284258838764907?= Now that we aren't bound by the preprocessor macros, improve the naming to be a bit less preprocessor-y and touch up some rpmpd.pd.name fields while at it. Signed-off-by: Konrad Dybcio --- drivers/soc/qcom/rpmpd.c | 432 +++++++++++++++++++++++------------------------ 1 file changed, 216 insertions(+), 216 deletions(-) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index df4e0d8a2aa9..695b2fc56f40 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -68,132 +68,132 @@ struct rpmpd_desc { static DEFINE_MUTEX(rpmpd_lock); /* CX */ -static struct rpmpd RWCX0_LEVEL_cx_ao; -static struct rpmpd RWCX0_LEVEL_cx = { +static struct rpmpd cx_rwcx0_lvl_ao; +static struct rpmpd cx_rwcx0_lvl = { .pd = { .name = "cx", }, - .peer = &RWCX0_LEVEL_cx_ao, + .peer = &cx_rwcx0_lvl_ao, .res_type = RPMPD_RWCX, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd RWCX0_LEVEL_cx_ao = { +static struct rpmpd cx_rwcx0_lvl_ao = { .pd = { .name = "cx_ao", }, - .peer = &RWCX0_LEVEL_cx, + .peer = &cx_rwcx0_lvl, .active_only = true, .res_type = RPMPD_RWCX, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd SMPA1_CORNER_cx_ao; -static struct rpmpd SMPA1_CORNER_cx = { +static struct rpmpd cx_s1a_corner_ao; +static struct rpmpd cx_s1a_corner = { .pd = { .name = "cx", }, - .peer = &SMPA1_CORNER_cx_ao, + .peer = &cx_s1a_corner_ao, .res_type = RPMPD_SMPA, .res_id = 1, .key = KEY_CORNER, }; -static struct rpmpd SMPA1_CORNER_cx_ao = { +static struct rpmpd cx_s1a_corner_ao = { .pd = { .name = "cx_ao", }, - .peer = &SMPA1_CORNER_cx, + .peer = &cx_s1a_corner, .active_only = true, .res_type = RPMPD_SMPA, .res_id = 1, .key = KEY_CORNER, }; -static struct rpmpd SMPA2_CORNER_cx_ao; -static struct rpmpd SMPA2_CORNER_cx = { +static struct rpmpd cx_s2a_corner_ao; +static struct rpmpd cx_s2a_corner = { .pd = { .name = "cx", }, - .peer = &SMPA2_CORNER_cx_ao, + .peer = &cx_s2a_corner_ao, .res_type = RPMPD_SMPA, .res_id = 2, .key = KEY_CORNER, }; -static struct rpmpd SMPA2_CORNER_cx_ao = { +static struct rpmpd cx_s2a_corner_ao = { .pd = { .name = "cx_ao", }, - .peer = &SMPA2_CORNER_cx, + .peer = &cx_s2a_corner, .active_only = true, .res_type = RPMPD_SMPA, .res_id = 2, .key = KEY_CORNER, }; -static struct rpmpd SMPA2_LEVEL_cx_ao; -static struct rpmpd SMPA2_LEVEL_cx = { +static struct rpmpd cx_s2a_lvl_ao; +static struct rpmpd cx_s2a_lvl = { .pd = { .name = "cx", }, - .peer = &SMPA2_LEVEL_cx_ao, + .peer = &cx_s2a_lvl_ao, .res_type = RPMPD_SMPA, .res_id = 2, .key = KEY_LEVEL, }; -static struct rpmpd SMPA2_LEVEL_cx_ao = { +static struct rpmpd cx_s2a_lvl_ao = { .pd = { .name = "cx_ao", }, - .peer = &SMPA2_LEVEL_cx, + .peer = &cx_s2a_lvl, .active_only = true, .res_type = RPMPD_SMPA, .res_id = 2, .key = KEY_LEVEL, }; -static struct rpmpd SMPA3_LEVEL_cx_ao; -static struct rpmpd SMPA3_LEVEL_cx = { +static struct rpmpd cx_s3a_lvl_ao; +static struct rpmpd cx_s3a_lvl = { .pd = { .name = "cx", }, - .peer = &SMPA3_LEVEL_cx_ao, + .peer = &cx_s3a_lvl_ao, .res_type = RPMPD_SMPA, .res_id = 3, .key = KEY_LEVEL, }; -static struct rpmpd SMPA3_LEVEL_cx_ao = { +static struct rpmpd cx_s3a_lvl_ao = { .pd = { .name = "cx_ao", }, - .peer = &SMPA3_LEVEL_cx, + .peer = &cx_s3a_lvl, .active_only = true, .res_type = RPMPD_SMPA, .res_id = 3, .key = KEY_LEVEL, }; -static struct rpmpd RWCX0_cx_vfl = { +static struct rpmpd cx_rwcx0_vfl = { .pd = { .name = "cx_vfl", }, .res_type = RPMPD_RWCX, .res_id = 0, .key = KEY_FLOOR_LEVEL, }; -static struct rpmpd RWSC2_cx_vfl = { +static struct rpmpd cx_rwsc2_vfl = { .pd = { .name = "cx_vfl", }, .res_type = RPMPD_RWSC, .res_id = 2, .key = KEY_FLOOR_LEVEL, }; -static struct rpmpd SMPA1_cx_vfc = { +static struct rpmpd cx_s1a_vfc = { .pd = { .name = "cx_vfc", }, .res_type = RPMPD_SMPA, .res_id = 1, .key = KEY_FLOOR_CORNER, }; -static struct rpmpd SMPA2_cx_vfc = { +static struct rpmpd cx_s2a_vfc = { .pd = { .name = "cx_vfc", }, .res_type = RPMPD_SMPA, .res_id = 2, .key = KEY_FLOOR_CORNER, }; -static struct rpmpd SMPA2_cx_vfl = { +static struct rpmpd cx_s2a_vfl = { .pd = { .name = "cx_vfl", }, .res_type = RPMPD_SMPA, .res_id = 2, .key = KEY_FLOOR_LEVEL, }; -static struct rpmpd SMPA3_cx_vfl = { +static struct rpmpd cx_s3a_vfl = { .pd = { .name = "cx_vfl", }, .res_type = RPMPD_SMPA, .res_id = 3, @@ -201,32 +201,32 @@ static struct rpmpd SMPA3_cx_vfl = { }; /* G(F)X */ -static struct rpmpd SMPB2_gfx_corner = { +static struct rpmpd gfx_s2b_corner = { .pd = { .name = "gfx", }, .res_type = RPMPD_SMPB, .res_id = 2, .key = KEY_CORNER, }; -static struct rpmpd SMPB2_gfx_vfc = { +static struct rpmpd gfx_s2b_vfc = { .pd = { .name = "gfx_vfc", }, .res_type = RPMPD_SMPB, .res_id = 2, .key = KEY_FLOOR_CORNER, }; -static struct rpmpd RWGX0_LEVEL_gx_ao; -static struct rpmpd RWGX0_LEVEL_gx = { +static struct rpmpd gx_rwgx0_lvl_ao; +static struct rpmpd gx_rwgx0_lvl = { .pd = { .name = "gx", }, - .peer = &RWGX0_LEVEL_gx_ao, + .peer = &gx_rwgx0_lvl_ao, .res_type = RPMPD_RWGX, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd RWGX0_LEVEL_gx_ao = { +static struct rpmpd gx_rwgx0_lvl_ao = { .pd = { .name = "gx_ao", }, - .peer = &RWGX0_LEVEL_gx, + .peer = &gx_rwgx0_lvl, .active_only = true, .res_type = RPMPD_RWGX, .res_id = 0, @@ -234,129 +234,129 @@ static struct rpmpd RWGX0_LEVEL_gx_ao = { }; /* MX */ -static struct rpmpd LDOA3_CORNER_mx_ao; -static struct rpmpd LDOA3_CORNER_mx = { +static struct rpmpd mx_l3a_corner_ao; +static struct rpmpd mx_l3a_corner = { .pd = { .name = "mx", }, - .peer = &LDOA3_CORNER_mx_ao, + .peer = &mx_l3a_corner_ao, .res_type = RPMPD_LDOA, .res_id = 3, .key = KEY_CORNER, }; -static struct rpmpd LDOA3_CORNER_mx_ao = { +static struct rpmpd mx_l3a_corner_ao = { .pd = { .name = "mx_ao", }, - .peer = &LDOA3_CORNER_mx, + .peer = &mx_l3a_corner, .active_only = true, .res_type = RPMPD_LDOA, .res_id = 3, .key = KEY_CORNER, }; -static struct rpmpd LDOA12_LEVEL_mx_ao; -static struct rpmpd LDOA12_LEVEL_mx = { +static struct rpmpd mx_l12a_lvl_ao; +static struct rpmpd mx_l12a_lvl = { .pd = { .name = "mx", }, - .peer = &LDOA12_LEVEL_mx_ao, + .peer = &mx_l12a_lvl_ao, .res_type = RPMPD_LDOA, .res_id = 12, .key = KEY_LEVEL, }; -static struct rpmpd LDOA12_LEVEL_mx_ao = { +static struct rpmpd mx_l12a_lvl_ao = { .pd = { .name = "mx_ao", }, - .peer = &LDOA12_LEVEL_mx, + .peer = &mx_l12a_lvl, .active_only = true, .res_type = RPMPD_LDOA, .res_id = 12, .key = KEY_LEVEL, }; -static struct rpmpd SMPA2_CORNER_mx_ao; -static struct rpmpd SMPA2_CORNER_mx = { +static struct rpmpd mx_s2a_corner_ao; +static struct rpmpd mx_s2a_corner = { .pd = { .name = "mx", }, - .peer = &SMPA2_CORNER_mx_ao, + .peer = &mx_s2a_corner_ao, .res_type = RPMPD_SMPA, .res_id = 2, .key = KEY_CORNER, }; -static struct rpmpd SMPA2_CORNER_mx_ao = { +static struct rpmpd mx_s2a_corner_ao = { .pd = { .name = "mx_ao", }, - .peer = &SMPA2_CORNER_mx, + .peer = &mx_s2a_corner, .active_only = true, .res_type = RPMPD_SMPA, .res_id = 2, .key = KEY_CORNER, }; -static struct rpmpd RWMX0_LEVEL_mx_ao; -static struct rpmpd RWMX0_LEVEL_mx = { +static struct rpmpd mx_rwmx0_lvl_ao; +static struct rpmpd mx_rwmx0_lvl = { .pd = { .name = "mx", }, - .peer = &RWMX0_LEVEL_mx_ao, + .peer = &mx_rwmx0_lvl_ao, .res_type = RPMPD_RWMX, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd RWMX0_LEVEL_mx_ao = { +static struct rpmpd mx_rwmx0_lvl_ao = { .pd = { .name = "mx_ao", }, - .peer = &RWMX0_LEVEL_mx, + .peer = &mx_rwmx0_lvl, .active_only = true, .res_type = RPMPD_RWMX, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd SMPA6_LEVEL_mx_ao; -static struct rpmpd SMPA6_LEVEL_mx = { +static struct rpmpd mx_s6a_lvl_ao; +static struct rpmpd mx_s6a_lvl = { .pd = { .name = "mx", }, - .peer = &SMPA6_LEVEL_mx_ao, + .peer = &mx_s6a_lvl_ao, .res_type = RPMPD_SMPA, .res_id = 6, .key = KEY_LEVEL, }; -static struct rpmpd SMPA6_LEVEL_mx_ao = { +static struct rpmpd mx_s6a_lvl_ao = { .pd = { .name = "mx_ao", }, - .peer = &SMPA6_LEVEL_mx, + .peer = &mx_s6a_lvl, .active_only = true, .res_type = RPMPD_SMPA, .res_id = 6, .key = KEY_LEVEL, }; -static struct rpmpd SMPA7_LEVEL_mx_ao; -static struct rpmpd SMPA7_LEVEL_mx = { +static struct rpmpd mx_s7a_lvl_ao; +static struct rpmpd mx_s7a_lvl = { .pd = { .name = "mx", }, - .peer = &SMPA7_LEVEL_mx_ao, + .peer = &mx_s7a_lvl_ao, .res_type = RPMPD_SMPA, .res_id = 7, .key = KEY_LEVEL, }; -static struct rpmpd SMPA7_LEVEL_mx_ao = { +static struct rpmpd mx_s7a_lvl_ao = { .pd = { .name = "mx_ao", }, - .peer = &SMPA7_LEVEL_mx, + .peer = &mx_s7a_lvl, .active_only = true, .res_type = RPMPD_SMPA, .res_id = 7, .key = KEY_LEVEL, }; -static struct rpmpd LDOA12_mx_vfl = { +static struct rpmpd mx_l12a_vfl = { .pd = { .name = "mx_vfl", }, .res_type = RPMPD_LDOA, .res_id = 12, .key = KEY_FLOOR_LEVEL, }; -static struct rpmpd RWMX0_mx_vfl = { +static struct rpmpd mx_rwmx0_vfl = { .pd = { .name = "mx_vfl", }, .res_type = RPMPD_RWMX, .res_id = 0, .key = KEY_FLOOR_LEVEL, }; -static struct rpmpd RWSM6_mx_vfl = { +static struct rpmpd mx_rwsm6_vfl = { .pd = { .name = "mx_vfl", }, .res_type = RPMPD_RWSM, .res_id = 6, @@ -364,43 +364,43 @@ static struct rpmpd RWSM6_mx_vfl = { }; /* MD */ -static struct rpmpd SMPA1_CORNER_md_ao; -static struct rpmpd SMPA1_CORNER_md = { +static struct rpmpd md_s1a_corner_ao; +static struct rpmpd md_s1a_corner = { .pd = { .name = "md", }, - .peer = &SMPA1_CORNER_md_ao, + .peer = &md_s1a_corner_ao, .res_type = RPMPD_SMPA, .res_id = 1, .key = KEY_CORNER, }; -static struct rpmpd SMPA1_CORNER_md_ao = { +static struct rpmpd md_s1a_corner_ao = { .pd = { .name = "md_ao", }, - .peer = &SMPA1_CORNER_md, + .peer = &md_s1a_corner, .active_only = true, .res_type = RPMPD_SMPA, .res_id = 1, .key = KEY_CORNER, }; -static struct rpmpd SMPA1_LEVEL_md_ao; -static struct rpmpd SMPA1_LEVEL_md = { +static struct rpmpd md_s1a_lvl_ao; +static struct rpmpd md_s1a_lvl = { .pd = { .name = "md", }, - .peer = &SMPA1_LEVEL_md_ao, + .peer = &md_s1a_lvl_ao, .res_type = RPMPD_SMPA, .res_id = 1, .key = KEY_LEVEL, }; -static struct rpmpd SMPA1_LEVEL_md_ao = { +static struct rpmpd md_s1a_lvl_ao = { .pd = { .name = "md_ao", }, - .peer = &SMPA1_LEVEL_md, + .peer = &md_s1a_lvl, .active_only = true, .res_type = RPMPD_SMPA, .res_id = 1, .key = KEY_LEVEL, }; -static struct rpmpd SMPA1_md_vfc = { +static struct rpmpd md_s1a_vfc = { .pd = { .name = "md_vfc", }, .res_type = RPMPD_SMPA, .res_id = 1, @@ -408,102 +408,102 @@ static struct rpmpd SMPA1_md_vfc = { }; /* LPI_CX */ -static struct rpmpd RWLC0_lpi_cx_lvl = { +static struct rpmpd lpi_cx_rwlc0_lvl = { .pd = { .name = "lpi_cx", }, .res_type = RPMPD_RWLC, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd RWLC0_lpicx_vfl = { - .pd = { .name = "lpicx_vfl", }, +static struct rpmpd lpi_cx_rwlc0_vfl = { + .pd = { .name = "lpi_cx_vfl", }, .res_type = RPMPD_RWLC, .res_id = 0, .key = KEY_FLOOR_LEVEL, }; /* LPI_MX */ -static struct rpmpd RWLM0_lpi_mx_lvl = { +static struct rpmpd lpi_mx_rwlm0_lvl = { .pd = { .name = "lpi_mx", }, .res_type = RPMPD_RWLM, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd RWLM0_lpimx_vfl = { - .pd = { .name = "lpimx_vfl", }, +static struct rpmpd lpi_mx_rwlm0_vfl = { + .pd = { .name = "lpi_mx_vfl", }, .res_type = RPMPD_RWLM, .res_id = 0, .key = KEY_FLOOR_LEVEL, }; /* SSC_CX */ -static struct rpmpd LDOA26_sscx_corner = { - .pd = { .name = "sscx", }, +static struct rpmpd ssc_cx_l26a_corner = { + .pd = { .name = "ssc_cx", }, .res_type = RPMPD_LDOA, .res_id = 26, .key = KEY_CORNER, }; -static struct rpmpd RWLC0_ssccx_lvl = { - .pd = { .name = "ssccx", }, +static struct rpmpd ssc_cx_rwlc0_lvl = { + .pd = { .name = "ssc_cx", }, .res_type = RPMPD_RWLC, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd RWSC0_ssccx_lvl = { - .pd = { .name = "ssccx", }, +static struct rpmpd ssc_cx_rwsc0_lvl = { + .pd = { .name = "ssc_cx", }, .res_type = RPMPD_RWSC, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd LDOA26_sscx_vfc = { - .pd = { .name = "sscx_vfc", }, +static struct rpmpd ssc_cx_l26a_vfc = { + .pd = { .name = "ssc_cx_vfc", }, .res_type = RPMPD_LDOA, .res_id = 26, .key = KEY_FLOOR_CORNER, }; -static struct rpmpd RWLC0_ssccx_vfl = { - .pd = { .name = "ssccx_vfl", }, +static struct rpmpd ssc_cx_rwlc0_vfl = { + .pd = { .name = "ssc_cx_vfl", }, .res_type = RPMPD_RWLC, .res_id = 0, .key = KEY_FLOOR_LEVEL, }; -static struct rpmpd RWSC0_ssccx_vfl = { - .pd = { .name = "ssccx_vfl", }, +static struct rpmpd ssc_cx_rwsc0_vfl = { + .pd = { .name = "ssc_cx_vfl", }, .res_type = RPMPD_RWSC, .res_id = 0, .key = KEY_FLOOR_LEVEL, }; /* SSC_MX */ -static struct rpmpd RWLM0_sscmx_lvl = { - .pd = { .name = "sscmx", }, +static struct rpmpd ssc_mx_rwlm0_lvl = { + .pd = { .name = "ssc_mx", }, .res_type = RPMPD_RWLM, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd RWSM0_sscmx_lvl = { - .pd = { .name = "sscmx", }, +static struct rpmpd ssc_mx_rwsm0_lvl = { + .pd = { .name = "ssc_mx", }, .res_type = RPMPD_RWSM, .res_id = 0, .key = KEY_LEVEL, }; -static struct rpmpd RWLM0_sscmx_vfl = { - .pd = { .name = "sscmx_vfl", }, +static struct rpmpd ssc_mx_rwlm0_vfl = { + .pd = { .name = "ssc_mx_vfl", }, .res_type = RPMPD_RWLM, .res_id = 0, .key = KEY_FLOOR_LEVEL, }; -static struct rpmpd RWSM0_sscmx_vfl = { - .pd = { .name = "sscmx_vfl", }, +static struct rpmpd ssc_mx_rwsm0_vfl = { + .pd = { .name = "ssc_mx_vfl", }, .res_type = RPMPD_RWSM, .res_id = 0, .key = KEY_FLOOR_LEVEL, @@ -511,12 +511,12 @@ static struct rpmpd RWSM0_sscmx_vfl = { /* mdm9607 RPM Power Domains */ static struct rpmpd *mdm9607_rpmpds[] = { - [MDM9607_VDDCX] = &SMPA3_LEVEL_cx, - [MDM9607_VDDCX_AO] = &SMPA3_LEVEL_cx_ao, - [MDM9607_VDDCX_VFL] = &SMPA3_cx_vfl, - [MDM9607_VDDMX] = &LDOA12_LEVEL_mx, - [MDM9607_VDDMX_AO] = &LDOA12_LEVEL_mx_ao, - [MDM9607_VDDMX_VFL] = &LDOA12_mx_vfl, + [MDM9607_VDDCX] = &cx_s3a_lvl, + [MDM9607_VDDCX_AO] = &cx_s3a_lvl_ao, + [MDM9607_VDDCX_VFL] = &cx_s3a_vfl, + [MDM9607_VDDMX] = &mx_l12a_lvl, + [MDM9607_VDDMX_AO] = &mx_l12a_lvl_ao, + [MDM9607_VDDMX_VFL] = &mx_l12a_vfl, }; static const struct rpmpd_desc mdm9607_desc = { @@ -527,9 +527,9 @@ static const struct rpmpd_desc mdm9607_desc = { /* msm8226 RPM Power Domains */ static struct rpmpd *msm8226_rpmpds[] = { - [MSM8226_VDDCX] = &SMPA1_CORNER_cx, - [MSM8226_VDDCX_AO] = &SMPA1_CORNER_cx_ao, - [MSM8226_VDDCX_VFC] = &SMPA1_cx_vfc, + [MSM8226_VDDCX] = &cx_s1a_corner, + [MSM8226_VDDCX_AO] = &cx_s1a_corner_ao, + [MSM8226_VDDCX_VFC] = &cx_s1a_vfc, }; static const struct rpmpd_desc msm8226_desc = { @@ -540,14 +540,14 @@ static const struct rpmpd_desc msm8226_desc = { /* msm8939 RPM Power Domains */ static struct rpmpd *msm8939_rpmpds[] = { - [MSM8939_VDDMDCX] = &SMPA1_CORNER_md, - [MSM8939_VDDMDCX_AO] = &SMPA1_CORNER_md_ao, - [MSM8939_VDDMDCX_VFC] = &SMPA1_md_vfc, - [MSM8939_VDDCX] = &SMPA2_CORNER_cx, - [MSM8939_VDDCX_AO] = &SMPA2_CORNER_cx_ao, - [MSM8939_VDDCX_VFC] = &SMPA2_cx_vfc, - [MSM8939_VDDMX] = &LDOA3_CORNER_mx, - [MSM8939_VDDMX_AO] = &LDOA3_CORNER_mx_ao, + [MSM8939_VDDMDCX] = &md_s1a_corner, + [MSM8939_VDDMDCX_AO] = &md_s1a_corner_ao, + [MSM8939_VDDMDCX_VFC] = &md_s1a_vfc, + [MSM8939_VDDCX] = &cx_s2a_corner, + [MSM8939_VDDCX_AO] = &cx_s2a_corner_ao, + [MSM8939_VDDCX_VFC] = &cx_s2a_vfc, + [MSM8939_VDDMX] = &mx_l3a_corner, + [MSM8939_VDDMX_AO] = &mx_l3a_corner_ao, }; static const struct rpmpd_desc msm8939_desc = { @@ -558,11 +558,11 @@ static const struct rpmpd_desc msm8939_desc = { /* msm8916 RPM Power Domains */ static struct rpmpd *msm8916_rpmpds[] = { - [MSM8916_VDDCX] = &SMPA1_CORNER_cx, - [MSM8916_VDDCX_AO] = &SMPA1_CORNER_cx_ao, - [MSM8916_VDDCX_VFC] = &SMPA1_cx_vfc, - [MSM8916_VDDMX] = &LDOA3_CORNER_mx, - [MSM8916_VDDMX_AO] = &LDOA3_CORNER_mx_ao, + [MSM8916_VDDCX] = &cx_s1a_corner, + [MSM8916_VDDCX_AO] = &cx_s1a_corner_ao, + [MSM8916_VDDCX_VFC] = &cx_s1a_vfc, + [MSM8916_VDDMX] = &mx_l3a_corner, + [MSM8916_VDDMX_AO] = &mx_l3a_corner_ao, }; static const struct rpmpd_desc msm8916_desc = { @@ -573,13 +573,13 @@ static const struct rpmpd_desc msm8916_desc = { /* msm8953 RPM Power Domains */ static struct rpmpd *msm8953_rpmpds[] = { - [MSM8953_VDDMD] = &SMPA1_LEVEL_md, - [MSM8953_VDDMD_AO] = &SMPA1_LEVEL_md_ao, - [MSM8953_VDDCX] = &SMPA2_LEVEL_cx, - [MSM8953_VDDCX_AO] = &SMPA2_LEVEL_cx_ao, - [MSM8953_VDDCX_VFL] = &SMPA2_cx_vfl, - [MSM8953_VDDMX] = &SMPA7_LEVEL_mx, - [MSM8953_VDDMX_AO] = &SMPA7_LEVEL_mx_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_vfl, + [MSM8953_VDDMX] = &mx_s7a_lvl, + [MSM8953_VDDMX_AO] = &mx_s7a_lvl_ao, }; static const struct rpmpd_desc msm8953_desc = { @@ -590,12 +590,12 @@ static const struct rpmpd_desc msm8953_desc = { /* msm8976 RPM Power Domains */ static struct rpmpd *msm8976_rpmpds[] = { - [MSM8976_VDDCX] = &SMPA2_LEVEL_cx, - [MSM8976_VDDCX_AO] = &SMPA2_LEVEL_cx_ao, - [MSM8976_VDDCX_VFL] = &RWSC2_cx_vfl, - [MSM8976_VDDMX] = &SMPA6_LEVEL_mx, - [MSM8976_VDDMX_AO] = &SMPA6_LEVEL_mx_ao, - [MSM8976_VDDMX_VFL] = &RWSM6_mx_vfl, + [MSM8976_VDDCX] = &cx_s2a_lvl, + [MSM8976_VDDCX_AO] = &cx_s2a_lvl_ao, + [MSM8976_VDDCX_VFL] = &cx_rwsc2_vfl, + [MSM8976_VDDMX] = &mx_s6a_lvl, + [MSM8976_VDDMX_AO] = &mx_s6a_lvl_ao, + [MSM8976_VDDMX_VFL] = &mx_rwsm6_vfl, }; static const struct rpmpd_desc msm8976_desc = { @@ -606,15 +606,15 @@ static const struct rpmpd_desc msm8976_desc = { /* msm8994 RPM Power domains */ static struct rpmpd *msm8994_rpmpds[] = { - [MSM8994_VDDCX] = &SMPA1_CORNER_cx, - [MSM8994_VDDCX_AO] = &SMPA1_CORNER_cx_ao, - [MSM8994_VDDCX_VFC] = &SMPA1_cx_vfc, - [MSM8994_VDDMX] = &SMPA2_CORNER_mx, - [MSM8994_VDDMX_AO] = &SMPA2_CORNER_mx_ao, + [MSM8994_VDDCX] = &cx_s1a_corner, + [MSM8994_VDDCX_AO] = &cx_s1a_corner_ao, + [MSM8994_VDDCX_VFC] = &cx_s1a_vfc, + [MSM8994_VDDMX] = &mx_s2a_corner, + [MSM8994_VDDMX_AO] = &mx_s2a_corner_ao, /* Attention! *Some* 8994 boards with pm8004 may use SMPC here! */ - [MSM8994_VDDGFX] = &SMPB2_gfx_corner, - [MSM8994_VDDGFX_VFC] = &SMPB2_gfx_vfc, + [MSM8994_VDDGFX] = &gfx_s2b_corner, + [MSM8994_VDDGFX_VFC] = &gfx_s2b_vfc, }; static const struct rpmpd_desc msm8994_desc = { @@ -625,13 +625,13 @@ static const struct rpmpd_desc msm8994_desc = { /* msm8996 RPM Power domains */ static struct rpmpd *msm8996_rpmpds[] = { - [MSM8996_VDDCX] = &SMPA1_CORNER_cx, - [MSM8996_VDDCX_AO] = &SMPA1_CORNER_cx_ao, - [MSM8996_VDDCX_VFC] = &SMPA1_cx_vfc, - [MSM8996_VDDMX] = &SMPA2_CORNER_mx, - [MSM8996_VDDMX_AO] = &SMPA2_CORNER_mx_ao, - [MSM8996_VDDSSCX] = &LDOA26_sscx_corner, - [MSM8996_VDDSSCX_VFC] = &LDOA26_sscx_vfc, + [MSM8996_VDDCX] = &cx_s1a_corner, + [MSM8996_VDDCX_AO] = &cx_s1a_corner_ao, + [MSM8996_VDDCX_VFC] = &cx_s1a_vfc, + [MSM8996_VDDMX] = &mx_s2a_corner, + [MSM8996_VDDMX_AO] = &mx_s2a_corner_ao, + [MSM8996_VDDSSCX] = &ssc_cx_l26a_corner, + [MSM8996_VDDSSCX_VFC] = &ssc_cx_l26a_vfc, }; static const struct rpmpd_desc msm8996_desc = { @@ -642,16 +642,16 @@ static const struct rpmpd_desc msm8996_desc = { /* msm8998 RPM Power domains */ static struct rpmpd *msm8998_rpmpds[] = { - [MSM8998_VDDCX] = &RWCX0_LEVEL_cx, - [MSM8998_VDDCX_AO] = &RWCX0_LEVEL_cx_ao, - [MSM8998_VDDCX_VFL] = &RWCX0_cx_vfl, - [MSM8998_VDDMX] = &RWMX0_LEVEL_mx, - [MSM8998_VDDMX_AO] = &RWMX0_LEVEL_mx_ao, - [MSM8998_VDDMX_VFL] = &RWMX0_mx_vfl, - [MSM8998_SSCCX] = &RWSC0_ssccx_lvl, - [MSM8998_SSCCX_VFL] = &RWSC0_ssccx_vfl, - [MSM8998_SSCMX] = &RWSM0_sscmx_lvl, - [MSM8998_SSCMX_VFL] = &RWSM0_sscmx_vfl, + [MSM8998_VDDCX] = &cx_rwcx0_lvl, + [MSM8998_VDDCX_AO] = &cx_rwcx0_lvl_ao, + [MSM8998_VDDCX_VFL] = &cx_rwcx0_vfl, + [MSM8998_VDDMX] = &mx_rwmx0_lvl, + [MSM8998_VDDMX_AO] = &mx_rwmx0_lvl_ao, + [MSM8998_VDDMX_VFL] = &mx_rwmx0_vfl, + [MSM8998_SSCCX] = &ssc_cx_rwsc0_lvl, + [MSM8998_SSCCX_VFL] = &ssc_cx_rwsc0_vfl, + [MSM8998_SSCMX] = &ssc_mx_rwsm0_lvl, + [MSM8998_SSCMX_VFL] = &ssc_mx_rwsm0_vfl, }; static const struct rpmpd_desc msm8998_desc = { @@ -662,13 +662,13 @@ static const struct rpmpd_desc msm8998_desc = { /* qcs404 RPM Power domains */ static struct rpmpd *qcs404_rpmpds[] = { - [QCS404_VDDMX] = &RWMX0_LEVEL_mx, - [QCS404_VDDMX_AO] = &RWMX0_LEVEL_mx_ao, - [QCS404_VDDMX_VFL] = &RWMX0_mx_vfl, - [QCS404_LPICX] = &RWLC0_lpi_cx_lvl, - [QCS404_LPICX_VFL] = &RWLC0_lpicx_vfl, - [QCS404_LPIMX] = &RWLM0_lpi_mx_lvl, - [QCS404_LPIMX_VFL] = &RWLM0_lpimx_vfl, + [QCS404_VDDMX] = &mx_rwmx0_lvl, + [QCS404_VDDMX_AO] = &mx_rwmx0_lvl_ao, + [QCS404_VDDMX_VFL] = &mx_rwmx0_vfl, + [QCS404_LPICX] = &lpi_cx_rwlc0_lvl, + [QCS404_LPICX_VFL] = &lpi_cx_rwlc0_vfl, + [QCS404_LPIMX] = &lpi_mx_rwlm0_lvl, + [QCS404_LPIMX_VFL] = &lpi_mx_rwlm0_vfl, }; static const struct rpmpd_desc qcs404_desc = { @@ -679,16 +679,16 @@ static const struct rpmpd_desc qcs404_desc = { /* sdm660 RPM Power domains */ static struct rpmpd *sdm660_rpmpds[] = { - [SDM660_VDDCX] = &RWCX0_LEVEL_cx, - [SDM660_VDDCX_AO] = &RWCX0_LEVEL_cx_ao, - [SDM660_VDDCX_VFL] = &RWCX0_cx_vfl, - [SDM660_VDDMX] = &RWMX0_LEVEL_mx, - [SDM660_VDDMX_AO] = &RWMX0_LEVEL_mx_ao, - [SDM660_VDDMX_VFL] = &RWMX0_mx_vfl, - [SDM660_SSCCX] = &RWLC0_ssccx_lvl, - [SDM660_SSCCX_VFL] = &RWLC0_ssccx_vfl, - [SDM660_SSCMX] = &RWLM0_sscmx_lvl, - [SDM660_SSCMX_VFL] = &RWLM0_sscmx_vfl, + [SDM660_VDDCX] = &cx_rwcx0_lvl, + [SDM660_VDDCX_AO] = &cx_rwcx0_lvl_ao, + [SDM660_VDDCX_VFL] = &cx_rwcx0_vfl, + [SDM660_VDDMX] = &mx_rwmx0_lvl, + [SDM660_VDDMX_AO] = &mx_rwmx0_lvl_ao, + [SDM660_VDDMX_VFL] = &mx_rwmx0_vfl, + [SDM660_SSCCX] = &ssc_cx_rwlc0_lvl, + [SDM660_SSCCX_VFL] = &ssc_cx_rwlc0_vfl, + [SDM660_SSCMX] = &ssc_mx_rwlm0_lvl, + [SDM660_SSCMX_VFL] = &ssc_mx_rwlm0_vfl, }; static const struct rpmpd_desc sdm660_desc = { @@ -699,14 +699,14 @@ static const struct rpmpd_desc sdm660_desc = { /* sm4250/6115 RPM Power domains */ static struct rpmpd *sm6115_rpmpds[] = { - [SM6115_VDDCX] = &RWCX0_LEVEL_cx, - [SM6115_VDDCX_AO] = &RWCX0_LEVEL_cx_ao, - [SM6115_VDDCX_VFL] = &RWCX0_cx_vfl, - [SM6115_VDDMX] = &RWMX0_LEVEL_mx, - [SM6115_VDDMX_AO] = &RWMX0_LEVEL_mx_ao, - [SM6115_VDDMX_VFL] = &RWMX0_mx_vfl, - [SM6115_VDD_LPI_CX] = &RWLC0_lpi_cx_lvl, - [SM6115_VDD_LPI_MX] = &RWLM0_lpi_mx_lvl, + [SM6115_VDDCX] = &cx_rwcx0_lvl, + [SM6115_VDDCX_AO] = &cx_rwcx0_lvl_ao, + [SM6115_VDDCX_VFL] = &cx_rwcx0_vfl, + [SM6115_VDDMX] = &mx_rwmx0_lvl, + [SM6115_VDDMX_AO] = &mx_rwmx0_lvl_ao, + [SM6115_VDDMX_VFL] = &mx_rwmx0_vfl, + [SM6115_VDD_LPI_CX] = &lpi_cx_rwlc0_lvl, + [SM6115_VDD_LPI_MX] = &lpi_mx_rwlm0_lvl, }; static const struct rpmpd_desc sm6115_desc = { @@ -717,12 +717,12 @@ static const struct rpmpd_desc sm6115_desc = { /* sm6125 RPM Power domains */ static struct rpmpd *sm6125_rpmpds[] = { - [SM6125_VDDCX] = &RWCX0_LEVEL_cx, - [SM6125_VDDCX_AO] = &RWCX0_LEVEL_cx_ao, - [SM6125_VDDCX_VFL] = &RWCX0_cx_vfl, - [SM6125_VDDMX] = &RWMX0_LEVEL_mx, - [SM6125_VDDMX_AO] = &RWMX0_LEVEL_mx_ao, - [SM6125_VDDMX_VFL] = &RWMX0_mx_vfl, + [SM6125_VDDCX] = &cx_rwcx0_lvl, + [SM6125_VDDCX_AO] = &cx_rwcx0_lvl_ao, + [SM6125_VDDCX_VFL] = &cx_rwcx0_vfl, + [SM6125_VDDMX] = &mx_rwmx0_lvl, + [SM6125_VDDMX_AO] = &mx_rwmx0_lvl_ao, + [SM6125_VDDMX_VFL] = &mx_rwmx0_vfl, }; static const struct rpmpd_desc sm6125_desc = { @@ -732,16 +732,16 @@ static const struct rpmpd_desc sm6125_desc = { }; static struct rpmpd *sm6375_rpmpds[] = { - [SM6375_VDDCX] = &RWCX0_LEVEL_cx, - [SM6375_VDDCX_AO] = &RWCX0_LEVEL_cx_ao, - [SM6375_VDDCX_VFL] = &RWCX0_cx_vfl, - [SM6375_VDDMX] = &RWMX0_LEVEL_mx, - [SM6375_VDDMX_AO] = &RWMX0_LEVEL_mx_ao, - [SM6375_VDDMX_VFL] = &RWMX0_mx_vfl, - [SM6375_VDDGX] = &RWGX0_LEVEL_gx, - [SM6375_VDDGX_AO] = &RWGX0_LEVEL_gx_ao, - [SM6375_VDD_LPI_CX] = &RWLC0_lpi_cx_lvl, - [SM6375_VDD_LPI_MX] = &RWLM0_lpi_mx_lvl, + [SM6375_VDDCX] = &cx_rwcx0_lvl, + [SM6375_VDDCX_AO] = &cx_rwcx0_lvl_ao, + [SM6375_VDDCX_VFL] = &cx_rwcx0_vfl, + [SM6375_VDDMX] = &mx_rwmx0_lvl, + [SM6375_VDDMX_AO] = &mx_rwmx0_lvl_ao, + [SM6375_VDDMX_VFL] = &mx_rwmx0_vfl, + [SM6375_VDDGX] = &gx_rwgx0_lvl, + [SM6375_VDDGX_AO] = &gx_rwgx0_lvl_ao, + [SM6375_VDD_LPI_CX] = &lpi_cx_rwlc0_lvl, + [SM6375_VDD_LPI_MX] = &lpi_mx_rwlm0_lvl, }; static const struct rpmpd_desc sm6375_desc = { @@ -751,14 +751,14 @@ static const struct rpmpd_desc sm6375_desc = { }; static struct rpmpd *qcm2290_rpmpds[] = { - [QCM2290_VDDCX] = &RWCX0_LEVEL_cx, - [QCM2290_VDDCX_AO] = &RWCX0_LEVEL_cx_ao, - [QCM2290_VDDCX_VFL] = &RWCX0_cx_vfl, - [QCM2290_VDDMX] = &RWMX0_LEVEL_mx, - [QCM2290_VDDMX_AO] = &RWMX0_LEVEL_mx_ao, - [QCM2290_VDDMX_VFL] = &RWMX0_mx_vfl, - [QCM2290_VDD_LPI_CX] = &RWLC0_lpi_cx_lvl, - [QCM2290_VDD_LPI_MX] = &RWLM0_lpi_mx_lvl, + [QCM2290_VDDCX] = &cx_rwcx0_lvl, + [QCM2290_VDDCX_AO] = &cx_rwcx0_lvl_ao, + [QCM2290_VDDCX_VFL] = &cx_rwcx0_vfl, + [QCM2290_VDDMX] = &mx_rwmx0_lvl, + [QCM2290_VDDMX_AO] = &mx_rwmx0_lvl_ao, + [QCM2290_VDDMX_VFL] = &mx_rwmx0_vfl, + [QCM2290_VDD_LPI_CX] = &lpi_cx_rwlc0_lvl, + [QCM2290_VDD_LPI_MX] = &lpi_mx_rwlm0_lvl, }; static const struct rpmpd_desc qcm2290_desc = { From patchwork Mon Mar 13 20:00:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 69080 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1379989wrd; Mon, 13 Mar 2023 13:03:01 -0700 (PDT) X-Google-Smtp-Source: AK7set9b8nh9fNubKHxipvTfOmHTmQU0189JvQFQ/qT3FEfkl8oskR5UCV/tziiAKsgoHsM7JjB5 X-Received: by 2002:a05:6a21:998b:b0:cd:7d01:7654 with SMTP id ve11-20020a056a21998b00b000cd7d017654mr38142024pzb.14.1678737781592; Mon, 13 Mar 2023 13:03:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678737781; cv=none; d=google.com; s=arc-20160816; b=vLqHNDmkgvkpl/lMrvCusIbO4mXJjq74b5gqOjWBK+K9SNMMec8MXxlRaZBKZrPxEq k+655fnfxkCr6o+mk0fTA+kJLEKSlVF9VLx2LEmkrn6E8fpHi4z7oopuF/vxySo6hWQ/ GmqrH97BiFGa/nZGCr72nlCvGSRpQhVfgpUfeHBwomzESpJTG6vSnfbwv+x0Ss7xEhmQ lEY2nJc2VNq3OYXf5/hDyrvL0KlNOIC+bx0vV2ta3q/n1XUhyJU8V6mNpdZ3GExkQNar fj3N8gI3nmOLdVNmJNGtU2cgPfawxLVs6IWheNRF4PvplNGjCItA8qjx0jox+npps3FR 3How== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=AhUCHQPlRXS+mV3kTLelC8M+6kMoYMw8+TMBacyA8g8=; b=y/kQI2POsRbZqFEFOY39SGPojPgIwUtdNMaZBnGSBZVNN4VFaoalWGKwPUt4Uo3fx+ y727A3Mj3hRZixLFK8ZS5+oQ+yfO/mXWtT/WoDUB/922Tlz1y8ZhZ4fYK0gaozUNKgx9 cWWbkpjvHGTHttRbrFiSQNzBCIk16OrHON1khy83UH6qHj3K/qGoT5yF0oBSm93hDaco 6/1h8njhHFW4c+pduUbufDVCG9pkLMBStyvYhPQIdE7Gd02ik+J7lPWdzZyu1DmCXP3Z p/iaJ195LRNGfL4JaU6g+7a6+j0+Y++rnCAQkKVDD0ElANYnb1xjq/sUZwuw7PG/gbfY fxcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zzEoKuoR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t17-20020a634451000000b00508c569c30dsi327047pgk.65.2023.03.13.13.02.40; Mon, 13 Mar 2023 13:03:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zzEoKuoR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230178AbjCMUAh (ORCPT + 99 others); Mon, 13 Mar 2023 16:00:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjCMUAR (ORCPT ); Mon, 13 Mar 2023 16:00:17 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A12A484F7C for ; Mon, 13 Mar 2023 13:00:15 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id j11so17173639lfg.13 for ; Mon, 13 Mar 2023 13:00:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678737614; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=AhUCHQPlRXS+mV3kTLelC8M+6kMoYMw8+TMBacyA8g8=; b=zzEoKuoR/hNIgJkosv298ADrIKONyEudV5DI9qd6JAQ+WE8eGpkncrxBIu12dsHK2R XaJDyGI0ccdCnHc6hBYqFOyi0m8KIDgDk5zsJ9aCkHmQ0dQBfP5H95g/tyH1Fx/XZRXo 5SQi7twyOl4vTfx0N0k98kBMTWNOfU91RsypYQrSbbPXhRsdOyoIZUR5Tf29cOi5Mv/V TOToQa9vUcsYEVZZPO1t/Y0Iylu9ZR0GUdOFsxnmQ9kZ3byJgalDDGIvs7lntLg5dBjP 7VWvJg9O3Jo3lGLt674FJmv8MllQ8Lsn9OcnveU2MhnWL8j9sFjbFQbs1Po+u2vuCe/V hZKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678737614; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AhUCHQPlRXS+mV3kTLelC8M+6kMoYMw8+TMBacyA8g8=; b=kHL+ycyVeYJLJPYxU1Z9xqiZAUzHGHvMRWu52cKyk2TCwQ6xlid3xyEgx/bwHTWhOj 4aiP9K1Khmv0Rdp8dqlYhirs44TUapi6EbbmMYiZEm3Hbwvk1s/puG0dXvA60HgLOyCX Lan3Y9GRxxIKPTc0LNx0Eg2I+RStcemNeYhNQKTAHUQACgL7EG+ebKT8yUXvPBwr5X7S nTm7DaOYJ8htfcMuxwv5fYbcakoEhwW+t32iAw6/bxWUvdSOSM9G2vpOW3yxZ7ZoNjG7 sHWjB1bdQHsZpfcsdz7OSPJTuRsO5Nrf4VUoXNZKB6Xyu1GNnuVOLNtNvsF+ZgZDg1Gk q3Uw== X-Gm-Message-State: AO0yUKUNuOFbFYP+jN+XuF7Jvych2nPJD6Z0dKZbZ0IabsQ0HYkUj7Du bYEvpG5AsWkjll7z43C6zPeieg== X-Received: by 2002:ac2:508e:0:b0:4d8:6540:a72c with SMTP id f14-20020ac2508e000000b004d86540a72cmr12057957lfm.46.1678737613957; Mon, 13 Mar 2023 13:00:13 -0700 (PDT) Received: from [192.168.1.101] (abyj16.neoplus.adsl.tpnet.pl. [83.9.29.16]) by smtp.gmail.com with ESMTPSA id w3-20020ac254a3000000b004cc800b1f2csm75431lfk.238.2023.03.13.13.00.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 13:00:13 -0700 (PDT) From: Konrad Dybcio Date: Mon, 13 Mar 2023 21:00:05 +0100 Subject: [PATCH v3 07/10] soc: qcom: rpmpd: Make bindings assignments consistent MIME-Version: 1.0 Message-Id: <20230313-topic-rpmpd-v3-7-06a4f448ff90@linaro.org> References: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> In-Reply-To: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678737603; l=6724; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=cigtUdQxgWMxGG+FwC1vw++eB/ESgbd4f6sEt5LcGTI=; b=ChyDMZdCyiyexhSKe48uXnxKCh2GvDJ9HBtqBg6GaJwL75OUzBbUtoL/aMRCODGswDXR+42aLGsa ZtUfRDVoAkGzXqxKUUnuQEhFFtTPDigIAKZQc8ZNsAzsVJtx3mGA X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_HTTP,RCVD_IN_SORBS_SOCKS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760284148144977030?= X-GMAIL-MSGID: =?utf-8?q?1760284148144977030?= 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 tab for everybody to keep things coherent. Signed-off-by: Konrad Dybcio --- drivers/soc/qcom/rpmpd.c | 118 +++++++++++++++++++++++------------------------ 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 695b2fc56f40..946630d82b3d 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -642,16 +642,16 @@ static const struct rpmpd_desc msm8996_desc = { /* msm8998 RPM Power domains */ static struct rpmpd *msm8998_rpmpds[] = { - [MSM8998_VDDCX] = &cx_rwcx0_lvl, - [MSM8998_VDDCX_AO] = &cx_rwcx0_lvl_ao, - [MSM8998_VDDCX_VFL] = &cx_rwcx0_vfl, - [MSM8998_VDDMX] = &mx_rwmx0_lvl, - [MSM8998_VDDMX_AO] = &mx_rwmx0_lvl_ao, - [MSM8998_VDDMX_VFL] = &mx_rwmx0_vfl, - [MSM8998_SSCCX] = &ssc_cx_rwsc0_lvl, - [MSM8998_SSCCX_VFL] = &ssc_cx_rwsc0_vfl, - [MSM8998_SSCMX] = &ssc_mx_rwsm0_lvl, - [MSM8998_SSCMX_VFL] = &ssc_mx_rwsm0_vfl, + [MSM8998_VDDCX] = &cx_rwcx0_lvl, + [MSM8998_VDDCX_AO] = &cx_rwcx0_lvl_ao, + [MSM8998_VDDCX_VFL] = &cx_rwcx0_vfl, + [MSM8998_VDDMX] = &mx_rwmx0_lvl, + [MSM8998_VDDMX_AO] = &mx_rwmx0_lvl_ao, + [MSM8998_VDDMX_VFL] = &mx_rwmx0_vfl, + [MSM8998_SSCCX] = &ssc_cx_rwsc0_lvl, + [MSM8998_SSCCX_VFL] = &ssc_cx_rwsc0_vfl, + [MSM8998_SSCMX] = &ssc_mx_rwsm0_lvl, + [MSM8998_SSCMX_VFL] = &ssc_mx_rwsm0_vfl, }; static const struct rpmpd_desc msm8998_desc = { @@ -662,13 +662,13 @@ static const struct rpmpd_desc msm8998_desc = { /* qcs404 RPM Power domains */ static struct rpmpd *qcs404_rpmpds[] = { - [QCS404_VDDMX] = &mx_rwmx0_lvl, - [QCS404_VDDMX_AO] = &mx_rwmx0_lvl_ao, - [QCS404_VDDMX_VFL] = &mx_rwmx0_vfl, - [QCS404_LPICX] = &lpi_cx_rwlc0_lvl, - [QCS404_LPICX_VFL] = &lpi_cx_rwlc0_vfl, - [QCS404_LPIMX] = &lpi_mx_rwlm0_lvl, - [QCS404_LPIMX_VFL] = &lpi_mx_rwlm0_vfl, + [QCS404_VDDMX] = &mx_rwmx0_lvl, + [QCS404_VDDMX_AO] = &mx_rwmx0_lvl_ao, + [QCS404_VDDMX_VFL] = &mx_rwmx0_vfl, + [QCS404_LPICX] = &lpi_cx_rwlc0_lvl, + [QCS404_LPICX_VFL] = &lpi_cx_rwlc0_vfl, + [QCS404_LPIMX] = &lpi_mx_rwlm0_lvl, + [QCS404_LPIMX_VFL] = &lpi_mx_rwlm0_vfl, }; static const struct rpmpd_desc qcs404_desc = { @@ -679,16 +679,16 @@ static const struct rpmpd_desc qcs404_desc = { /* sdm660 RPM Power domains */ static struct rpmpd *sdm660_rpmpds[] = { - [SDM660_VDDCX] = &cx_rwcx0_lvl, - [SDM660_VDDCX_AO] = &cx_rwcx0_lvl_ao, - [SDM660_VDDCX_VFL] = &cx_rwcx0_vfl, - [SDM660_VDDMX] = &mx_rwmx0_lvl, - [SDM660_VDDMX_AO] = &mx_rwmx0_lvl_ao, - [SDM660_VDDMX_VFL] = &mx_rwmx0_vfl, - [SDM660_SSCCX] = &ssc_cx_rwlc0_lvl, - [SDM660_SSCCX_VFL] = &ssc_cx_rwlc0_vfl, - [SDM660_SSCMX] = &ssc_mx_rwlm0_lvl, - [SDM660_SSCMX_VFL] = &ssc_mx_rwlm0_vfl, + [SDM660_VDDCX] = &cx_rwcx0_lvl, + [SDM660_VDDCX_AO] = &cx_rwcx0_lvl_ao, + [SDM660_VDDCX_VFL] = &cx_rwcx0_vfl, + [SDM660_VDDMX] = &mx_rwmx0_lvl, + [SDM660_VDDMX_AO] = &mx_rwmx0_lvl_ao, + [SDM660_VDDMX_VFL] = &mx_rwmx0_vfl, + [SDM660_SSCCX] = &ssc_cx_rwlc0_lvl, + [SDM660_SSCCX_VFL] = &ssc_cx_rwlc0_vfl, + [SDM660_SSCMX] = &ssc_mx_rwlm0_lvl, + [SDM660_SSCMX_VFL] = &ssc_mx_rwlm0_vfl, }; static const struct rpmpd_desc sdm660_desc = { @@ -699,14 +699,14 @@ static const struct rpmpd_desc sdm660_desc = { /* sm4250/6115 RPM Power domains */ static struct rpmpd *sm6115_rpmpds[] = { - [SM6115_VDDCX] = &cx_rwcx0_lvl, - [SM6115_VDDCX_AO] = &cx_rwcx0_lvl_ao, - [SM6115_VDDCX_VFL] = &cx_rwcx0_vfl, - [SM6115_VDDMX] = &mx_rwmx0_lvl, - [SM6115_VDDMX_AO] = &mx_rwmx0_lvl_ao, - [SM6115_VDDMX_VFL] = &mx_rwmx0_vfl, - [SM6115_VDD_LPI_CX] = &lpi_cx_rwlc0_lvl, - [SM6115_VDD_LPI_MX] = &lpi_mx_rwlm0_lvl, + [SM6115_VDDCX] = &cx_rwcx0_lvl, + [SM6115_VDDCX_AO] = &cx_rwcx0_lvl_ao, + [SM6115_VDDCX_VFL] = &cx_rwcx0_vfl, + [SM6115_VDDMX] = &mx_rwmx0_lvl, + [SM6115_VDDMX_AO] = &mx_rwmx0_lvl_ao, + [SM6115_VDDMX_VFL] = &mx_rwmx0_vfl, + [SM6115_VDD_LPI_CX] = &lpi_cx_rwlc0_lvl, + [SM6115_VDD_LPI_MX] = &lpi_mx_rwlm0_lvl, }; static const struct rpmpd_desc sm6115_desc = { @@ -717,12 +717,12 @@ static const struct rpmpd_desc sm6115_desc = { /* sm6125 RPM Power domains */ static struct rpmpd *sm6125_rpmpds[] = { - [SM6125_VDDCX] = &cx_rwcx0_lvl, - [SM6125_VDDCX_AO] = &cx_rwcx0_lvl_ao, - [SM6125_VDDCX_VFL] = &cx_rwcx0_vfl, - [SM6125_VDDMX] = &mx_rwmx0_lvl, - [SM6125_VDDMX_AO] = &mx_rwmx0_lvl_ao, - [SM6125_VDDMX_VFL] = &mx_rwmx0_vfl, + [SM6125_VDDCX] = &cx_rwcx0_lvl, + [SM6125_VDDCX_AO] = &cx_rwcx0_lvl_ao, + [SM6125_VDDCX_VFL] = &cx_rwcx0_vfl, + [SM6125_VDDMX] = &mx_rwmx0_lvl, + [SM6125_VDDMX_AO] = &mx_rwmx0_lvl_ao, + [SM6125_VDDMX_VFL] = &mx_rwmx0_vfl, }; static const struct rpmpd_desc sm6125_desc = { @@ -732,16 +732,16 @@ static const struct rpmpd_desc sm6125_desc = { }; static struct rpmpd *sm6375_rpmpds[] = { - [SM6375_VDDCX] = &cx_rwcx0_lvl, - [SM6375_VDDCX_AO] = &cx_rwcx0_lvl_ao, - [SM6375_VDDCX_VFL] = &cx_rwcx0_vfl, - [SM6375_VDDMX] = &mx_rwmx0_lvl, - [SM6375_VDDMX_AO] = &mx_rwmx0_lvl_ao, - [SM6375_VDDMX_VFL] = &mx_rwmx0_vfl, - [SM6375_VDDGX] = &gx_rwgx0_lvl, - [SM6375_VDDGX_AO] = &gx_rwgx0_lvl_ao, - [SM6375_VDD_LPI_CX] = &lpi_cx_rwlc0_lvl, - [SM6375_VDD_LPI_MX] = &lpi_mx_rwlm0_lvl, + [SM6375_VDDCX] = &cx_rwcx0_lvl, + [SM6375_VDDCX_AO] = &cx_rwcx0_lvl_ao, + [SM6375_VDDCX_VFL] = &cx_rwcx0_vfl, + [SM6375_VDDMX] = &mx_rwmx0_lvl, + [SM6375_VDDMX_AO] = &mx_rwmx0_lvl_ao, + [SM6375_VDDMX_VFL] = &mx_rwmx0_vfl, + [SM6375_VDDGX] = &gx_rwgx0_lvl, + [SM6375_VDDGX_AO] = &gx_rwgx0_lvl_ao, + [SM6375_VDD_LPI_CX] = &lpi_cx_rwlc0_lvl, + [SM6375_VDD_LPI_MX] = &lpi_mx_rwlm0_lvl, }; static const struct rpmpd_desc sm6375_desc = { @@ -751,14 +751,14 @@ static const struct rpmpd_desc sm6375_desc = { }; static struct rpmpd *qcm2290_rpmpds[] = { - [QCM2290_VDDCX] = &cx_rwcx0_lvl, - [QCM2290_VDDCX_AO] = &cx_rwcx0_lvl_ao, - [QCM2290_VDDCX_VFL] = &cx_rwcx0_vfl, - [QCM2290_VDDMX] = &mx_rwmx0_lvl, - [QCM2290_VDDMX_AO] = &mx_rwmx0_lvl_ao, - [QCM2290_VDDMX_VFL] = &mx_rwmx0_vfl, - [QCM2290_VDD_LPI_CX] = &lpi_cx_rwlc0_lvl, - [QCM2290_VDD_LPI_MX] = &lpi_mx_rwlm0_lvl, + [QCM2290_VDDCX] = &cx_rwcx0_lvl, + [QCM2290_VDDCX_AO] = &cx_rwcx0_lvl_ao, + [QCM2290_VDDCX_VFL] = &cx_rwcx0_vfl, + [QCM2290_VDDMX] = &mx_rwmx0_lvl, + [QCM2290_VDDMX_AO] = &mx_rwmx0_lvl_ao, + [QCM2290_VDDMX_VFL] = &mx_rwmx0_vfl, + [QCM2290_VDD_LPI_CX] = &lpi_cx_rwlc0_lvl, + [QCM2290_VDD_LPI_MX] = &lpi_mx_rwlm0_lvl, }; static const struct rpmpd_desc qcm2290_desc = { From patchwork Mon Mar 13 20:00:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 69079 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1379573wrd; Mon, 13 Mar 2023 13:02:16 -0700 (PDT) X-Google-Smtp-Source: AK7set9nF6URRHffHDnxe7ZXIVrm76vi7tfjQpKKI6hBGGepapfpyy85Nb3jyu9pB7z6b/elhXYx X-Received: by 2002:a62:8458:0:b0:622:feed:c36d with SMTP id k85-20020a628458000000b00622feedc36dmr7181319pfd.31.1678737735820; Mon, 13 Mar 2023 13:02:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678737735; cv=none; d=google.com; s=arc-20160816; b=Kw9TQfgldeNcE+aqP0Tz6uq4SXM9vWXjz5/FLR1AgyTaeREQZrE87FbADOzv91WYZm qZPgn4pXPJ8goWjmRYP0tOPR0retzhUBaFxFewsNkopw/Y2AgdRTMo/nnwPyxsy8Lja3 Sb6R5GzFOgfrK4UcvumjHMPGN0dNgsFBGdg7rmh9dlqWsngJB4fAb5u0ylfewSNkVAwV zsAT02xvHd0h35vE12jA1wNW4hoaWzy/w97frJFrM8O8USDzTahX8kJORbZYAsBGfSIz aJl51ljcQuFdS2vx9qlcGsitASYoMQ3NtdHcGjvqPjgw2skbVPmfGVPPKZLB9ayF/CFH mnrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=z6F/bmJ1cUx6IF880SqG09FqlJZOVgB3Ovuj7ugO+Vs=; b=tsS4iqj2AYJbwB7CKFHml2MLtZg0vRs9Qu8SL5J0e540ApYiARL3xoNz01/FhzRuwC 17kkEffTNNKgCY7dBXhCJoxDCuo89kGWvO3VBcoytYhlNz9ZdewIP1UlXTrTc6Mwdwx7 A36oUj6pQx8a4xcXBMCDxtKccSpZtSJcWq5Z5MSyH2EzkuCLluveXwf2MnbYU5aUX/rJ BSiwxCHYORZVPxOVa05hXi0hjZ0tyEqPx9Y2iohOR+12oZ8KGFZnpUX8JrUrFyVjvOy9 WRaWaBTHUm9FautBNkHKvxSzQWNrwpNma8crDhJ/v/KJ2UID6QRXliqlt7m4YwaOp+Wf tlLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pMiWfv19; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e22-20020a656896000000b00502fdc84f37si316338pgt.320.2023.03.13.13.02.00; Mon, 13 Mar 2023 13:02:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pMiWfv19; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230123AbjCMUA1 (ORCPT + 99 others); Mon, 13 Mar 2023 16:00:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230043AbjCMUAQ (ORCPT ); Mon, 13 Mar 2023 16:00:16 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 864DC84F6C for ; Mon, 13 Mar 2023 13:00:15 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id g17so17225501lfv.4 for ; Mon, 13 Mar 2023 13:00:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678737615; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=z6F/bmJ1cUx6IF880SqG09FqlJZOVgB3Ovuj7ugO+Vs=; b=pMiWfv19F7h9HQhVoDK8cSBP1pXPQIJd4D1u0KqTfCDlUAGy0seDqz8B6hke3nh0Cb ujrQDptQ/k/fwlCIz95DZPDPLZCSJ3Rcj983iRt7MSFp8KynEv01XglLF1dm/5umgwS9 6+tUfcRfM6MeqYcdiinby6Tg7xzkbYeI6Mp/uIQjgg7imKwfw3+3Z/18wEjVJBync2mi ZnuIHBJS81Gl85b3C5bQElHE816Ba4OPudlMCFY0XbbThcJXbueADbdtKp+ufWiMirKc m9XLxuYXzUYWftcTgOVSf9XyOdVbONFUd9qVtQhSS9dQaNPA+HlK4yFQaqWReM2OqRPB TvMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678737615; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z6F/bmJ1cUx6IF880SqG09FqlJZOVgB3Ovuj7ugO+Vs=; b=TUxd/2mR3DuUSxRLpgy0IUW3xNMAH+aYykbdAUDQSbMT0kGJurZGea5p7N7Z0EzExO 7Py2CNUfMdgcOXShMP2iLROpXEPRmXrbEHg54+BEtV10QbK5la/nRwoNw781OUVIe37p Ji6vtwRMeMgR+rg8+iNRdaM8xXA76VdcqnEs0mW2l5zZIhQBlTt527jyL5bG/T1n8L/p Ykt9YhD9RML41ehbvPuk8c82eJ4VpYxTIdG63UgLYQ3TKCZOO48TMh/dzEBPVVYxwLE8 YUAdl6MRR4J9Tw9vIKK5QIKPUN8Q4179ayWiN5Gush8I04lfJGXLd0JhMNO++Jb2ql96 4VpA== X-Gm-Message-State: AO0yUKWQCpUFN+P1dhsfxwEnPF+qPiIQmt+/AKNoY8t0Li84YkboznIa XWUebRz5yB9b0TJhLVmddI74SA== X-Received: by 2002:ac2:5e8e:0:b0:4b5:b87a:3262 with SMTP id b14-20020ac25e8e000000b004b5b87a3262mr9872082lfq.28.1678737614983; Mon, 13 Mar 2023 13:00:14 -0700 (PDT) Received: from [192.168.1.101] (abyj16.neoplus.adsl.tpnet.pl. [83.9.29.16]) by smtp.gmail.com with ESMTPSA id w3-20020ac254a3000000b004cc800b1f2csm75431lfk.238.2023.03.13.13.00.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 13:00:14 -0700 (PDT) From: Konrad Dybcio Date: Mon, 13 Mar 2023 21:00:06 +0100 Subject: [PATCH v3 08/10] soc: qcom: rpmpd: Add parent PD support MIME-Version: 1.0 Message-Id: <20230313-topic-rpmpd-v3-8-06a4f448ff90@linaro.org> References: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> In-Reply-To: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678737603; l=1205; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=E54ylqbifUTsLF0rt8nM3af9swKFyDMWMQVj+11edlE=; b=PyVBxMpR5FuUG+TCXn2aZnWjCe2oizVJBZPpcf9dXzmS6nZftjiaGYwhIphoTsZa9duL7qbXITU4 thd6M294ARHdlwqv0GIkw6OR3wZVM+6Zcmpjp6T9r51lGyvEVY6V X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_HTTP,RCVD_IN_SORBS_SOCKS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760284100308166715?= X-GMAIL-MSGID: =?utf-8?q?1760284100308166715?= 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 946630d82b3d..2027c820caa7 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -48,6 +48,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; @@ -969,6 +970,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 Mon Mar 13 20:00:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 69081 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1380002wrd; Mon, 13 Mar 2023 13:03:03 -0700 (PDT) X-Google-Smtp-Source: AK7set++hOBCWnB78neIhg+aHAyIdSEKplANkxM7e++wxYH0upq+lN8J5BfW3dIU5sUsc1ak9n/u X-Received: by 2002:a17:902:7798:b0:19c:bcb1:d8c3 with SMTP id o24-20020a170902779800b0019cbcb1d8c3mr29627029pll.54.1678737783501; Mon, 13 Mar 2023 13:03:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678737783; cv=none; d=google.com; s=arc-20160816; b=Al5cTIUS46JoD46ZFWoQVkSgj1YxZrA59KdpA6relRvOGi1hgbi5EiRERo92iks14I h7PKeR5wfBIhaUzmfT3LzPOJDwkxXunaq+gm6nD6/boB16TMEcG44HFnhopHa7MXPfrM 6IVEb57NDFXVtjTmOc5of60K3IN81nHCqNLxghRDblc+NkNy3GI8QsCsDn7UVlicCEwG t5lSCtF+Dfm2nQSUpdim7JdzJe6O0VbS50kWZI6YIkeWVp6VOYaCVmoa2iubfdbJODZc L4YfvTakqqjfqjFAlJJbNfdjAREl8qif/HypZBnXFtuFWIRy+gok/Io8NNDx9qL8Mew+ 0klA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=eKRFyo+3tUDJl078WQAs1jDYE+5yKAitEL5AqqGitxE=; b=X3kOGA2hSI9/0/KDb/vV1XrigM2Zw7NS3Dl9jkcWhq45U5gWrv5vR9QZjBwZ4wkntw kCs+nB4wU6UM3SYAcmdqU3HcV5A3Xy48bSZ936+5R5lktprXpWVWprbRk6LYlMiveI59 slkANN92zUZoLyXkrmjd2cxujDU9JnQDBXESOjS3ISTpgxheFziy/5f/zuj07uyylh0n Erm6d6Qm8f0SVN97pZjCVGHRe3YvRYHyh4PeCYZYB8UBHiXPLnLf/MVFJxnFMsR56jYq 8Mq5+UFMeonPlzq2wlQoSr/3KMhn5UdVodiVvzB2Dg4o4+W5zwnGs0zwcouT+TrSws8P 1oaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hSelPAHx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v3-20020a1709029a0300b0019ca7a76d68si535836plp.67.2023.03.13.13.02.48; Mon, 13 Mar 2023 13:03:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hSelPAHx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230188AbjCMUAm (ORCPT + 99 others); Mon, 13 Mar 2023 16:00:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230075AbjCMUAR (ORCPT ); Mon, 13 Mar 2023 16:00:17 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7846E85687 for ; Mon, 13 Mar 2023 13:00:16 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id m4so4202810lfj.2 for ; Mon, 13 Mar 2023 13:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678737616; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=eKRFyo+3tUDJl078WQAs1jDYE+5yKAitEL5AqqGitxE=; b=hSelPAHxpuoqcifLAGoo/UbDnao9OLL/7/IY6DAbGJgrpoE2wgBaOEqEaR5sCHH858 BWK9aNOzTc4mk1MtrSOIZRHRGl6muUn3ZAqIZtgu0ercSb4eGzZ26uaLrNPUTnoT2nrY WuRsjiG1ezioTtwrNncNl4RilDnxM5Pd1UrPv7PP8+EVt/RqjX3xUs4iWPzb7/nzyHmP igmCe8wtMij2o4kOIJag6wOvDJ/hBbUcy53IcNFSRy8X+Uyk9A3u6Nfu8bVUXUPE5uMN Y5uftizgs4Rx2MyihNjSacn5DhyuXEPOJfOOA07hXvKV7QvZSrYTOssGT063Q4qpI+Sj 6nGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678737616; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eKRFyo+3tUDJl078WQAs1jDYE+5yKAitEL5AqqGitxE=; b=t0RR9LZdYahsligz5CETCyhOoIGhl4DiA2ufWFbQ0grLGS4UqMbEyWeTCQxcj3PQaa UAt05bVNMM03Hgaobg/IgqexYixqAzr6t3St6cpCBiguKkySa9okZIM+HRJoDVpAkL3w +fllynlvpRa7wiHuvjTppDFvZKh+ug/52/LF9pGJEBS60qt74xSpug6WjCCzQ90nRSRG 2N7syHMn3JpmV7V3Gbk3Wn/RON/wrNsVHeUzEGGowisVEnXVRswKsJhw68EkGB72+T+5 uK4ZnAF5Oq0CmKW5mzPolXi1Pkmx6bv3HTk2nGO1pYt03O4DoEuBSFENocoxZdRBLXOy +Onw== X-Gm-Message-State: AO0yUKVkhHHDDLwNkN2leSTZr9dK+p6GNJlx5MBaRHR12Kyv4I66yhVM XmToIRKuPOR8D3UGOiTyUpbS0g== X-Received: by 2002:ac2:5ecc:0:b0:4e6:dda2:6ad2 with SMTP id d12-20020ac25ecc000000b004e6dda26ad2mr10289972lfq.10.1678737615981; Mon, 13 Mar 2023 13:00:15 -0700 (PDT) Received: from [192.168.1.101] (abyj16.neoplus.adsl.tpnet.pl. [83.9.29.16]) by smtp.gmail.com with ESMTPSA id w3-20020ac254a3000000b004cc800b1f2csm75431lfk.238.2023.03.13.13.00.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 13:00:15 -0700 (PDT) From: Konrad Dybcio Date: Mon, 13 Mar 2023 21:00:07 +0100 Subject: [PATCH v3 09/10] soc: qcom: rpmpd: Hook up VDDMX as parent of SM6375 VDDGX MIME-Version: 1.0 Message-Id: <20230313-topic-rpmpd-v3-9-06a4f448ff90@linaro.org> References: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> In-Reply-To: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Dmitry Baryshkov X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678737603; l=1248; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=CcBS01tg5B460uCkFw0c4heaZXq5eBGUm2vrxphKyOs=; b=mPrmyxv3rmOSJKoWf04mOJAlSW9vxfOmnZ6lrHG3ULehtA8RbqVB63EAD03Z0CkNA+1/okPuFvn+ 3Jg9BeONCLIEyJjuXMKsVUosBZOoACI4pkvLjJlbEbv1qXqSPuwl X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_HTTP,RCVD_IN_SORBS_SOCKS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760284150324572266?= X-GMAIL-MSGID: =?utf-8?q?1760284150324572266?= 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 Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio --- drivers/soc/qcom/rpmpd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 2027c820caa7..84283719853c 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -216,18 +216,22 @@ static struct rpmpd gfx_s2b_vfc = { .key = KEY_FLOOR_CORNER, }; +static struct rpmpd mx_rwmx0_lvl; static struct rpmpd gx_rwgx0_lvl_ao; static struct rpmpd gx_rwgx0_lvl = { .pd = { .name = "gx", }, .peer = &gx_rwgx0_lvl_ao, .res_type = RPMPD_RWGX, + .parent = &mx_rwmx0_lvl.pd, .res_id = 0, .key = KEY_LEVEL, }; +static struct rpmpd mx_rwmx0_lvl_ao; static struct rpmpd gx_rwgx0_lvl_ao = { .pd = { .name = "gx_ao", }, .peer = &gx_rwgx0_lvl, + .parent = &mx_rwmx0_lvl_ao.pd, .active_only = true, .res_type = RPMPD_RWGX, .res_id = 0, From patchwork Mon Mar 13 20:00:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 69082 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1380464wrd; Mon, 13 Mar 2023 13:03:55 -0700 (PDT) X-Google-Smtp-Source: AK7set+Va6XuXifaRZgEq1woPqnKhaAN5BN2CAhGPfYwFkszPBcdRdEKetIKKQsDpj3eoQrVw1ON X-Received: by 2002:a17:902:d4cd:b0:19f:188c:3e34 with SMTP id o13-20020a170902d4cd00b0019f188c3e34mr11751706plg.53.1678737835482; Mon, 13 Mar 2023 13:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678737835; cv=none; d=google.com; s=arc-20160816; b=N+C1Yh+FqQm62Wb44U4jVHVgiV+TVC2jBQXLqyKPLgnkhfLsegVSb98ADP1PEsp03c w3rcD04Gdu8H0GYpKE5ThQkQW/c+5i843DJsTsZOGjaLWpNULQswVtN9YVG776teoJrl EhmQTbn9oJYRs3Bcp+J57rHe3ZdElEnV9IcyMKbN8BXAjTyLOfkoCH9GVjU9Z4Ea3pL1 d9SKhif4GCNj+W2EvAPOHoIsg/ScW2wE3htNeKJJDNAV+W6gcd7Dp8h7/P8AeEg42NZs RpPHyNT6ITDtn+Pjit8HKZqNTTUPe/MsNn4N0Cw7DRCpFxPziviSCQotePLtrdKr9mxU FIXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=pPJGmyWSQOR8Kw09B8Mt5WVgya5iFa+bc4j8CO+ggz0=; b=aWjflM/BIbvLo5VZF3acUXEA8q2L1Ll2hjNjnr0PJZMrr8pYKFxueET5hYHHHTIcDY 9Yo3Mlv0P5E5yAWi7e8TQ6LFsDORb5Dkiat99bsKYFnyf6vxxJwGzYkAV/q7GB3ln3M3 y5gE0/t+54zXQTrsdBUtEfI631as5BwdcWQyzjCcZ2P11a/ZXyQpuwqOr4xQwVAfh7Ak 3XevyHeQM0VGyI6ozuR8q5rjlivluHgNEt8JfXTrDwKT1AAGIsW34e9NWPL3XoPf+UwK fbNLEv+TeLpLQ9S1kqipiPc4XjGm8vkMzS00mQV4wHjPWxLsvhwMpofo8zroV5DxpMyA zICg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mvShdL4y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t1-20020a170902e84100b0019272f2ecc3si540826plg.369.2023.03.13.13.03.40; Mon, 13 Mar 2023 13:03:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mvShdL4y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230152AbjCMUAv (ORCPT + 99 others); Mon, 13 Mar 2023 16:00:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230087AbjCMUAS (ORCPT ); Mon, 13 Mar 2023 16:00:18 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E3B5848ED for ; Mon, 13 Mar 2023 13:00:17 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id s22so17198068lfi.9 for ; Mon, 13 Mar 2023 13:00:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678737617; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=pPJGmyWSQOR8Kw09B8Mt5WVgya5iFa+bc4j8CO+ggz0=; b=mvShdL4yBYq3XhrQ/GdtbIB+BcS1zqacbkjifgw2EkH2AFU22aywn6htkZqlw9UwGN ufIAkuvRXx3Jj2gC77V+imQ3c7RIYzOYMHGJaF4Y/DATt/T2+LPTNsPHSNo3nUH8P4Yr MacCYhvmwetNm2ok8IpSA8kyBDL2gzfSsFq1Ok/C31y871Waj58qoDpXuS4Sz1+ovhv6 Ns/D92cZK3EcHwXXTj5kg+dAZ3312r6+K7AkZ+eej7+w3Q41qIcZ9+JqfvuA4CrFDqEY YFFJ36O4axm0tJEMbYn8iOQCtx5LefMMQYPvrvJknb7FzUiqJIszpMDEHu4sn19BHkxf bI0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678737617; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pPJGmyWSQOR8Kw09B8Mt5WVgya5iFa+bc4j8CO+ggz0=; b=DkXK+gTDg0imjitd/Emn7+MRevBGc/wXG8V367RHvrtqmmoBSBWmcgyqLaRp5CifvY 7CcMP4B7RyqLUhrBoMwdQKr9EBPnrQj5naXYXagtWjzTdpAG1wDERBdR2z4ljXfc+zZl KFxAczYkSbWtLsFo/XUiCWIth2GpcFYMMYDSnZXvCrmn9yVaw16vOyjiOwRj/vrd7iq5 u6fgF/KLXU04mVXB8v7qenFJIVPVI97/2wuRYSWAK59vfsEveNqgNUQN6OLXpMWzAKlB AneaixPKl7uGQmcY9tGKUvkrAG9XFXT2V8o00ewaQ/KRWKRZJPhyhGHiz4oq5gZ29Dtb 2QFA== X-Gm-Message-State: AO0yUKWbkj/3Q6RWtyofafr/RxF3bhRf18wEkYBXemFRuk8rXLMDuZXX qmyTdondGF3RL4iQ4ktBesQGFQ== X-Received: by 2002:a19:7516:0:b0:4dc:8215:5531 with SMTP id y22-20020a197516000000b004dc82155531mr10488291lfe.6.1678737617071; Mon, 13 Mar 2023 13:00:17 -0700 (PDT) Received: from [192.168.1.101] (abyj16.neoplus.adsl.tpnet.pl. [83.9.29.16]) by smtp.gmail.com with ESMTPSA id w3-20020ac254a3000000b004cc800b1f2csm75431lfk.238.2023.03.13.13.00.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 13:00:16 -0700 (PDT) From: Konrad Dybcio Date: Mon, 13 Mar 2023 21:00:08 +0100 Subject: [PATCH v3 10/10] soc: qcom: rpmpd: Remove useless comments MIME-Version: 1.0 Message-Id: <20230313-topic-rpmpd-v3-10-06a4f448ff90@linaro.org> References: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> In-Reply-To: <20230313-topic-rpmpd-v3-0-06a4f448ff90@linaro.org> To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678737603; l=3977; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=bOHyvIQlgUtTwAbq7sTRhqnwQEdIyL2gK1RO1F45Xro=; b=W4lHZVIWj64yHXpeNN4lxidb0hTaZz7y23XGHt7ll/VMQk+KxQB8/RcsngW0CcjspDzIe2auTizT d4Eai3dRD5tWVpBbN8RDD6J96WLtiOHy71Xw70wl/G8ihk4ds/F2 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_HTTP,RCVD_IN_SORBS_SOCKS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760284204566801271?= X-GMAIL-MSGID: =?utf-8?q?1760284204566801271?= 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 84283719853c..f8397dcb146c 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -514,7 +514,6 @@ static struct rpmpd ssc_mx_rwsm0_vfl = { .key = KEY_FLOOR_LEVEL, }; -/* mdm9607 RPM Power Domains */ static struct rpmpd *mdm9607_rpmpds[] = { [MDM9607_VDDCX] = &cx_s3a_lvl, [MDM9607_VDDCX_AO] = &cx_s3a_lvl_ao, @@ -530,7 +529,6 @@ static const struct rpmpd_desc mdm9607_desc = { .max_state = RPM_SMD_LEVEL_TURBO, }; -/* msm8226 RPM Power Domains */ static struct rpmpd *msm8226_rpmpds[] = { [MSM8226_VDDCX] = &cx_s1a_corner, [MSM8226_VDDCX_AO] = &cx_s1a_corner_ao, @@ -543,7 +541,6 @@ static const struct rpmpd_desc msm8226_desc = { .max_state = MAX_CORNER_RPMPD_STATE, }; -/* msm8939 RPM Power Domains */ static struct rpmpd *msm8939_rpmpds[] = { [MSM8939_VDDMDCX] = &md_s1a_corner, [MSM8939_VDDMDCX_AO] = &md_s1a_corner_ao, @@ -561,7 +558,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, @@ -576,7 +572,6 @@ static const struct rpmpd_desc msm8916_desc = { .max_state = MAX_CORNER_RPMPD_STATE, }; -/* msm8953 RPM Power Domains */ static struct rpmpd *msm8953_rpmpds[] = { [MSM8953_VDDMD] = &md_s1a_lvl, [MSM8953_VDDMD_AO] = &md_s1a_lvl_ao, @@ -593,7 +588,6 @@ static const struct rpmpd_desc msm8953_desc = { .max_state = RPM_SMD_LEVEL_TURBO, }; -/* msm8976 RPM Power Domains */ static struct rpmpd *msm8976_rpmpds[] = { [MSM8976_VDDCX] = &cx_s2a_lvl, [MSM8976_VDDCX_AO] = &cx_s2a_lvl_ao, @@ -609,7 +603,6 @@ static const struct rpmpd_desc msm8976_desc = { .max_state = RPM_SMD_LEVEL_TURBO_HIGH, }; -/* msm8994 RPM Power domains */ static struct rpmpd *msm8994_rpmpds[] = { [MSM8994_VDDCX] = &cx_s1a_corner, [MSM8994_VDDCX_AO] = &cx_s1a_corner_ao, @@ -628,7 +621,6 @@ static const struct rpmpd_desc msm8994_desc = { .max_state = MAX_CORNER_RPMPD_STATE, }; -/* msm8996 RPM Power domains */ static struct rpmpd *msm8996_rpmpds[] = { [MSM8996_VDDCX] = &cx_s1a_corner, [MSM8996_VDDCX_AO] = &cx_s1a_corner_ao, @@ -645,7 +637,6 @@ static const struct rpmpd_desc msm8996_desc = { .max_state = MAX_CORNER_RPMPD_STATE, }; -/* msm8998 RPM Power domains */ static struct rpmpd *msm8998_rpmpds[] = { [MSM8998_VDDCX] = &cx_rwcx0_lvl, [MSM8998_VDDCX_AO] = &cx_rwcx0_lvl_ao, @@ -665,7 +656,6 @@ static const struct rpmpd_desc msm8998_desc = { .max_state = RPM_SMD_LEVEL_BINNING, }; -/* qcs404 RPM Power domains */ static struct rpmpd *qcs404_rpmpds[] = { [QCS404_VDDMX] = &mx_rwmx0_lvl, [QCS404_VDDMX_AO] = &mx_rwmx0_lvl_ao, @@ -682,7 +672,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] = &cx_rwcx0_lvl, [SDM660_VDDCX_AO] = &cx_rwcx0_lvl_ao, @@ -702,7 +691,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] = &cx_rwcx0_lvl, [SM6115_VDDCX_AO] = &cx_rwcx0_lvl_ao, @@ -720,7 +708,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] = &cx_rwcx0_lvl, [SM6125_VDDCX_AO] = &cx_rwcx0_lvl_ao,