Message ID | 20230213143524.1943754-8-konrad.dybcio@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> 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 <rfc822;tebrre53rla2o@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <linux-kernel@vger.kernel.org>; Mon, 13 Feb 2023 06:35:42 -0800 (PST) Received: by mail-ej1-x636.google.com with SMTP id p26so32297944ejx.13 for <linux-kernel@vger.kernel.org>; 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 <konrad.dybcio@linaro.org> To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio <konrad.dybcio@linaro.org>, 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 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> 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?= |
Series |
[v2,1/9] soc: qcom: rpmpd: Bring all definitions to the top
|
|
Commit Message
Konrad Dybcio
Feb. 13, 2023, 2:35 p.m. UTC
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 <konrad.dybcio@linaro.org>
---
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); }