Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp947440ybg; Wed, 3 Jun 2020 18:59:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyESIavagaQRSYHi0+XBsg6bvO5n8Kq/cN32EDKcy5FVUyowAx7+ZS5kLkYPnKvqBe4K+x6 X-Received: by 2002:a17:906:a2c2:: with SMTP id by2mr1927006ejb.454.1591235947335; Wed, 03 Jun 2020 18:59:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591235947; cv=none; d=google.com; s=arc-20160816; b=yabF7AqOJbdqzAo8vqUJ+Uj9ra4LL0GSLysFaVyi/WWoXY60q0CxR1QsgrIUbvNBd4 XOipOPUVpve9C5qg07mMnauaDVF4TcDxfySZcbCPKC4hkGm3YXom3p8pfkXpkFb9mHAE tr4eMe0O9VpLXeND6GKVsGlerlUYtCusMJsnlXez/5Llj1oMlux3bC2vQLeGI223CAZ6 ZbmnS3j+uiY72b0nr9WsUm8uPVZQ8fRTMXKqw9gr5p7ut49QQmBxMxUNtvoXPCreaOO/ A8VLFSg+skR/wKV8KI28w18SK0BDwRvnLmCYOEZr7S4/imNt434S+vruVCpDJDm7lbAV vWsg== 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=Ol8M2KCtVTfhjIudQ80yoAA541E23GCrsvIpBzMufk8=; b=QkEINT99OS7XMfmbbDae5DjQXIuh5U6EZ0J4hPoojZWC+C51S2ZPeFAbMDcUqEFTpJ qRXMRjniE+v5Z8xrjBc1eVnVqT0oio37J8UzjOOUyArivY0w+EdXwkCZ7KyC5KRBE6th mX3/6qrHwU0+MTU0ynRuKsnr7RF8fT+QszNPBvGLfsq5hhfj8aXeuAOidCteSySAZQ68 4UCjPfQgDPYC1KHXn1P2nqtRs90hAeUO/boFoXK97WMLsfx6abRqqm80CeRTBAh3th4x iPXwya5Y8vpoIL/LuUqGRjFV2djR2FurWjLPjpawVrReqiv8dAulIzgiZkZIasa8rUM5 /zzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g+JVXvVE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id l24si835069ejr.561.2020.06.03.18.58.44; Wed, 03 Jun 2020 18:59:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g+JVXvVE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728085AbgFDBxv (ORCPT + 99 others); Wed, 3 Jun 2020 21:53:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728007AbgFDBxX (ORCPT ); Wed, 3 Jun 2020 21:53:23 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5478AC08C5C1 for ; Wed, 3 Jun 2020 18:53:23 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id d27so3969501qtg.4 for ; Wed, 03 Jun 2020 18:53:23 -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=Ol8M2KCtVTfhjIudQ80yoAA541E23GCrsvIpBzMufk8=; b=g+JVXvVEhHBGXKk2wAZGtNuoP1FYpvjvUuC5MOwY3es9FBBcxhVq6st1ofsoIOh7+e 2eFVCjT62+hMAWz2US1Slf0/Wzf6zyrhKXZ7XXrIwxVYhhLty0DDItF+ZpBm5FB4Eqon 7uv+DEl4e5steUBdILty/uqHIbznxb8XXwua4wBLyTUX1Ln0ENC4YgiE7rXkPKrqw/U+ oYXNL+FC6xTjKapLxYXEgp9prko8EXbVw4RR7+kADWkJgyS/CfIvgcU4mIYg+ez2B4jR ouIkuZGdHNwOWxpM8m4GtThiXkCxZTYLikuEoLjVRopgs8ZAqm6hkSFQj1UNuSzaG9r4 hCkQ== 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=Ol8M2KCtVTfhjIudQ80yoAA541E23GCrsvIpBzMufk8=; b=SSO5XvwaZ5+RXZjBkuZzEG5gbsmVgbxCojzFZiKlsklCkWZ+vy7gHRAEHwTeawj6BL hCAvQHBIKXJ/9k2uvwrAON2EhNt/Ee1wkRcUn6CMJputG+Kn01CNJEvsnjkPe5VHhT0v Z/YhWoe9EmJ7Xro6W6Z7Pn/7woUYDZbkaR//IGsO7hSNCssunG3W5LUHIiJGm5rmvVQg nYfakLWcQsKGOopi2N5lN+y5gGJbRzQqPXe4AiBIEofdE6lTlIggtsFTcQdIA4E6iFxD tOYgOKiJhk4KP8N/BHBcYBI9OSl0WviOHSHX0yqYiNTjv7NjR0BPxeN2GuBrbfkIwAKq QJFg== X-Gm-Message-State: AOAM53353PLOOt6Eh4gusaE//DRiRGeUVoY4+zvVvT1R8Tc5ylYRPtDr UbGyJA1GtNDH3cV4QZdwjf26qg== X-Received: by 2002:ac8:2bc1:: with SMTP id n1mr2332050qtn.382.1591235602521; Wed, 03 Jun 2020 18:53:22 -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 t74sm2986439qka.21.2020.06.03.18.53.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2020 18:53:21 -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 v6 2/6] soc: qcom: rpmhpd: Introduce function to retrieve power domain performance state count Date: Wed, 3 Jun 2020 21:53:13 -0400 Message-Id: <20200604015317.31389-3-thara.gopinath@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200604015317.31389-1-thara.gopinath@linaro.org> References: <20200604015317.31389-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_performance_state_count in genpd ops to retrieve the count of performance states supported by a rpmh power domain. Signed-off-by: Thara Gopinath Reviewed-by: Bjorn Andersson --- drivers/soc/qcom/rpmhpd.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c index e72426221a69..a9c597143525 100644 --- a/drivers/soc/qcom/rpmhpd.c +++ b/drivers/soc/qcom/rpmhpd.c @@ -362,6 +362,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; @@ -450,6 +457,7 @@ 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