From patchwork Wed Aug 11 11:58:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 12430993 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDE0FC4338F for ; Wed, 11 Aug 2021 12:09:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9417A60F56 for ; Wed, 11 Aug 2021 12:09:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9417A60F56 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=L0C8eHWt8U0XDJ+TgQTERBA/wBIZJ3pqkoGm50g82qM=; b=B/u50jLHlac55f MJD4sEfIprzH69rzXQm2/ns0vDu7N0/BKynx2G9XcHlwJiPCCPxP6HR9TXRQkO20Nb/ucUCJYrYSM 5iz0ZNBvv4TfJvCPiZim+q3xtLpG2JqZkdbiGjyJ7DJ3Hpu1b5cTUBaO7y0/q70EtKjjPaladdyCV 5nU1PMRBLZGUI7yLC049CP/yP1J/q5fqGmbfhxc3BSi3P1Fztxjt8nJ1GSJafX83A7pIogtO23OIF 7LDxt7xftnLR4uAbSX8Db5ZjIf+70O9R4zPppkLY4qZiC6ZvmcXWSHZFIXEENNycPte3Yauc8AB3h 5kihBjtsrg3lLVeDeP7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDn0p-006tnk-6L; Wed, 11 Aug 2021 12:07:11 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDn0K-006tcX-RF for linux-arm-kernel@lists.infradead.org; Wed, 11 Aug 2021 12:06:44 +0000 Received: by mail-pl1-x62c.google.com with SMTP id e15so2392151plh.8 for ; Wed, 11 Aug 2021 05:06:40 -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=ufOzb/yHm+Yy0muA4H19fAJdjtQW7OC7JUKwWc/tDWo=; b=C9FEmgjFCyHEUOJxkqjYRENiWra7tJpf8wDbmNI1upCMG/ARVHHAifgv/ZnJhTgg3R UaSyeUK7cR6CUQ7gEIpyBEmz0yZJronlHOtiOkhy8HTJD7HDIC2Egbkj2df8jpcjkiM6 Z2lZ7INFiaX+paBNzkqx3ShGy+TEq9OidaoBaI7yyGw5VFP3//0mZJf5QJzBy++KNoO2 002Y3ulPb+Sdez2kGgqsqteBtAqnSe5lBczDjfBDRIIc+8OkzvfMCAfZ7zSYCdT0TMhr 9m5xhlK7Fhg1DzjpVeItxBu4kC1BGD145jv9p4RGy6I9KJPaTRPDi0ssLbPznIw88f89 dWdg== 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=ufOzb/yHm+Yy0muA4H19fAJdjtQW7OC7JUKwWc/tDWo=; b=Wm04eSFCnsvmdlA+9W35bK/TWD9ZsPM6M+ZXXLgsXFrlfwXxIoUiF7zd43bw8sLMUX wzvM+4Kd93GKCe+5tf4p1ZRNINGfd4tm9vvz/4Hx0hYoESjKL2P+xlOOgVefrVWNHQQ9 fYY3I3i3Sg9kKph62wc81O47jisTXM+lYylOPNQ0hUDt08nDonqdO2l5OE860v+p0YiF zzu4roOFQS+TAgPdd9QoTUW4zI1pc1P7m9v/+VhVU7OXPXAyqyDW0plkEPU1IR9zlfFF VZvAM3/TWekuBORuSE5refoyjDDpn+FFuQY6nFHbtz+x1jdlILoGw6+0oVPCe99ws00M vbpA== X-Gm-Message-State: AOAM532yDzA3y/lMz1IH54FjrBcvMHN45b6lKCUGygTEbXLkJxN3vdkL kG5fFurrVTpvl8sJHjkZVulcVg== X-Google-Smtp-Source: ABdhPJxvHr2moebqTWeOc7YEmfRnU0PSE/Fg2Y67L6NrwCW1hpUZBTGwvdnIfENauclz5a7ivS6BNw== X-Received: by 2002:aa7:8d0c:0:b029:3e0:2e32:3148 with SMTP id j12-20020aa78d0c0000b02903e02e323148mr2128487pfe.23.1628683600347; Wed, 11 Aug 2021 05:06:40 -0700 (PDT) Received: from localhost ([122.172.201.85]) by smtp.gmail.com with ESMTPSA id j18sm17649389pfc.98.2021.08.11.05.06.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Aug 2021 05:06:39 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Viresh Kumar , Sudeep Holla Cc: linux-pm@vger.kernel.org, Vincent Guittot , Lukasz Luba , Quentin Perret , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 8/9] cpufreq: vexpress: Use auto-registration for energy model Date: Wed, 11 Aug 2021 17:28:46 +0530 Message-Id: <0bc6387893ea7215da658943ddaa2208f5f3e239.1628682874.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210811_050640_955117_899F1F28 X-CRM114-Status: GOOD ( 12.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Set the newly added .register_em() callback with cpufreq_register_em_with_opp() to automatically register with the EM core. Signed-off-by: Viresh Kumar --- drivers/cpufreq/vexpress-spc-cpufreq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/cpufreq/vexpress-spc-cpufreq.c b/drivers/cpufreq/vexpress-spc-cpufreq.c index ab56813b7256..284b6bd040b1 100644 --- a/drivers/cpufreq/vexpress-spc-cpufreq.c +++ b/drivers/cpufreq/vexpress-spc-cpufreq.c @@ -440,8 +440,6 @@ static int ve_spc_cpufreq_init(struct cpufreq_policy *policy) policy->freq_table = freq_table[cur_cluster]; policy->cpuinfo.transition_latency = 1000000; /* 1 ms */ - dev_pm_opp_of_register_em(cpu_dev, policy->cpus); - if (is_bL_switching_enabled()) per_cpu(cpu_last_req_freq, policy->cpu) = clk_get_cpu_rate(policy->cpu); @@ -475,6 +473,7 @@ static struct cpufreq_driver ve_spc_cpufreq_driver = { .get = ve_spc_cpufreq_get_rate, .init = ve_spc_cpufreq_init, .exit = ve_spc_cpufreq_exit, + .register_em = cpufreq_register_em_with_opp, .attr = cpufreq_generic_attr, };