Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp945379ybp; Thu, 17 Oct 2019 06:00:48 -0700 (PDT) X-Received: by 2002:a17:906:a459:: with SMTP id cb25mr3240375ejb.63.1571317008364; Thu, 17 Oct 2019 05:56:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDXaU4LfalmiBaoTAPX/xh5i2X2iBqPCQqIJtdvde1GCIT9Efn6o1XRGQELLcULSnDvO9W X-Received: by 2002:a17:906:a459:: with SMTP id cb25mr3240204ejb.63.1571317007034; Thu, 17 Oct 2019 05:56:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571317007; cv=none; d=google.com; s=arc-20160816; b=gFiBtOm9iWwktXXHbfcNjYnR49PiOko2alffe8qvqbmCMofREr4aXFhlLRI2DRDPNs xz6LJtpl7cUyKWFuq6XCDqFoKee64sEFUBbJ6t7Zpy6KywcignKznzwda2Tw97l1gveR 3VQgqTkObfLXKJ9AzRcnCatIyovpjVk5CelxXbCB2zamH76Hj+2PWpGOR4rR8EhaWn8n SKkkstXcWt1SvFjU23wLqupR/TqDG5s5jUFg1BJnc99qh00o/RcSf4OXHg4TpnzmNa9U LaByQLCfmI80HTHdGibni9tMjMdQWk4YzKOgUhjIEZLviJdpUEz55LT9pDgCDi8VhCtw PFig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=AYapJscjdiPe7azvtC5J+VuWqRbuSj4S49kPVeQ4UUs=; b=Sw+iA0Ot6GGcKTO2aLgJrJ2jj1XTCC9kujyBRsme0gzkJKfMpt9PHkMLlDztVQ6bCv jFYSRxB66YR8XlLn4Ef1O3nzgHu3ePsdpeoWEAEfQK/RI/2NyUR8Ecp4KXipvCIufM21 TVJLe36axJFHdsVI1IYdtlRVUa9CSUjJaNtflfX+CWyn7bgr3yBiCxFA1ju7rAB+wK4n 5dZ/t7wRVxFwlDAefW2lA3y4U4Y2IRIBWC1lyt+zk4axqKIxcSpDsIYJkNnhcuOGRmzc LWiL5TD/X6frxoJg858LjUiSBA1iDiUj83Bm8/vEcJW59mrGjOdyzjJXEJHqfW7WuhH1 GcYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n99gsNcs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n26si1290953eja.273.2019.10.17.05.56.24; Thu, 17 Oct 2019 05:56:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n99gsNcs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S2394498AbfJPThl (ORCPT + 99 others); Wed, 16 Oct 2019 15:37:41 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:35691 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394477AbfJPThh (ORCPT ); Wed, 16 Oct 2019 15:37:37 -0400 Received: by mail-qk1-f193.google.com with SMTP id w2so23935902qkf.2 for ; Wed, 16 Oct 2019 12:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AYapJscjdiPe7azvtC5J+VuWqRbuSj4S49kPVeQ4UUs=; b=n99gsNcs/xsd9f7sLUlIs3n+dodwMDeGOMCNrhZpuxG/g48jzQ3odfdm9C5SItRE4k Pafa14Sxnq3Plc+4HV1HZDJ/zTM4zonb27dCFMd8wWCbT2z62TV3RHjnQGnDGEOz6kr5 5EMwt6BaMboBRfZXl1Cy+we5hcQ+lGV7ecTFgdHmj7Y7trSTvgKCppJOz2O8i0M4dRvv avS/QLCrHfaDjCSvlGM2r4nN+y+kR8tik6/rHm3cfsw/vx1rXMiW23dOFRkLwuBGANWH Twc4EH7XpIp9YvZ/wyksM8n4OvXVrCm6bQAre7VXS+wMcQtiIg0//Ik1l+doB2Az5LZD g1Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AYapJscjdiPe7azvtC5J+VuWqRbuSj4S49kPVeQ4UUs=; b=li86XYTBymOtevvW9rwdxBaa/03NhXMwO1h1i1dkxA0FYbwjuCkTTTj6yDZtnx7tTa ksDQF2cxSEbgLVCrjNFSZbJiD3IKLWZsB+1XBZRwloW4HbxA51r6AyB3lVeEKvdzB13i KOM1V+weuZHX9W1gH0H65hwkpzxvewFTbo2ss21UWyJLXVk6pROQBvYnnNrpU6SAshex q24hZ4rqLWWwyuzm4/w8Yhnh+PzjIzfFMa+CkvJ450WpVKRDv4FAOZna0LjyfZVhHglH 3oxrAWUluY5t30OtVJiEO1wfFHIrmURaLfuGSKYGxcAEwxZ5l2UMm9At23/LNesEiI8v CV3w== X-Gm-Message-State: APjAAAWJe+QQVFF8iw7jiChUjYWpDbIAmfpwfhIO9xEcPek1JqskcxAv 8omFGsgOWRY8eAH7kGgQdl2YDg== X-Received: by 2002:a37:7dc2:: with SMTP id y185mr30531737qkc.348.1571254656219; Wed, 16 Oct 2019 12:37:36 -0700 (PDT) Received: from Thara-Work-Ubuntu.fios-router.home (pool-71-255-246-27.washdc.fios.verizon.net. [71.255.246.27]) by smtp.googlemail.com with ESMTPSA id 54sm16246030qts.75.2019.10.16.12.37.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 16 Oct 2019 12:37:35 -0700 (PDT) From: Thara Gopinath To: edubezval@gmail.com, rui.zhang@intel.com, ulf.hansson@linaro.org, daniel.lezcano@linaro.org, bjorn.andersson@linaro.org, agross@kernel.org Cc: amit.kucheria@verdurent.com, mark.rutland@arm.com, rjw@rjwysocki.net, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 5/7] soc: qcom: Extend RPMh power controller driver to register warming devices. Date: Wed, 16 Oct 2019 15:37:19 -0400 Message-Id: <1571254641-13626-6-git-send-email-thara.gopinath@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1571254641-13626-1-git-send-email-thara.gopinath@linaro.org> References: <1571254641-13626-1-git-send-email-thara.gopinath@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RPMh power control hosts power domains that can be used as thermal warming devices. Register these power domains with the generic power domain warming device thermal framework. Signed-off-by: Thara Gopinath --- drivers/soc/qcom/rpmhpd.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c index 9d37534..88ba615 100644 --- a/drivers/soc/qcom/rpmhpd.c +++ b/drivers/soc/qcom/rpmhpd.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -333,6 +334,7 @@ static int rpmhpd_probe(struct platform_device *pdev) struct genpd_onecell_data *data; struct rpmhpd **rpmhpds; const struct rpmhpd_desc *desc; + struct device_node *child; desc = of_device_get_match_data(dev); if (!desc) @@ -396,7 +398,24 @@ static int rpmhpd_probe(struct platform_device *pdev) &rpmhpds[i]->pd); } - return of_genpd_add_provider_onecell(pdev->dev.of_node, data); + ret = of_genpd_add_provider_onecell(pdev->dev.of_node, data); + + if (ret) + return ret; + + for_each_available_child_of_node(dev->of_node, child) { + if (!of_find_property(child, "#cooling-cells", NULL)) + continue; + + for (i = 0; i < num_pds; i++) + if (strcmp(child->name, rpmhpds[i]->pd.name) == 0) + break; + if (i == num_pds) + continue; + pwr_domain_warming_register(child, &rpmhpds[i]->pd); + } + + return 0; } static struct platform_driver rpmhpd_driver = { -- 2.1.4