Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp157065ybb; Thu, 19 Mar 2020 18:44:53 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvV3lBBH80xUCkCtoMGxSHA0L1LygVFgnBHHVHIaG4y4VGS8cN39V/ItmbCBshvbl8cceA4 X-Received: by 2002:a9d:64d4:: with SMTP id n20mr4565071otl.193.1584668693002; Thu, 19 Mar 2020 18:44:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584668692; cv=none; d=google.com; s=arc-20160816; b=OrNJOxcOaKTDz26scJl/Mzi02BNUzZYytlj1byRqSRRWIdEHhSTXPI9Yv8ZhRAHU38 U9oOxPf3w+Fb3jJXn9K9Q1q3B0VPAOQoeyuBx0P0aLPMvnV+0EvdoqFHsuGAYXn3jKsd 4SLzIkZAVmE9j13xzyp2OYYfMZy3HdwEkdC6z9/wbnRwhT6QCG3Y8Yhzj4GzZk5u+6h6 P/c/VUL834NCNw6aBBJgvu6bOQ/XMtMJktOE5qFt89IblqrWeN59QksMqyh4wliMiVYF 3YxR+To4BMFnlE4vq2Pc8lHul7cpRkpFap2LbvDUPyqawZqvz3YaiWpljSLJ8p/MndVw cmew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PMpp9cGV1kolIa23/+eXnHG3jYVNr7iJ09Ptby/dQWg=; b=JI5xhWMAnsPESzZIoeBGRXaRrbYmCKMLEhl1KyOuY46XexCLPOVNvuhxqDiIQba4nQ fznx5YVrFSQw+6uMrnJZ+p0Jf+rb/XDprLaTGbhwTaowJMcly5AcuR4k0trqj92UNI5f Uq+leJSlOnEj82DqX163yj9BxscCcA7Jk6dtkqavURF1y/4O7Bozpc1NOjCUqGDAfrdv vZTX4ODEzV1O0yozAD4QtZC5Y5sxMgD9DNY4ZFjTgkeuMM0uHrsyHS/L7GoHpJFiU5/K PS7zG2wMuP2bp4LGStlkxontkQp5KyCOXBnm4Iqe1bakHpdwtx5xI/b2/SpTAJ6JUm4C r+ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iUr7LVw9; 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 c10si1910021oif.81.2020.03.19.18.44.41; Thu, 19 Mar 2020 18:44:52 -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=iUr7LVw9; 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 S1727415AbgCTBmX (ORCPT + 99 others); Thu, 19 Mar 2020 21:42:23 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:33162 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727238AbgCTBlN (ORCPT ); Thu, 19 Mar 2020 21:41:13 -0400 Received: by mail-qk1-f196.google.com with SMTP id p6so5430936qkm.0 for ; Thu, 19 Mar 2020 18:41:12 -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 :mime-version:content-transfer-encoding; bh=PMpp9cGV1kolIa23/+eXnHG3jYVNr7iJ09Ptby/dQWg=; b=iUr7LVw9yHWif+ZG2vxEMY0bR1h+bCvJ+y8Af7km3yxODyCKqGeLTuoAa94xgvtgvN 9r/pYxzS6JQpcpWm6vPUMohRn6hsM+mnz8L/BY7V9ZuUcOl8gFc/Cl/ONKiXSl2AwYID 4DAY+x0Q81jFcJcTVsMUpyGs/ybHm1U4GYKlV8sEh1ON90pbIijtoj5Rx3dlLn/iHT1i Z4A++AavvO8qdTEW/g3j1JcgA/OTnxayZveVOoI8mupFY3geIf3aEqQkt94XG3BVgW67 AWJW6g6HffdtQsixG9lBHGPbeENRX/pNWXM5SnyOipO8XPB7/JyA4K085MljAgLQrnOA bWOA== 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:mime-version:content-transfer-encoding; bh=PMpp9cGV1kolIa23/+eXnHG3jYVNr7iJ09Ptby/dQWg=; b=YN4WuckNOdHY8FYlJlPYsT5iIyBuLyncwRPKpwKyQAeKyCWj5nUE7l9xSyVGmUrYJ0 VNMFEieghMchWWxKXGLFUfkc8jdoXHQJ3MIrgwjiZk+9q/I2D74u4PdGevuCldo6UhiS eGArzi/EjHGSENGrhW+QOFFzX0jvPqQVtNUY8zfkmUNl0KxsC+CBchlkcKX14BUJAR2F hbJJnibM5KavKI+1hwiD6i7wonOouUk9PFw4rKGgTh/0tANZH3z5LqojYTrNc1H9h87p cs+U8p20puuybsvrqwonaoOvCrkY/BTjnvKyLn5KCUi8ItCS3y9x43fLwmIGhDKuFABT asuA== X-Gm-Message-State: ANhLgQ2me4yif1b/LL2FMD4I8FpjsV82qCf9v5ttvJ8sNweQ5sT6C9rE tGMZkkjJAv6Bx4jhDyX9f0Njeg== X-Received: by 2002:a37:aa92:: with SMTP id t140mr5385602qke.119.1584668472463; Thu, 19 Mar 2020 18:41:12 -0700 (PDT) Received: from pop-os.fios-router.home (pool-71-255-246-27.washdc.fios.verizon.net. [71.255.246.27]) by smtp.googlemail.com with ESMTPSA id 2sm2706287qtp.33.2020.03.19.18.41.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 18:41:11 -0700 (PDT) From: Thara Gopinath To: rui.zhang@intel.com, ulf.hansson@linaro.org, daniel.lezcano@linaro.org, bjorn.andersson@linaro.org, agross@kernel.org, robh@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 v5 2/6] soc: qcom: rpmhpd: Introduce function to retrieve power domain performance state count Date: Thu, 19 Mar 2020 21:41:03 -0400 Message-Id: <20200320014107.26087-3-thara.gopinath@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200320014107.26087-1-thara.gopinath@linaro.org> References: <20200320014107.26087-1-thara.gopinath@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. Reviewed-by: Ulf Hansson Signed-off-by: Thara Gopinath --- drivers/soc/qcom/rpmhpd.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c index 4d264d0672c4..7142409a3b77 100644 --- a/drivers/soc/qcom/rpmhpd.c +++ b/drivers/soc/qcom/rpmhpd.c @@ -341,6 +341,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; @@ -429,6 +436,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; -- 2.20.1