From patchwork Mon Feb 13 14:35:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 56315 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2383209wrn; Mon, 13 Feb 2023 06:44:05 -0800 (PST) X-Google-Smtp-Source: AK7set/XiVBjpDT/x6d6xm6MmP1Z5kkFswQQC5jAp2ROpeUcoWXvuSDIqUCz0bpze2OsnE7b7/xN X-Received: by 2002:a17:907:6d05:b0:880:3129:d84a with SMTP id sa5-20020a1709076d0500b008803129d84amr33187936ejc.60.1676299445190; Mon, 13 Feb 2023 06:44:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676299445; cv=none; d=google.com; s=arc-20160816; b=hj3T1AsmvsCeqgJoHLyhOWS2rxaz58Mm7JbDoGkgfvMJJeX/JWqypFj+kvr3FUOgRQ AM5+YQXo56ar9N71xV55ebB4EoE6ZJDBLbFUL+SgfxiWtItIbxW0wYXnbmX3buuSF9xj Gk060dzk9F3LKQmR7EDhPyp45j3B+gSJ8vMnI1UMhzwpG5Gf4TgkiGn0Ws1I0ZqJCGCt IztbTBfeCfmkW52HJpVOxtGEoNcI0dezZxi54btQbnSUIq6qFDYMIseTv+7SneyBr2YA Ck0cLS4dsitWM7v1k9WxG7MooppXBODF/3HhD9DeO+wduM7+gJcNqt4Z841x0xS5hOw4 T7nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=y99UavQ24X32/XC08lGHSHxla8tRJhstk+ojmM0a12E=; b=Vvoprsr55nMIYM/wpsyvvJ7bZ5wAe177vZAibLmuPI9F6Otc9byxy50QEf70bIdNVC SZx6FoYSyLFXp0C/tKrZiJ2HD6uCP0md6dYxAmYeqtwOW2GErg84xgqM3HIfuQ/ayXou CqzSnxKZwL8NiElvkWJSTYMx19IAhJPict5EDFOFf5l5lutIDx2too0kI38fa7woDRek dfccKh7En8rAVvi0gFRCACQloPfzctyIfpPc01EdmaZdUrxiVukleP51brgvQ2icGzpQ UfEc7VfZXWJmN6PMfHkBWYFzhnv3FhhCpwB/JcWBR4YjkxB6kLVZTo3mvEdS0cpkx5Tf a5iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Oi9yP8WE; 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 fn18-20020a1709069d1200b008905589a3c4si12437712ejc.754.2023.02.13.06.43.42; Mon, 13 Feb 2023 06:44:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Oi9yP8WE; 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 S229873AbjBMOfg (ORCPT + 99 others); Mon, 13 Feb 2023 09:35:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229736AbjBMOfe (ORCPT ); Mon, 13 Feb 2023 09:35:34 -0500 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84CA615C96 for ; Mon, 13 Feb 2023 06:35:33 -0800 (PST) Received: by mail-ej1-x62f.google.com with SMTP id qb15so30308878ejc.1 for ; Mon, 13 Feb 2023 06:35:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=y99UavQ24X32/XC08lGHSHxla8tRJhstk+ojmM0a12E=; b=Oi9yP8WEKbaV+Z69Zfh2AKdKTBpiFqhda8+MOusWZPUhm7pGGwrnAbKFjiAZOw4Y0o tjFK5aKZmQyZguCzz0cgU7gGh7HeUBWv/yuro7H1nqfcjKqOPSqOc1YBzCORsemckeEf 3Wz56xnKU9/KnEeUycoDl5GktocPcrKH2w5seUZAw3S09nxbddu8HrBCqPlTt9+6RxA/ RLvM+qLSUVdf8N8PzVFVWqX5nb9dYvEXdCGidEBR9mxcCiUSu5k+6p9UTrnZlgDPcFlO FqyDHGUw7F+KVaK376YdX+40Apf0seNWW7F3UFc/Dp0C9j3ZKAYfnEKu7NePwJSktA7x Sg3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y99UavQ24X32/XC08lGHSHxla8tRJhstk+ojmM0a12E=; b=5hj5z5Nc4edYOF2pL36i8eP+rKY6tCDDP+NY1UCcBfDnjdEL9cOPu6Xg/o0hKUCCtB 1kaiSrB2iUzLx9movvK2DlCELRXnzkPapsBIeka4rrx0pLmojayM6P5/3a5N50JL+WxV v9Hl/WCPV40N1khpZrNft9IHUIkfaryobIqd9vwtY/teruCh0NyJBfn1v//0OEKdRlYS +ZiNAtKSbb7PUPShnaJMPEJ8sDoPvDHgJsgJ9DOWocIVMRFOsuwEFyqHqboVmkpK7O9s 2TZrtPuPRUjvHNt7gb8KANJZwEvft/yS6EbM/rPoWymiNdVtu/NKBPVRiUbdCQNy3ppy cOdg== X-Gm-Message-State: AO0yUKWtCOWb2ZupDxdLN/xdaegk4ilu2twZs6dvoaANEyZAP6xJRDYv xItkdnqWUFlpVGIRDeu4JNU4TA== X-Received: by 2002:a17:906:651:b0:88e:e498:109b with SMTP id t17-20020a170906065100b0088ee498109bmr23969909ejb.5.1676298932115; Mon, 13 Feb 2023 06:35:32 -0800 (PST) Received: from localhost.localdomain (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id uz6-20020a170907118600b0088a2397cb2csm6927186ejb.143.2023.02.13.06.35.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 06:35:31 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/9] soc: qcom: rpmpd: Bring all definitions to the top Date: Mon, 13 Feb 2023 15:35:16 +0100 Message-Id: <20230213143524.1943754-2-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213143524.1943754-1-konrad.dybcio@linaro.org> References: <20230213143524.1943754-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757727366978722236?= X-GMAIL-MSGID: =?utf-8?q?1757727366978722236?= 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 Feb 13 14:35:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 56312 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2382929wrn; Mon, 13 Feb 2023 06:43:34 -0800 (PST) X-Google-Smtp-Source: AK7set8gp6r4f1uS5enaayLomHCxEZwSfEF+lN+R4yoHG1ZLjtUXv6FyvKgYhWngPW2NkfYoj30C X-Received: by 2002:a17:90b:1c8f:b0:230:a772:e45d with SMTP id oo15-20020a17090b1c8f00b00230a772e45dmr26477225pjb.36.1676299413889; Mon, 13 Feb 2023 06:43:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676299413; cv=none; d=google.com; s=arc-20160816; b=lQejPuydLE3jqZWnIX1s/qcuGdzJOjdwSor9ISwCxrSaKJ1ffzQbeLuArKarQ7QOV2 Ni+m+4zoGqClg23ifBOY/cD1um66GY8jqb87XDtIb7djRafKpxjeFJ715wl+LJlk6Hyw wUKnUox3sIK/vWyPDd56I9i0kjhV1KFb1o9PHYq4UpWuLsJMwrbQZzx5LwGc78rEFO2T kMDlO89AVaZgccNHO/ZJSiObvW+X0tEX0s49naUdgVrbop2YF5+hOaYbkODncQqA4aWB lg6+VkWECt73nOElEPrBUbK44CnQJ6FhGxkeeMlgaWBBhFaSopFzCDUjAynZtCVScgqW z/9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cKhIhUE0oR3+5sylAoN6LZ0U0hIcCp0rLf+O/bLFT0w=; b=DrVJPd6v1uCuFjAuvn2/KK6uy1Hn2HLRbqQtLQCC+TWdAdbAV6phtNInzsb979/PB+ QBtWGPf0zoB35RYwod6uWRXzqTNetqL80Bl5nwYSCoWcCxvNG5qRswKuYEDJtr0Ru4XJ 3fuLlWHR0GivZj9i6J34/s1GtgB5Q5y8Odb5jjbeL1Q+iClG984akrRgiCYqo+BTls8P DIMnBP2Bb9MOOM/9Plx7uYzBfEhzW2miEpsqaNW8x1h3fSNYexHettcQeOPCatgpKl1y gB/eF9ua4AaK16yKfLm9J1t8rxbe1yosc9jhK8E5YeQZpi5GwycpF1jU5dYQKEIDrY2M Z9Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aWMe155A; 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 e2-20020a637442000000b004e018302ac3si4580790pgn.612.2023.02.13.06.43.21; Mon, 13 Feb 2023 06:43:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aWMe155A; 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 S229631AbjBMOfi (ORCPT + 99 others); Mon, 13 Feb 2023 09:35:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229946AbjBMOff (ORCPT ); Mon, 13 Feb 2023 09:35:35 -0500 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF8331554C for ; Mon, 13 Feb 2023 06:35:34 -0800 (PST) Received: by mail-ej1-x62f.google.com with SMTP id rp23so32343285ejb.7 for ; Mon, 13 Feb 2023 06:35:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cKhIhUE0oR3+5sylAoN6LZ0U0hIcCp0rLf+O/bLFT0w=; b=aWMe155AwRogZuqhwLJmxHXC4Nmo0Tm4sZHSxaz1jbsMfy+B637D4oZy/5+K88dXVt TusFncqgjzE1OBU3OJGB1t3OZ3iBenVXt2JH0X4qlx218FAVQMWhhIWWKUlq76030LM/ Q1z8r8AdV6woiRcLB/0Jum2YgC1c29NyNuEcRsLzt26CR56tlAxaDyptahWSKy86c0m3 5BQECANonPgGaIHYAQ2t7KpiHBrW/GuZU9eJi1xY3Ot5c89jJWLaCS+FSBxFoAi8Gtye l0iRfOJ3e3A9aYV7QUqwb5ukxJ8OA9bREV3OUcRhTP1FrgAcOeEuhBvHbZvGP/GZOJdU Gqzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cKhIhUE0oR3+5sylAoN6LZ0U0hIcCp0rLf+O/bLFT0w=; b=UaAD/V0NVlfWsansN053GEFX1VFxrsgNKWF5kP3p2pMQzl0bs4u6f6fEbf4C4qkt5R 7gQRa5yIjFSQz8YGJtCnkllSiV5+P6ZHbiAH9d5Ecwm3Jp6wXbY/W0E/whgzyhZLaw8N MYp8NwPw458mRVlfzYKjuqbNqmM+ZqZIeYqihqoDRtP7bQWOCFeLwY1+qtjtkNFaTbjP WboRKj3kcRH/WVgQ+thCu1eOoj60q1ylQvN0EkWrFz6z0wgc7qR7SUmpsz0tor+IuQtN 70JoLlb5jWzfiX1a1da+Icr0PGUH8yxVifWoJksMZYRBenX2fvmBIPvt7syWVJlSGGr3 IYEQ== X-Gm-Message-State: AO0yUKV11Y0MR6MYJkXpyJOKTKP2H64qx2B4NrSvS81pH61SQYAby6yD ajRbStCdczGfMzbEfLs+AFJ72w== X-Received: by 2002:a17:907:a420:b0:8b0:f58d:2da9 with SMTP id sg32-20020a170907a42000b008b0f58d2da9mr6900524ejc.64.1676298933332; Mon, 13 Feb 2023 06:35:33 -0800 (PST) Received: from localhost.localdomain (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id uz6-20020a170907118600b0088a2397cb2csm6927186ejb.143.2023.02.13.06.35.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 06:35:33 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , linux-kernel@vger.kernel.org Subject: [PATCH v2 2/9] soc: qcom: rpmpd: Unify Low Power Island definitions Date: Mon, 13 Feb 2023 15:35:17 +0100 Message-Id: <20230213143524.1943754-3-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213143524.1943754-1-konrad.dybcio@linaro.org> References: <20230213143524.1943754-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757727333977569176?= X-GMAIL-MSGID: =?utf-8?q?1757727333977569176?= 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 Feb 13 14:35:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 56313 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2382941wrn; Mon, 13 Feb 2023 06:43:35 -0800 (PST) X-Google-Smtp-Source: AK7set+dv8KCrFj+sR68g4sVYi7l81PRktYZzpZFjCjwd5l6XgNMUrzsRzoXGlpacl8nfA4soppL X-Received: by 2002:a17:902:f2cc:b0:19a:9705:645d with SMTP id h12-20020a170902f2cc00b0019a9705645dmr4623508plc.36.1676299415118; Mon, 13 Feb 2023 06:43:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676299415; cv=none; d=google.com; s=arc-20160816; b=ogKDJ6se6ix0cM8rjxZOkXI55M0v9DqsGNFuDHCPmQbTG9WAp1vCeKbACfA8VkyS9R GRXFIXlJLWVfXIXh4maB/G2/pJrD99uggKbJ6gxZbW+MZrQN0FiJm1Frx2Q0zjbviPq9 Ge83JcfE65E7rIfZJJaTQjB5WcbwKId/VZiVwCdTy2T8n8mp0m5cN6DHt7yJDzD7IoA0 kYQRJZyOnBmPfztytdyW1CMav93w8lZilIzwKvxUyguaf/CfTNW2ukj3kHxOsVjg3o+a pRvnxOh4NcGDSDwFXFGpa9Uipq8/J2k+Ju3iYWcIR5cwMPHgThd5Osr9XTZUgMZZefhk 3Ufg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nYUpm8s83j1JMaoZia8U7rv3a45sUyCaItwBMtwXK9M=; b=Owj5TJU92eH1MNi8/xRLTi6SNX29O4oMBqcQDz6oQ6OIOl1kkKO5R2obYdCKa8BiHJ pqFSSW1bDvftrrfwESf7nIpLfwyKya6N1kpXV/w6FEcbyEFL6Cvu8F20CzQJ5Ap4DsZQ elIlvhx1bvXxM3eJgHFmuLevBEKNUcK/ui2J2nf9KJpy6wLj+DzoVcka3wBHy5PCttl5 YbQSIpabHZ4fx6yc/Qhhzu3vPW/9VUrXpQ8mAA69Dp8oqYrU7vZEhbDQVhD37mSV5YQH cZCtO2Ug3/wqCIYeyprANYbHov53FUVBavO5DmhSu9FSjNDHEhGvQCB4pOmpgciEOlDm yAAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cpRqo80m; 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 z8-20020a1709027e8800b0019a66d00e3csi10983562pla.553.2023.02.13.06.43.22; Mon, 13 Feb 2023 06:43:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cpRqo80m; 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 S230118AbjBMOfl (ORCPT + 99 others); Mon, 13 Feb 2023 09:35:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229705AbjBMOfi (ORCPT ); Mon, 13 Feb 2023 09:35:38 -0500 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 414DA1554C for ; Mon, 13 Feb 2023 06:35:36 -0800 (PST) Received: by mail-ej1-x635.google.com with SMTP id rp23so32343475ejb.7 for ; Mon, 13 Feb 2023 06:35:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nYUpm8s83j1JMaoZia8U7rv3a45sUyCaItwBMtwXK9M=; b=cpRqo80mG1G4dLySDQwRWh7OJaCW0p6ju2kwHDt9svwHb2lbuTykFovjo53rxe9fPi QVEqW/3kmk7p9EX2zi0t2gBGyp302YfJTQWv9h4o1EZT7l7niUp8/cMPd3VPNeo+Xfx/ LyOSN5UIJyk6O+dWQ7Jwpuow/kuB7dmKhadZXRo/WDM3q9KjMqGtAQeWa+EwVqWyCnlW 4wAVTV/W3RNqDuDemcSxYNFCp+0Z0lqq8PboUKkYnMozcXI94xkAGkOWsbr0KLousSNd aTqv5loS8MdDcwWXgQckRsMGDAlOCGGB++w/hYkYaZVYWmoQRnwAA7APnwC/nnWZ4Sje R+tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nYUpm8s83j1JMaoZia8U7rv3a45sUyCaItwBMtwXK9M=; b=ABPvvpBepCmh2uHWWifFqAyaGld7NZknLbd8YqCCltN3j4eIv9lMK91ekbjJL9P0/J GNGxsFIF6eEL+5WclbmJskMlz/Zmfl6e7vxsYFUB/ZOMqWhfSJ3In68V+BCkwRGRCL8L C1efcjS0aVWLykAwN5b5nZxCezGMhT5yD2jfGN8Bbnbaf6IFkxL2UvXIUzZgxzZ44CA3 HjcZRfmtpfeD9zrOgpgwHT3lyyMLg2CcVA5WywvV6jX6NlQ8+lDTbLAq1dC50/vfOhSl ivHkMExEI8VI7H0EIQ7+GgF6WiEUgo8u8wXf0EWb7LzlTZSRQpkiAjkY1m9ZT02LdVwF b+TQ== X-Gm-Message-State: AO0yUKV9b9s/UVPa/8HPWZJQhNVp8A7N+Hg4IF5cZZAOSRKxhbx2OhTI 3H7ISaSTRl5teuYaA03RDR20UQ== X-Received: by 2002:a17:907:2da6:b0:8ae:f73e:233f with SMTP id gt38-20020a1709072da600b008aef73e233fmr25183429ejc.32.1676298934778; Mon, 13 Feb 2023 06:35:34 -0800 (PST) Received: from localhost.localdomain (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id uz6-20020a170907118600b0088a2397cb2csm6927186ejb.143.2023.02.13.06.35.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 06:35:34 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , linux-kernel@vger.kernel.org Subject: [PATCH v2 3/9] soc: qcom: rpmpd: Remove vdd* from struct names Date: Mon, 13 Feb 2023 15:35:18 +0100 Message-Id: <20230213143524.1943754-4-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213143524.1943754-1-konrad.dybcio@linaro.org> References: <20230213143524.1943754-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757727335601292629?= X-GMAIL-MSGID: =?utf-8?q?1757727335601292629?= 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 Feb 13 14:35:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 56316 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2383216wrn; Mon, 13 Feb 2023 06:44:06 -0800 (PST) X-Google-Smtp-Source: AK7set/PONaEn2F4OpCwZHdm/w1qUwqDpC9aVGgjUWRf3aDWiOW+RF3cwFTwsTdjyfydJ3r+7jia X-Received: by 2002:a17:906:2dc1:b0:884:fd73:8053 with SMTP id h1-20020a1709062dc100b00884fd738053mr26468525eji.9.1676299446363; Mon, 13 Feb 2023 06:44:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676299446; cv=none; d=google.com; s=arc-20160816; b=PSq9vVg21mmmWVlXK4SDtDo67/4dS8BWnoPYIAvTWUpnAMXV/EbQYv8QeZzxyV5OGz SFwD4GD+1ZTJSezv05Iv6+TqUW/VK464CekfInbmcYWJzSyhE1ll9W3mWkwCuMhMViQj wA18+5s6AD/s6Ym0ru5bdCOXerNki2xylFSVieg62yH3See2jH9yxckGIDOxilTM4Y7H emRImRxZzsEJoeAzxkDWzXrRTxiyapUrQo6ISn0Px6btiJdOflg+GUqI5I5c7LyfHuCI q2g8ZKWrcrdZkA320B/6IF/MF1mvEEJg/GaBmqUxX6hI8OLVvVxX3vxuuG21y7gBsaRA +KcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=v1AUm79K5qRxcoKaBb2AFl12FqpHDk2GXzyUEMzaXfs=; b=in+Mc6b9YLX1PoGRBooz1X0UH+mKxMgp3xk6UJwWzzX0aeabE1teINM5nyHrEEuudV 4QOAT5gl+P7pVQRZmw1bZsazNKXIDcfHCa5cDeGRqBHuhadELIvBLgxDtPstoJN6Fhq0 jrpwGg7oTgtXfN0yYwOKYeECJBXLFN/AnkIfM9Dp2PlS7+VndAtPotMRwhnLer1kKet/ m9CJMCUI8SAuyX7bmje9WBZtqLHBIOMwAlUe15UcJRkrWAj6p304ebtJPlPaKmKSZNad Z+ih1hfVANgEjUu7pBWfYFXNMYQOez5Jl2U0slYDJEEFTvYAVb81N9mNu0dTYfIjkIMs VLnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="QRoN/kGT"; 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 y5-20020a170906518500b0087877581bfcsi16574741ejk.982.2023.02.13.06.43.43; Mon, 13 Feb 2023 06:44:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="QRoN/kGT"; 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 S230248AbjBMOft (ORCPT + 99 others); Mon, 13 Feb 2023 09:35:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230063AbjBMOfj (ORCPT ); Mon, 13 Feb 2023 09:35:39 -0500 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B846716325 for ; Mon, 13 Feb 2023 06:35:36 -0800 (PST) Received: by mail-ej1-x62f.google.com with SMTP id qb15so30309431ejc.1 for ; Mon, 13 Feb 2023 06:35:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=v1AUm79K5qRxcoKaBb2AFl12FqpHDk2GXzyUEMzaXfs=; b=QRoN/kGTukq67Xj76EPDFHxZz/osow5g6l/5SQcjTmU2XN0wQSQNYO+lyBx3R1qHdY 3hG6Oq4DTkCn0lxGbN0T7tsL6q/VVDgJrmcX7d1ByAueGfLBnKsor2vi3u34xl79cn0l FThOyNwr4LQzYg97g2nIip5NiGfLzsKMhSnAxNmcytvHF+WoI8kJeRil81rjWIOAXS1i tCv5RkDZMbYjPrFki8/sCbhqSSGRJEXIXPeF3wxB3dUp+a+FmfmkH2dgs9n7s5ZB3HmM GFAxq/Zdu7ZUhewdhqAv1BGyPvtoOJ7UCf8oc7Ryetkw8/LZHOdCRdNeHmuKfJgdEGQo KRbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v1AUm79K5qRxcoKaBb2AFl12FqpHDk2GXzyUEMzaXfs=; b=JStEgYurE7trUCBIt5KTBadT5RCUK4ekwJpsF9GJu2E3VFpRycgzOVwO9eYbdPzcNX 15ut7ThwA+8BZD2FNw1pNTP/tjDifa6NFt+QGd3wNvFtuwhnrpm1oPjgU6nTOE/mE0Si ZzuvnP/wVEvwPVOOhZ7Q26hDQj0lGSa8qAqc9LVqgkMQ9CWJUFuY4ywb2/evdNp/8j/E NNR5AVJDUOry1T1YLqhIXxGYNUhOt9oWTl1FXHySxMLaV1vWCFy7AbyYusoV+xJnDFnz pmgtBk4bKgUL75peOh6KL8EDEXyScmTXSHwrU7TUtRCn72ROd27GIj+2vhWHQFiYeKUa e0nQ== X-Gm-Message-State: AO0yUKVcAhwxEmVqs/Kixa7UZZjc4R95CHIvGJ/aB5jC0lj8iuU2yDql OXE1gfNDHZ8ra5yHycHPVGmV3Jekiklg0ljW X-Received: by 2002:a17:906:fe4c:b0:8aa:be5c:b7c5 with SMTP id wz12-20020a170906fe4c00b008aabe5cb7c5mr29054495ejb.41.1676298936334; Mon, 13 Feb 2023 06:35:36 -0800 (PST) Received: from localhost.localdomain (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id uz6-20020a170907118600b0088a2397cb2csm6927186ejb.143.2023.02.13.06.35.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 06:35:35 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , linux-kernel@vger.kernel.org Subject: [PATCH v2 4/9] soc: qcom: rpmpd: Expand struct definition macros Date: Mon, 13 Feb 2023 15:35:19 +0100 Message-Id: <20230213143524.1943754-5-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213143524.1943754-1-konrad.dybcio@linaro.org> References: <20230213143524.1943754-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757727368556814626?= X-GMAIL-MSGID: =?utf-8?q?1757727368556814626?= 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 Feb 13 14:35:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 56314 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2383174wrn; Mon, 13 Feb 2023 06:44:01 -0800 (PST) X-Google-Smtp-Source: AK7set/oGI7zxPblaveKIE8ny25uiiqeVxswdiZExRXmjyXqAkM+8OEOjHi+12JAca/n0Au+5Qxk X-Received: by 2002:a17:90b:4f4a:b0:233:c40d:9a37 with SMTP id pj10-20020a17090b4f4a00b00233c40d9a37mr9131990pjb.10.1676299441547; Mon, 13 Feb 2023 06:44:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676299441; cv=none; d=google.com; s=arc-20160816; b=fSvMJpUDWt4NlkNi7jqWNmiukq5eUKw0KTcFhg17qKcaEBv6ufTKBptkjrqCZr9IcJ /mwjE3zdway2wyV9U3Qn52QEZKzG+ZmU6xeFCnwdZWNY559+BU3K3gqWoNLgTlJkmemx TE9RvsPHGPc4zvtw2tp6IhmC+yU92q0b/PXv9x+LossUIm1I07JJRFKJjioI/sCbLnv6 IiTnJIaHDNxbA8nlODk42jIUr38n1v3j1MLfkPlQeR37l1Wb1PgKdBGziT30S4ZNEdyC frluPPLGLmLpJwR0w22XbjOX4SPL71tc1wVnZHUbqcY2EzNtKSpOX8crVcEQtO17mtCJ 8UAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZI2kTB1NXh4r+sDFYW/i1adv92yoH50cUW7Ay8oa5eM=; b=SYu0EhFP7zvEyCsLDFOVUUvvyXt3TXQy+qRSnS8PAIkbC9OsgTUkQ/qqYhAJkDhTFA tH+T/KED09IZwLAQK65tyJN473QohjcdHvfNFbsD7wWxvK/jxau4wr1Lg29VRs7P/b44 IgBB7STpF0nVcFZBufDF3psZ1NHl0YnpO+RCOCrp2wmgkHJadn0CYRZBGT00sJ5xTvxx xus59mZQWMWXJ/yrwUZGQbAHo9ex+YmPgcDRhkjul1fk00AD+Qlb5d9bWpH/pdcptiNC X4EfVPBVSATsdNYd/O42lIpIgvebOa3M3osJKRhaFhb4MG2OCG2c0kb4Stpz3CWqU25C NOMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yKSg9g3y; 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 bx16-20020a17090af49000b0022c890c2d4asi14989939pjb.179.2023.02.13.06.43.49; Mon, 13 Feb 2023 06:44:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yKSg9g3y; 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 S229705AbjBMOfw (ORCPT + 99 others); Mon, 13 Feb 2023 09:35:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229889AbjBMOfr (ORCPT ); Mon, 13 Feb 2023 09:35:47 -0500 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C392199C4 for ; Mon, 13 Feb 2023 06:35:39 -0800 (PST) Received: by mail-ej1-x62a.google.com with SMTP id qb15so30309660ejc.1 for ; Mon, 13 Feb 2023 06:35:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZI2kTB1NXh4r+sDFYW/i1adv92yoH50cUW7Ay8oa5eM=; b=yKSg9g3yqfnq9zJB3p610Q6Y1Obg9BpKYcQZZb1YzPsxHqki6Dkiml9nzgzgIEljWE UQCSwT1Kpp7jhW680zRd5h5Le/1SMVMteO5FyshDS4Lj6RqBn4RHBaSvLcRqxFiz3bM+ HSBduEyjHOBAgOe2OkoXljC3AZJDz2QxXoES6WFN+qJcwsDzDNUc/oBJ/TRam2Am+l77 2IAqNDW+5e+5Dw7csGwiLQrxlGntU5enH48FaDqAFr99dF/jZBjvRIp9+IDFnpeOHE2V DB3oMWya5kj9k+b/AJTGk/ams5Htt9HkY1yxOscU+HSGJ4RtDrlpR2jv5LyNPLdWwoGd 4oAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZI2kTB1NXh4r+sDFYW/i1adv92yoH50cUW7Ay8oa5eM=; b=Y2Aq9JduZ3hAXs84wJS/Psuxk+ohz7NIKGTQwddYGPIwEC5gcHq+4fEOG8cFIdWpxo 3o6mfePDkdRvHM2f/y0KahMY03hX1YB//qlxlKtkzexKzQO3LbhzSjyWyT3VbEQGNS0/ loy+feh5zkL2zTe/DruLKC0FXkNsfFMp1X7RAiOb+CeCUk01Ic69fTtljkRRZZKqhU5s ydUiM3Mdvv7gG6NTb927db/rHSeO/1999cdyJ85DKxcfM2Iq6aZBOYtxwwl52bI7a8nN srLxnOsF9FfMhBDWyLMw8UIdASzFXn5rcJWFEMQyr0dN2FK9ZSV8Fa0CAIkv62iRWA4T sbQw== X-Gm-Message-State: AO0yUKVo1eMs3nXsuEFtP9pOBS5+fqzzQxBV6s1pjoaMzVVHxkcjw0gH OgTKFx5AxUMSSHtLWFGzAlPSlvj6IpMf8Mjc X-Received: by 2002:a17:907:7e8f:b0:8b0:fc14:bbcb with SMTP id qb15-20020a1709077e8f00b008b0fc14bbcbmr6317724ejc.42.1676298937990; Mon, 13 Feb 2023 06:35:37 -0800 (PST) Received: from localhost.localdomain (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id uz6-20020a170907118600b0088a2397cb2csm6927186ejb.143.2023.02.13.06.35.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 06:35:37 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , linux-kernel@vger.kernel.org Subject: [PATCH v2 5/9] soc: qcom: rpmpd: Improve the naming Date: Mon, 13 Feb 2023 15:35:20 +0100 Message-Id: <20230213143524.1943754-6-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213143524.1943754-1-konrad.dybcio@linaro.org> References: <20230213143524.1943754-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757727362950971119?= X-GMAIL-MSGID: =?utf-8?q?1757727362950971119?= 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 Feb 13 14:35:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 56320 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2383507wrn; Mon, 13 Feb 2023 06:44:39 -0800 (PST) X-Google-Smtp-Source: AK7set/d/jmjGkMl1u0oYsxFVDobP/QGE+1oOENKc9CotUCMhFoIucEGrxr+Y5x6OcVrY4rshmbb X-Received: by 2002:a17:906:64e:b0:88f:a818:8ff2 with SMTP id t14-20020a170906064e00b0088fa8188ff2mr24808104ejb.11.1676299479824; Mon, 13 Feb 2023 06:44:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676299479; cv=none; d=google.com; s=arc-20160816; b=z74quvtbNbS9IKBT8i+udYVb7FjAUoSaElxepFKyFnynrqlp8OVMthFXrptefDYsg8 Lr/4nnzuReNZj023AgaG6seni1rUx6Pl6t49CEziiiT18LfeLKpxWjH1qLRF5jTBnLr6 kXpQXzOt0xthVtRwNSZmJnexwCWR3SSZb/z1xAIwzU0bi9kiOmr+h43m7W5jpJwPLAMp OmiDdoG3f+Jgpxu+DjsC5JQiL6/z8FzI4WruHS2SFDfBCjUSzehlVtwOJdib6Q/zjCJ6 UyUpHNNKFNFgyjGZq/qJYt3Cg/7+vHPycQvWYYUpQsRTEtC2D+hECNtjFXgyBAYqe702 L9KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wEQZHKiyj0lPt3lYNPAK/FtlnejzIJ6PuUeF01vkYQs=; b=crPcZrb7N4xKIUbhJtnEOGpWQAYUVD9aElf6Ic02qW20qrnPFUHM7/wqyBDPQ3Tl3l YFSWRNKDYDypJ/PZz3gdiZstLB8hG0n2e6PlXiknVx9PMooxrdJGAy3CoykOoYe6Tem3 /GD87UREE/DBO9q++MyrRQWNte+BW+5lyszb63pLEG6FidFo5sKN3uLrG4TjUhDnBIO1 kL9wCjoGcrwwyJiy8SA/LAwTi/T3Mkm+rWTSZitayd1H2xbYW4VfYPA5Nu2uIgdOBae9 PmWuZ1NZvWO2Vznpo2cKD29VPzsJIPmss6vOFHwLhXeZ4SyaEH4y7BV0PDXmf39BXfjt C0tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IqGiPM9F; 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 q3-20020aa7da83000000b004a22c3d5d33si13733635eds.234.2023.02.13.06.44.16; Mon, 13 Feb 2023 06:44:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IqGiPM9F; 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 S230234AbjBMOgK (ORCPT + 99 others); Mon, 13 Feb 2023 09:36:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230137AbjBMOfr (ORCPT ); Mon, 13 Feb 2023 09:35:47 -0500 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E934E1BAFD for ; Mon, 13 Feb 2023 06:35:40 -0800 (PST) Received: by mail-ej1-x633.google.com with SMTP id hx15so32314955ejc.11 for ; Mon, 13 Feb 2023 06:35:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wEQZHKiyj0lPt3lYNPAK/FtlnejzIJ6PuUeF01vkYQs=; b=IqGiPM9FytVoDIGPQB/QF/cLp+e0dpORCk9jy1STkQ0VeRwu8cWvKgNsdqVULZgAZA zyrkkyQCNpXC36ryvnEbptKiMEmZ4xHDnl85GppMro/ivDJUe0DpRDsAak23fB9lnvKx sLvquL/5KfovuK5UfAnKcfL89fg3mwyR7FOm5bYq6U+dQYP0ZWizKlW+AMJdVgIkzq0p kXYdJWdIq1rMejeeuksiF3xswdqDr6OypdiW+aO2/vsdFfOZzs5fy+c4p9TJZTBZpsB8 pjfa3UpdqHuLtTTGVWS5haqcIHF8Y18cYKmveTjBihM9IJysrhjuRWFo4yHGgiVLROZl il5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wEQZHKiyj0lPt3lYNPAK/FtlnejzIJ6PuUeF01vkYQs=; b=bkBFUiVY6o5xWAQ/jQ4P0tGnR5i474UcVhdbgUwQZmC0+boYr5URtV7/PWp6+1O5Tc iVMhfbQF9m4vmcw8YhjvML1jWg6vuMK4K+Ys0zSVmsiRbXbD8Hb3w8fouua5opZItDFn SvUhIcwZPAG9RkmzQ4FC3oxqWLRgAzdqvRO0UHgIu283YVO1Jjt1A2PWbLaeviFaSyGu JrfazPPmnKCsC5kVE3NASWwhbZwFCkesjeaoIoFSLF36miTbvCiutP/G/VJYzoL2iV5Q Cb4J3Gwkhw+9GcM/LUktRY4oe7IyuLatNBY0aGhrfJmeuZpmUbFmNqsqBfXgh8cmOcPl wPIQ== X-Gm-Message-State: AO0yUKXDEgqNcgdkgbAiD1gZd0gnxg1OUdZEn7ivH5FLZqbiKjZ/KtDF r2PIDYotx2rFxUmyy2pAkwmM3Q== X-Received: by 2002:a17:907:d2a:b0:8af:ef9a:1911 with SMTP id gn42-20020a1709070d2a00b008afef9a1911mr11883444ejc.5.1676298939368; Mon, 13 Feb 2023 06:35:39 -0800 (PST) Received: from localhost.localdomain (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id uz6-20020a170907118600b0088a2397cb2csm6927186ejb.143.2023.02.13.06.35.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 06:35:39 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , linux-kernel@vger.kernel.org Subject: [PATCH v2 6/9] soc: qcom: rpmpd: Make bindings assignments consistent Date: Mon, 13 Feb 2023 15:35:21 +0100 Message-Id: <20230213143524.1943754-7-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213143524.1943754-1-konrad.dybcio@linaro.org> References: <20230213143524.1943754-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757727403140772100?= X-GMAIL-MSGID: =?utf-8?q?1757727403140772100?= 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 Feb 13 14:35:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 56318 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2383440wrn; Mon, 13 Feb 2023 06:44:30 -0800 (PST) X-Google-Smtp-Source: AK7set9ALuntEShnLeGE7EbpMwt0UFnlbdfst+0nKGO8nTEi0B1ziGr3cggHJ/FeP7JYHAD+ubLC X-Received: by 2002:a17:907:62a7:b0:8b1:ff:7588 with SMTP id nd39-20020a17090762a700b008b100ff7588mr7345025ejc.13.1676299470326; Mon, 13 Feb 2023 06:44:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676299470; cv=none; d=google.com; s=arc-20160816; b=0Bubrv7hGP/1pSvLAXiFbv2Qu1107UDpBDIu0U2cyzp0G2i1K8+V/aFC/TM11rsprf 6eXJ2hAhZ8hvqC3gdiw14FIVsjpfTgbIaLhHwSiqYD8KhNtjkEUdcK1SlcvbvscoY6PL +p+Kfb+QPpYbYL7rlcYbhI16KKws9qU0bXVzVn3bZJEOGa2Sm4jGeNIqOtrt8eZZ5II7 v4SPeomHjOFKj90OHnjrAb9Qd791zwFIJzgfMHNwe0WxLo5AP34WiKID1dKSQlwcOuMI 88S7zCKdJkh9mvBxFnN76oPcIFsAmVVgOY345pqvq+xdDOsa4BBUBaMhaU464jHMM78A mm4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9+TFy9ylMOJMNpXCHqHBb00FBDo0eIJdb97gjM6cvUQ=; b=DIDtbJAXQ18bUGRZhi4tuZLdpYGQVniWE+btCCD0JL3749F40rNF93x2u7Cyo74IQ5 wYrZaGZmGsfHte7GZrVhH6xgZ+UX2LPzPbQdj64t9YcUAgDKXRz9gMr+kKhwBJxFK1QL k6JisLjdrfRKlbYvXKjvxf9nr9zNTCVeivsObQiQaus44TRNmpFFCNaNf7zQu+u4Jmzu pEJHjYXLmGudjdLZYpl/z6I8mc7Y/Lx2JRK3H/QUFDuRaqPslhavtC3MRdR3dRJ4QnwN TB0lqYhz7Z3UxmbrYtyVrjXDjpLkeXSaBBXxatKlFgeMf1xy07wfdJOpaneRr0ozG05E xILA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oSl3wTsP; 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 vf2-20020a170907238200b0087cc469b195si12747373ejb.423.2023.02.13.06.44.07; Mon, 13 Feb 2023 06:44:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oSl3wTsP; 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 S230252AbjBMOf6 (ORCPT + 99 others); Mon, 13 Feb 2023 09:35:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230151AbjBMOfr (ORCPT ); Mon, 13 Feb 2023 09:35:47 -0500 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 295DA1A669 for ; Mon, 13 Feb 2023 06:35:42 -0800 (PST) Received: by mail-ej1-x636.google.com with SMTP id p26so32297944ejx.13 for ; Mon, 13 Feb 2023 06:35:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9+TFy9ylMOJMNpXCHqHBb00FBDo0eIJdb97gjM6cvUQ=; b=oSl3wTsPf7jQ2ZMhh2VN5SZrFK5wPmv1UOza/dQXd2CBXloCWFKaovy06+f1I8vSPN 0kz4yda5IDQYBL5sdmUm0KnQaWRmojrZsVquR7+1f+etD5zQgqUHQcdJSWdylzfqEFII +eukb+Vk2XeJ+ITIEGbc/+1T85UpKOiJUv7/GmsP3LMgknTVh0ROgYqbAKtDhPMMMR12 PJR46P4ULG1Gp0Cg1H3aLdG7vR0wPo64C2uTwGfqAgoapzh0DNu2hxuPPlGDMyKinlqR EMF6YUwAShs9WNkuSdRJeHWa97ztUivhHu5pyDdjc9ERTjZy2O6oUw0e2gvlhcjqYA9o K3xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9+TFy9ylMOJMNpXCHqHBb00FBDo0eIJdb97gjM6cvUQ=; b=J9lb9YXW+VZqx+8b8QOHOevXnYgZYzOkl+PW35Mw9UKzHchxkbTCEqIbD6lYcQ7dLT CvqFHamvMuv3tueyfVe5fRyoQckHwkyxyfNks5MuzHxnm8DlMn15UzYXbWzK+AllRYfR z5CDUkS/i9OYvFRvrhIQo5ekTGpI+ds2kiROvD/hB3NMcv6jgM+enL4aAAF7DMmhsACi 9uRJREJiMwYXTOxJHEe/VIUGhakXP11QO3ynDVVP3LbSz+Dd3SGbDnADSXaNHx98P/nE Jb0TSe3ng3NbcDUBoANTQJC4QWX9tb2j/S+SDeA4rogIPkQXk0E1runSkt5uIAh9N7yb UZBQ== X-Gm-Message-State: AO0yUKW3k0bTiTfgdvGMRdH2SPAfh8LU4GT62zCD/uaCW5ATw/cpWPJF aNYAX7RdzMOMtQBMXPQ0kS2gDaQ5WvXoIsE/ X-Received: by 2002:a17:906:310e:b0:878:702e:9dff with SMTP id 14-20020a170906310e00b00878702e9dffmr24484782ejx.41.1676298940633; Mon, 13 Feb 2023 06:35:40 -0800 (PST) Received: from localhost.localdomain (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id uz6-20020a170907118600b0088a2397cb2csm6927186ejb.143.2023.02.13.06.35.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 06:35:40 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , linux-kernel@vger.kernel.org Subject: [PATCH v2 7/9] soc: qcom: rpmpd: Add parent PD support Date: Mon, 13 Feb 2023 15:35:22 +0100 Message-Id: <20230213143524.1943754-8-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213143524.1943754-1-konrad.dybcio@linaro.org> References: <20230213143524.1943754-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757727392940768803?= X-GMAIL-MSGID: =?utf-8?q?1757727392940768803?= 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 Feb 13 14:35:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 56317 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2383394wrn; Mon, 13 Feb 2023 06:44:26 -0800 (PST) X-Google-Smtp-Source: AK7set8w3w7x56HIVlemYrgxDAk1Q3Ml+HopPpjzMpbfIeM+sYCaNQ0W5XWXwjW2YTlscHhbWddN X-Received: by 2002:a17:902:e74c:b0:199:2a36:6c3f with SMTP id p12-20020a170902e74c00b001992a366c3fmr28589158plf.6.1676299465740; Mon, 13 Feb 2023 06:44:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676299465; cv=none; d=google.com; s=arc-20160816; b=DnoOpw6RdWxqSnRxctnY7f/YpfbZt5WaIbvK8j8tt18tbPxjqTtpfgWVpbWIA0rI8W 7BqHVJwSNFJl8CWc3x8wn4PlVBX6BQI7FXxB49g2QZyGEDwPYYNpWmPsGwZYKt9xNcS6 lHQomCPLk+pkATF3RSRmrLvb7MFmjmUhqofqwQuKfINg1qXyEXDAwchAwB/jHcru7t2g xhIu80mD14F6NLqkrTj74E0E1m2Y4sptr6KxJ50YoqNBK//igJDsAwB+u59s1H3unUvq FTWmOqL2dDRZcS7JWdBc4XOnX5VSMUKabhsDbMn6C7OjrJ+gwtVmvvcsgASi3f7YHpHn TLEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gUsrpJKvpOf/IejcS66CIVhN9ZDPD+2AL77vlAldsrA=; b=sUgExCRkG6pAK0PfD1/7SaVIt7QNKpgWGwVD9Wr/TQo8LORXDt9zRyxRamzzWufqFx ztkaoIbyD3txk4Ltfj+0fvF8fWDTS6Db3SUvjucwUWGh9kpL3C+wHbMOX/hKkLUxN+ES cm5A7S7bnvpeCDezgi3PxDMYF99eZXaEQRkq6uLSqolcxw5vzekl7SBApNeV3Yl6ozE0 euHVXwAjh7LlvD0bHcPYrxCWtOYSPGg43eKZ6ZZ0f2wjjpOksPuee+/PsnuntEeQs0+n 6bSUjjv7VOmJOwraAGLiPwi6FsY+epulZ/ohC0vvvWf+pofqbxCgAOR4vWZV56Cld5hr ve7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z2R6EuNZ; 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 ay4-20020a1709028b8400b0019489437a80si10940438plb.144.2023.02.13.06.44.10; Mon, 13 Feb 2023 06:44:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z2R6EuNZ; 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 S230355AbjBMOgF (ORCPT + 99 others); Mon, 13 Feb 2023 09:36:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230175AbjBMOfr (ORCPT ); Mon, 13 Feb 2023 09:35:47 -0500 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60E1E1C319 for ; Mon, 13 Feb 2023 06:35:42 -0800 (PST) Received: by mail-ej1-x62c.google.com with SMTP id lu11so32398670ejb.3 for ; Mon, 13 Feb 2023 06:35:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gUsrpJKvpOf/IejcS66CIVhN9ZDPD+2AL77vlAldsrA=; b=Z2R6EuNZyLJZIv3xxNXXQZL+bZFW94Xg1z1H9fNFPCgBUePtA1H3YLxqOXP0BE5Hpe aBKLq+BQ7YPBNnxycsZojYdiXPtuPCZ2rYidA6VBqAjvOipTQRTTETmjnsSjkao87X9/ OQQMDKjFxuwlh5n+zmA86n2IKMJ5Qdid/qV1AV8IwJzVI2pDcPvESWo/FoPHh0Y3GCZz hcEKn77EFEenguCdgFKDK3ajAonjlzktneNVvNFxMU3j4PDxFIRb1oexL7O21YXgoFCv GssGi25duNt9sEinxtCTufXzjynXN1EWxjwAuydCswf9aj9rRxw9PD+ziyEhxCxid2O+ JPGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gUsrpJKvpOf/IejcS66CIVhN9ZDPD+2AL77vlAldsrA=; b=CrCQ120ucWB/j4SaeJDp5e8DCnZ173DyDmUcYJH+y9US2d/HHOTMxPlMWKJWrg1GuF NpVkcgbckfqxta9WXGO+3xCmUtcoLQYV/yuy10JdG5zFNnM0MNzBnicvf3R7WMGgXkER 9PmswP7Z/HqfAccG2y+0lNTYojF1IufEu5QxDbnJVB2rnZxw6K+TdAeX40JfxxPFHlpL bd5LEeDGjvPbB9UWq2zuzkww/MOWAxknG45cf6SfugNDyDxU178PCQ/7yY2Kr5y2JeRm bWbEz3aTPltj/y3mMQqKigrVffH+BUcZB+vz6VstBQa7vixOtCCz/WTB6dLKOrik23zO oQNw== X-Gm-Message-State: AO0yUKVVs6OLe/LUEyHjeOw7jPxCse1FUXroOkRx61xENGn9+DPhV1hY x/R5nZQBeuR9PVbzJdbGselOPg== X-Received: by 2002:a17:906:1d14:b0:88c:a43d:81bc with SMTP id n20-20020a1709061d1400b0088ca43d81bcmr22744167ejh.58.1676298941949; Mon, 13 Feb 2023 06:35:41 -0800 (PST) Received: from localhost.localdomain (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id uz6-20020a170907118600b0088a2397cb2csm6927186ejb.143.2023.02.13.06.35.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 06:35:41 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Dmitry Baryshkov , linux-kernel@vger.kernel.org Subject: [PATCH v2 8/9] soc: qcom: rpmpd: Hook up VDDMX as parent of SM6375 VDDGX Date: Mon, 13 Feb 2023 15:35:23 +0100 Message-Id: <20230213143524.1943754-9-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213143524.1943754-1-konrad.dybcio@linaro.org> References: <20230213143524.1943754-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757727388428112095?= X-GMAIL-MSGID: =?utf-8?q?1757727388428112095?= 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 2027c820caa7..2669c9210754 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -216,11 +216,13 @@ 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, }; @@ -228,6 +230,7 @@ static struct rpmpd gx_rwgx0_lvl = { static struct rpmpd gx_rwgx0_lvl_ao = { .pd = { .name = "gx_ao", }, .peer = &gx_rwgx0_lvl, + .parent = &mx_rwmx0_lvl.pd, .active_only = true, .res_type = RPMPD_RWGX, .res_id = 0, From patchwork Mon Feb 13 14:35:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 56319 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2383454wrn; Mon, 13 Feb 2023 06:44:32 -0800 (PST) X-Google-Smtp-Source: AK7set9p+F7hxDcZvqLLeUXbz0f9IEwJsq8PkzXAaeAeq/AjvjiO6NokT114ZotbjzrNutiMe6eK X-Received: by 2002:a50:d643:0:b0:4ab:7ee:5e1e with SMTP id c3-20020a50d643000000b004ab07ee5e1emr20052646edj.34.1676299471983; Mon, 13 Feb 2023 06:44:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676299471; cv=none; d=google.com; s=arc-20160816; b=fmb8Uq0mNfmMf7NQLWSJGCbZBEUSQH9jJGDbX37udsquYaL7cNo0GcO9Q1aPsak4Mi qk8cjuuTW+DnFZhgBQSe0D7hEJe6/eqZ6KBotP5oQV5UV8lU6ZQJhqQqz0Ji1XToBgnr 07bU1FpNemHkdBV1caBv1cETAcZC2XF55Kz7KJWfTUJfjSDaQIV2+wwAttoq+giSYCNf ya/ve2yNFCpUAom6RbJNehoJHs3Gqbv/efQ6bTFAzOTK3mxJ2w1JAHbt+xt7EKpD/sOy OM0J8uK/NUlAsNgixfilRGobd5YZe+QFOBqnTBEZyE35dksaEEV7qJct+8z4oklshV9f klzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EZJcfvCSvUtQxtItfdcJH8PeBiAB1ahPgwFkFtnDsas=; b=dPHIk5WED/Q6bfec+aniDO+iUw4B5uYLgF+DCwZiG7FO9cKRL9vExwI88eZTnjgv3Q 4FyVrjpP8R70G5Y5EPBALJAx681oUhrzp2RbkJd+e9ql6H5NYvBBixauzJBI85rMtpAB WSVDvl5Q72hS3h6gnJe2BY3UuCsk/sp3nIoQEcqiLyxnj9eFdxu9GT4cBXgu7bgsO8Kt Ekj4X+WoSL8rp3Kl9OOQD9sKWrnPRCRllRNRff34cejunyK2MnKnzrU3RLy4XFca2aXc OUQ0+otqnnWmMfzyWeCi8bn/7h1h6hFkablTlncm2Tm8lWb016p9sV8rxsDQvMngEBLa w37w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OcymAMpR; 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 c12-20020aa7d60c000000b004acc585f25dsi4325066edr.388.2023.02.13.06.44.09; Mon, 13 Feb 2023 06:44:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OcymAMpR; 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 S230314AbjBMOgC (ORCPT + 99 others); Mon, 13 Feb 2023 09:36:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230064AbjBMOft (ORCPT ); Mon, 13 Feb 2023 09:35:49 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95B601C313 for ; Mon, 13 Feb 2023 06:35:44 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id qw12so32415308ejc.2 for ; Mon, 13 Feb 2023 06:35:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EZJcfvCSvUtQxtItfdcJH8PeBiAB1ahPgwFkFtnDsas=; b=OcymAMpRYavlUNz7FEhzM9zQQSgj7BMch0z6rdIgDzfy/CHxgk3jIk9C9XCUvl5DFC HBWV/eJm67PgsYCDPFuDwcE35tAulEX0b1Xt6JBFhe5n5fTaoVTwFFrV7DPB5YNefjtM bQVUNtDPzNnp7Rca8Smk2Oz1xHAyvByRRmPn5CIfWlOmSCaeAZzhNSLnfVdCqbbBO97p 6Ql3Ib4Nm550ZH4S+aJ6+JEDNaNKgvCxrel+1I1LyxTQw6z5/wFZlEYohkl6rx78BguF 9dnU6r3WuW655iM1hsZ0HQEC2IZC7E6gY6McaPbsnU0HqZyAHLqcVxwkN6HCX8etl2i5 58jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EZJcfvCSvUtQxtItfdcJH8PeBiAB1ahPgwFkFtnDsas=; b=rK4PbeOKHWdRxN0rABKRIYxCnV5M9EUckn4F7ktkGZ+AAztscJHTGGB1J+r9nom8Yx Z1/YxLECTV0U90LmMPHuuFobBqPX8qaGtiJOqiooSXfntDMXNCc5muJoIoRPiVCNRUMz vmEwZ8tNltElor/Fuoh0grl24HGWXaj6xmWe7P3y8Zai+ne/iBfZYLpBivMsXvjU5vor 1Yvx0ZzH8QwpVHySE1v9jghnnJHoyl61mrVl9LKqglctV8g+kiaW5YcuzrB5xYwMxY/t 2W/xUuZNeQ3fWrUfo+GarCRSiGznENEYT9yzg9he4kVP4OaKa0DLawStFqDlpjPuDqiM Qxew== X-Gm-Message-State: AO0yUKXb8czTHOw/awlx5tJ7F+aBec+NFRTINPNi0MsS0G06rGTxv5yx jfOQ3MkYz9v72vspkfiUkJxBmA== X-Received: by 2002:a17:906:3686:b0:8a4:e0a2:e774 with SMTP id a6-20020a170906368600b008a4e0a2e774mr21359741ejc.29.1676298943227; Mon, 13 Feb 2023 06:35:43 -0800 (PST) Received: from localhost.localdomain (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id uz6-20020a170907118600b0088a2397cb2csm6927186ejb.143.2023.02.13.06.35.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 06:35:42 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , linux-kernel@vger.kernel.org Subject: [PATCH v2 9/9] soc: qcom: rpmpd: Remove useless comments Date: Mon, 13 Feb 2023 15:35:24 +0100 Message-Id: <20230213143524.1943754-10-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213143524.1943754-1-konrad.dybcio@linaro.org> References: <20230213143524.1943754-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757727395074582632?= X-GMAIL-MSGID: =?utf-8?q?1757727395074582632?= 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 2669c9210754..fe1eaf5c2979 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -513,7 +513,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, @@ -529,7 +528,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, @@ -542,7 +540,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, @@ -560,7 +557,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, @@ -575,7 +571,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, @@ -592,7 +587,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, @@ -608,7 +602,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, @@ -627,7 +620,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, @@ -644,7 +636,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, @@ -664,7 +655,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, @@ -681,7 +671,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, @@ -701,7 +690,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, @@ -719,7 +707,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,