From patchwork Mon Feb 4 11:09:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Perret X-Patchwork-Id: 10795427 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DF9866C2 for ; Mon, 4 Feb 2019 11:10:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC6AE2AB7E for ; Mon, 4 Feb 2019 11:10:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BFFA62AB87; Mon, 4 Feb 2019 11:10:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7A2E52AB7E for ; Mon, 4 Feb 2019 11:10:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=z7WBe6wf0JuQQWoOBSHLI1+/7NTMx6nNfI1kUuqqA88=; b=LLUSvKqJGtY5gQ Wxs4BzHv/Xku+H4y6bZceho7Xn4fn2o91LmviewIsAyz/VlJPM9VT3w45Bha/YTg5B51CmSK8Mnh2 gJt5/uNBXTjWf0ZosJHXXo6uMpi3oWOKsos5Bi6YeAauiDjO9xAV6HJMfdjqYg8kxV89Dvsu32lxQ 1uRNgQyXCuTDZNkAoC578Hn9Rb/vay1n/wZ7isjVdC5ezhDZnTiLFngBzhgTTktjOLaiNjNc6u4b7 /9PZwEWHLDFe5kox31/DmGEoET3UWRhLQp8aZtVJil3JCpiTJkfV058nrLhx87lIIxuhRHD/H8Tp/ HDaV6futw2lWC26tJ7zg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gqc9F-0001oc-2t; Mon, 04 Feb 2019 11:10:45 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gqc8a-0008Ss-1u for linux-arm-kernel@lists.infradead.org; Mon, 04 Feb 2019 11:10:06 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 75A7CA78; Mon, 4 Feb 2019 03:10:03 -0800 (PST) Received: from queper01-lin.cambridge.arm.com (queper01-lin.cambridge.arm.com [10.1.195.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 858D53F675; Mon, 4 Feb 2019 03:10:01 -0800 (PST) From: Quentin Perret To: viresh.kumar@linaro.org, sudeep.holla@arm.com, rjw@rjwysocki.net, nm@ti.com, sboyd@kernel.org, mka@chromium.org Subject: [PATCH v4 2/5] cpufreq: dt: Register an Energy Model Date: Mon, 4 Feb 2019 11:09:49 +0000 Message-Id: <20190204110952.16025-3-quentin.perret@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190204110952.16025-1-quentin.perret@arm.com> References: <20190204110952.16025-1-quentin.perret@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190204_031004_142535_A82BC3F7 X-CRM114-Status: GOOD ( 11.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: quentin.perret@arm.com, dietmar.eggemann@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Now that PM_OPP provides a helper function to estimate the power consumed by CPUs, make sure to try and register an Energy Model (EM) from cpufreq-dt, hence ensuring interested subsystems (the task scheduler, for example) can make use of that information when available. Signed-off-by: Quentin Perret --- drivers/cpufreq/cpufreq-dt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c index e58bfcb1169e..d74e0402512a 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -280,6 +280,8 @@ static int cpufreq_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = transition_latency; policy->dvfs_possible_from_any_cpu = true; + dev_pm_opp_of_register_em(policy->cpus); + return 0; out_free_cpufreq_table: