From patchwork Wed Oct 16 19:37:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thara Gopinath X-Patchwork-Id: 176519 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp7827264ill; Wed, 16 Oct 2019 12:37:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2YtdqPya+q9tNuLUQFMJzE5Ju42NI4/N7RooupH0avBF9d4IG6eOQrNJqNNW06TZ831AW X-Received: by 2002:a50:fc9a:: with SMTP id f26mr40572280edq.217.1571254658420; Wed, 16 Oct 2019 12:37:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571254658; cv=none; d=google.com; s=arc-20160816; b=nMfjENzMAx57fLF6O3IUrQYIZi4eeDqUcRGq4yZnxINFzLnR4+uOlS+JQV/qf8Pf+w k+iNSa6ZuVBIPUrUAq2ReMI89lJNNA12yJPd3eh52AU6uplFwOdEV1pypDWwnAG7zo4J xl5nu6XOEF31+jQFliZp1UO/OKAj9cEgdmDIMUoG7fLDUdCFUoPHOF9Fqaxp++oa01ot fJIvDqOf1SiYNWxhHgYQTkKR/EBhrnJI/cDRkPnxkSj9eFxPN8Blzhti0aeXaRQtMH7d l6aXOnrsE56uxqVR9+R+Q+CIAp4wdWjLmC/mpuTL0AJaKNgHgTt4WNs4o4uwUjiZvBsr jCog== 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=E2xMtfg5bJTmZe94/qx4v5HPv3cpP1DHi2yBTTi4UXk=; b=rK5xadCQt2X1p+thzBmRfDYAH/05TRTlMU3n4QTBnW1AL+J2rwQ0ccQ1mPm7IjF5QT aBi47GEZnK/+O8M28RmUjbbBAWmMmV9BHT7DJ6SZIHGUD8BECQWGMRi5E8LK/IV043wC Fd6YDoDASOizZdTWQe65GjAElAFVmiYepXhpXOmrTf22O2aB7iD/uv0FVluKpHLzL6KH Udfpb3jhgXuc+f3rTBIPCkbpWKKrbC65swxe+ExX1rf+8eKgBE0HfTCJ1/YQxDhwMkOg JrDvTPWu/OyIE6n8ExIdjFyC5aTtNQD8TSdSg6wLFMaZjjd1VRmCYAqdk4+KtQ8hbKct GTHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yiEGyuxw; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 z19si16302545ejr.244.2019.10.16.12.37.38; Wed, 16 Oct 2019 12:37:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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=yiEGyuxw; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S2394463AbfJPThd (ORCPT + 15 others); Wed, 16 Oct 2019 15:37:33 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:37497 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394448AbfJPThc (ORCPT ); Wed, 16 Oct 2019 15:37:32 -0400 Received: by mail-qt1-f196.google.com with SMTP id n17so18518623qtr.4 for ; Wed, 16 Oct 2019 12:37:31 -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=E2xMtfg5bJTmZe94/qx4v5HPv3cpP1DHi2yBTTi4UXk=; b=yiEGyuxwygGASqd+4EnfQQXnAstv6WNIJC4tpcMTrjTHMRBlAxqUUmy3TXbQ9wu1OS jDd/n79uL5Fh7FnlU3t+AjYcBamWvQW9x5Fk4Wu2074XgFIzZ614l7R8FsvKfxEMRsWJ ITsuWypSAEltVlevAHN+PVhr+CvPw2BZNuOgs/ZRm91Ly7xpPDomQ4Rv00ssBs+cxQFg 0B3G4r0phywCDRzo2iFnxSmyTQTnWVtEJDawys7gUkmESDhvMhbJb7XHsia+hkyAB/of 7OowfA6qoW5J/sGNBUqAGvouMHJQYZA2yIbTy4NzsYAcJZ4oqmGDXC087MoHr6rLPfiA LnkA== 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=E2xMtfg5bJTmZe94/qx4v5HPv3cpP1DHi2yBTTi4UXk=; b=B/kp5n+/y4VQ43NfP8boKezDQ94qE5Djm3YKh21O/qkdJiFB22NKmHlomv3yBXKNxX 91kWyPsdEX4V8omznpa+iK38JR2NbG/G2nxtCQliyg0wbivCBxFJpgSXzfdRzM2IxXBh Ova8n6EugVDMTosLIrvj6sTnO3dGcFK6hgKTPcqrK4K7abA4GEv8eko6z5xFXOSznV2e jIP824HOO6z1bhLV3hff4RSIseAb4MQh7Tov8g6fguTHqQ3zxKg5VLsUsPVZFzKJKf4q 62F9XqFMWS2J+e1ksxPLzp+fUUD1h3/x2+qUm9e7UB2Qr81C5gqptQPblrbJHmtm5P6Y lX3g== X-Gm-Message-State: APjAAAUzR6Dxnr5mMyxwQRSXNnBeLtVJ9+WJH90XMy7AdTqCAcsk60iX J9u9fmIm6uz767I9CvdHAGGlAQ== X-Received: by 2002:ac8:3652:: with SMTP id n18mr13523277qtb.232.1571254651349; Wed, 16 Oct 2019 12:37:31 -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.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 16 Oct 2019 12:37:30 -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 2/7] soc: qcom: rpmhpd: Introduce function to retrieve power domain performance state count Date: Wed, 16 Oct 2019 15:37:16 -0400 Message-Id: <1571254641-13626-3-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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 --- 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;