From patchwork Tue Sep 10 17:14:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thara Gopinath X-Patchwork-Id: 173544 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp6078654ilq; Tue, 10 Sep 2019 10:14:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzY2yMWggfL3H/uionsthFtD1yiKZRAuaqztuZtVnWnyNWU2DVLRsV3G6tw1X62WxUnDFQU X-Received: by 2002:aa7:ce81:: with SMTP id y1mr31163712edv.188.1568135688379; Tue, 10 Sep 2019 10:14:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568135688; cv=none; d=google.com; s=arc-20160816; b=k/Zwzd3EuA7jGIEmgVrayVg6EkdDJ5eApJDqFY81i1BozleLsa+iNlkBdkqAZYyE2m 6M/Yeit21BS6FALvtoz/nVHS6NG0ylztdI+aiLsnV1QvDckpUsSsFs7QjsIMhMTLMKoY OIa/lhSfztmUpStGCQHgV/+Z/bXvo29xbycMxxx57hR+1JHj22X1kVYGTwb2pnimlLyp Nas5eLFs9ERN5Stz6/pCOqFWxczZKDstDXwB7MQFLu4RXdUp2VrAX2M5RapGV17KF46U Lfk7wdAXkIZaKsh/8oUi70+Y1jf1HEilVJd+/pmcQ+vTsb7IoPmAeaYDXWT2PgpLCqX7 gKeg== 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=85pIOc0VjXEJVW1VGnKzdHZfrPu0dnHyPG3j4q4cGXI=; b=LO0oIkudax/5e53X3kE0cXt3ISYT9eIIOpX/2n6ZNdpNG6PK+sJa7cDNca427ekos+ scWganZIIL0EdY86+PmZB2VwZ2rBqI19knMAqsthx4cPCnfXyvXTApzaWWnTxvxQ3+8v jBzS3AYRNuISShq/XvT9ZLqWA0VjAkYVCvcRShFV80LfsbkqCe98vyWA9V/Ve5NfH7Ei dhxGSLHu0bQr7f7upRvM3tiwV4h1aOYl0XAo8ULQXf+nXFN7DQnbIRJInBfRJeimYB2b +d3LJmpu/VYy5yK/2xgdcobkb6drXxPcSE9jELhzXmeR8D/WzVfqzI+sfKTiwKB2Fvrm HFAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hqq+ZhFi; 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 s14si10962828edc.83.2019.09.10.10.14.48; Tue, 10 Sep 2019 10:14:48 -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=Hqq+ZhFi; 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 S2437033AbfIJROo (ORCPT + 27 others); Tue, 10 Sep 2019 13:14:44 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:35051 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394245AbfIJROl (ORCPT ); Tue, 10 Sep 2019 13:14:41 -0400 Received: by mail-qt1-f195.google.com with SMTP id k10so21691771qth.2 for ; Tue, 10 Sep 2019 10:14:41 -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=85pIOc0VjXEJVW1VGnKzdHZfrPu0dnHyPG3j4q4cGXI=; b=Hqq+ZhFigBBOZ8KVi3k/1GBGGNXSk+aAlUmrrKb7C5UmaZ6FoAtluRmqcZqeISVKXv leAypDTy0Y9VBEICyka7PNC+myRYAWDKvEv8Usaoj+QgvyZyFwd0rscFFq7NmqcnM5nF 4J2yUegdTxW+cJpAWIRbY8Slqi42kwgByV7FPREkEpk51fb2U8TaPamQhUlTfxhGA7cI D8o/S46/PdI00Vq7JtFUa3E1/e826aT41nMXFSSFoUE93EMFuTp5NCZykLC/MWNhMZy3 p4RRGp16vXYDXXOLxkFGdFVQucfohagdojOaRo7QvL1Cll7qiTHisoVwn6+Qc6jgfXOQ howg== 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=85pIOc0VjXEJVW1VGnKzdHZfrPu0dnHyPG3j4q4cGXI=; b=QMhtjaYduHoNoQoHoZxtLgb65a+rxpm5440vZp0xJnpCq4bynXedgA03Uo3ICZ10C9 zOOxXn/gqx7d4Y+IpLPpX2o0wyvgGuNUyZkYT2VWs4g/pLaXf42MsL52a0b00xqEVS4z FXXdkt6lnjoPYqcSu+A+xjTlUIct6sqMuJrI8z2wugLQPzdsOziJnVx7waJXzA+qTUY0 X4HaQ8tNQjaaYd/cta5y5R+WQkK6QAKYDIGy1pQLS1u/yO0oCi5Mn2KjfA4wyCrG+tmR eMU4cWFEkdWZKCXXP5+J2OyrJPrctir1gO0Gu+4GLxEwwxpRTqlkD0mie4VlF6SeoRTA S19Q== X-Gm-Message-State: APjAAAWBUKnypJNVt/rTyX2sSNl+4IQXJaHYnc57SOjkxLYJ+jPOfsG1 cHm/UqfxY+7t/Ta9xqJzLv1FbQ== X-Received: by 2002:a0c:ee22:: with SMTP id l2mr6412105qvs.4.1568135680903; Tue, 10 Sep 2019 10:14:40 -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 g45sm3400713qtc.9.2019.09.10.10.14.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Sep 2019 10:14:40 -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, robh+dt@kernel.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 v2 2/5] soc: qcom: rpmhpd: Introduce function to retrieve power domain performance state count Date: Tue, 10 Sep 2019 13:14:33 -0400 Message-Id: <1568135676-9328-3-git-send-email-thara.gopinath@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1568135676-9328-1-git-send-email-thara.gopinath@linaro.org> References: <1568135676-9328-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 Populate .get_performace_state_count in genpd ops to retrieve the count of performance states supported by a rpmh power domain. Signed-off-by: Thara Gopinath --- v1->v2: - Changes ti incorporate the new format of get_performance_state_count. drivers/soc/qcom/rpmhpd.c | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.1.4 diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c index 5741ec3..9d37534 100644 --- a/drivers/soc/qcom/rpmhpd.c +++ b/drivers/soc/qcom/rpmhpd.c @@ -285,6 +285,13 @@ static unsigned int rpmhpd_get_performance_state(struct generic_pm_domain *genpd return dev_pm_opp_get_level(opp); } +static int rpmhpd_performance_states_count(struct generic_pm_domain *domain) +{ + struct rpmhpd *pd = domain_to_rpmhpd(domain); + + return pd->level_count; +} + static int rpmhpd_update_level_mapping(struct rpmhpd *rpmhpd) { int i; @@ -373,6 +380,8 @@ static int rpmhpd_probe(struct platform_device *pdev) rpmhpds[i]->pd.power_on = rpmhpd_power_on; rpmhpds[i]->pd.set_performance_state = rpmhpd_set_performance_state; rpmhpds[i]->pd.opp_to_performance_state = rpmhpd_get_performance_state; + rpmhpds[i]->pd.get_performance_state_count = + rpmhpd_performance_states_count; pm_genpd_init(&rpmhpds[i]->pd, NULL, true); data->domains[i] = &rpmhpds[i]->pd; From patchwork Tue Sep 10 17:14:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thara Gopinath X-Patchwork-Id: 173546 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp6078690ilq; Tue, 10 Sep 2019 10:14:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEXSI4iqStsYTlc6+fvKkrJFhIG27I68/7vBub63qccMVBYD2zIpGD2U4ah0p0YIxcFJ2K X-Received: by 2002:a17:906:1385:: with SMTP id f5mr26302891ejc.145.1568135689824; Tue, 10 Sep 2019 10:14:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568135689; cv=none; d=google.com; s=arc-20160816; b=U6Yoxa1YfmRoHbMxjHUIfUrzNyZqrdVgaDcopmg+0pM/IhybwoL+BV+VjGmxoQhsV5 sDvG/tDZmRW7SqBjKFV7tyosTwA59EkYERQ3D7NxwyFILhznjTQk/QaAC27k+LdlmpFQ Q3K7kz3f+C0XmZTyulvFqrdbAV4OCXrsCGduf8Nu2rwZBlb8TBCBewBW6Q0r7jX/wjn/ 7q/ieUhzHTPz+TbjQ7iXn7pVoU19GZJ/csY4oRq1vw/AsvfVIpctub6DhwxNEnGbrmh2 Hty0h8fOIYDfQnUaYrwy7/D7ul/j5DJkxANgY44P5qvZQWDM/J1VQoNL8VyTWg6fKtW2 4gfg== 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=pHdUSG06S1sXGHlL1sjMEDPrOFbJ84fKCAwVrFTIeNI=; b=TNNJM0h98k5aeUgAZCwnEvu2Sp6Shipz2VwfUsA4I/SfT6UUMjqRqGsBZUSwFrPU1J GyPua9nRJc4im1betPmw0MJyg0lo3KZ9SKs1rLgGGjuVCiF3BeJWMREvpWpcbyg5+1fE 5BScKoI6M9WhS1etbrkGLPDKlttEp/mN90zjHbziP9DgJSnn5RQTOzYrS8wMAbjQ4lbB HTdMj3yYT21CR01uA/X3QH+eKe4fUb6VKdhG24HPmqjuaB6ABWCwMHorVEtEcIbU6zqv FtNbs0sUjvJNvgQDGIBL1MqWEGwPC2HO+TA1mqwSp7NkjxOd0WiCb0aw/+/SbYtrkd1h 5YwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LFhaFNAn; 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 s14si10962828edc.83.2019.09.10.10.14.49; Tue, 10 Sep 2019 10:14:49 -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=LFhaFNAn; 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 S2437050AbfIJROs (ORCPT + 27 others); Tue, 10 Sep 2019 13:14:48 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:44872 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437019AbfIJROo (ORCPT ); Tue, 10 Sep 2019 13:14:44 -0400 Received: by mail-qt1-f196.google.com with SMTP id u40so21632995qth.11 for ; Tue, 10 Sep 2019 10:14:42 -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=pHdUSG06S1sXGHlL1sjMEDPrOFbJ84fKCAwVrFTIeNI=; b=LFhaFNAnkVRzT4lYKU7W1WSI9NH7ihO+uv0URMnSVT/UJgUfAuZJwBrSprbLW9Yy/B b5xcVb8rR3KvFvMYkhC/BaG/aXaeGihJMNQruiK49G0/BQ/BPp/JQwhcKgRh0gLSkRS/ M1+Ui3smnc76FrOKXcWBcZ4JrQ7L5EWsjUoxBfA2td/AgchlqPqgt+tGKBK/JQl74eiE o59VD762axYy8+O7ySYNCY1WsgQXUrgaTxp96cX8ZKg4Ns5egLEuOYVlP2gJFR5Ckc3i wS9/nev0koEcsSbVXyg84TU7vP4DYfFBmoAZnUe61GwMq4oush4Fh7KqqC4PQpn+/1zV hjgA== 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=pHdUSG06S1sXGHlL1sjMEDPrOFbJ84fKCAwVrFTIeNI=; b=R2Yx5CrPU/SUfNAOCQzFTtqcyhm66cMF6q7LpgOIXDISTFi+aQOriDTUvlE8FVXNYu RnrvfTLHugzoM7FUcMhuYPRQU8LQPHD5fZosFylnhumB3JQ9pbvMKx7x3FIXiqbQBSTu t68a8fSOvDBwW63zFANg28yhp1zKW5Jlw/+4yfWLZCbxH9aBQgLPi8QnbD4VRHysMh90 IQarXYmUoC8p8eqqqAkxXjmow6vql2sQQUywp8LpZqE7bdhD6z4srzVV5CXja7oEZo4z AgY4+J1L2+vYyJsul1bVuPbtzlaLs/3UjIrFl9ymxPyK57nvyv3Ch20G1doqrPFAS3rB /yJQ== X-Gm-Message-State: APjAAAWKZrX7Z18B1S3BGBJC9uipZ/mt+f5aaanedABh1RcDwyB3qaFx J++v6uMjWOTuriO/1JGbJY8Vfw== X-Received: by 2002:a05:6214:15d1:: with SMTP id p17mr19340829qvz.74.1568135682152; Tue, 10 Sep 2019 10:14:42 -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 g45sm3400713qtc.9.2019.09.10.10.14.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Sep 2019 10:14:41 -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, robh+dt@kernel.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 3/5] dt-bindings: thermal: Add generic power domain warming device binding Date: Tue, 10 Sep 2019 13:14:34 -0400 Message-Id: <1568135676-9328-4-git-send-email-thara.gopinath@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1568135676-9328-1-git-send-email-thara.gopinath@linaro.org> References: <1568135676-9328-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 Add binding to define power domains as thermal warming devices. Signed-off-by: Thara Gopinath --- .../bindings/thermal/pwr-domain-warming.txt | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/pwr-domain-warming.txt -- 2.1.4 diff --git a/Documentation/devicetree/bindings/thermal/pwr-domain-warming.txt b/Documentation/devicetree/bindings/thermal/pwr-domain-warming.txt new file mode 100644 index 0000000..25fc568 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/pwr-domain-warming.txt @@ -0,0 +1,32 @@ +* Generic power domain based thermal warming device. + +This binding describes the power domains that can be used as a +thermal warming device. + +- compatible: + Usage: required + Value type: + Definition: must be "thermal-power-domain-wdev" + +- #temp-reg-cells: + Usage: required + Value type: + Definition: Must be 2 + +- power-domains: + Usage: required + Value type: + Definition: reference to power-domains that match power-domain-names + +- power-domain-names: + Usage: required + Value type: + Definition: The power-domains that can behave as warming devices + +Example 1 +thermal_wdev: rpmhpd_mx_wdev { + compatible = "thermal-power-domain-wdev"; + #cooling-cells = <2>; + power-domains = <&rpmhpd SDM845_MX>; + power-domain-names = "mx"; + };