From patchwork Wed Aug 11 11:58:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 495165 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:396:0:0:0:0 with SMTP id y22csp4900221jap; Wed, 11 Aug 2021 05:06:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAcjUYKSv9x1iwZe1xC2LTgWhwDLzAGXJ3bMZ9tDuNM/uJCvCOyZwMRYqZoQPw6NoSXQxo X-Received: by 2002:a2e:a447:: with SMTP id v7mr8304090ljn.46.1628683598426; Wed, 11 Aug 2021 05:06:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628683598; cv=none; d=google.com; s=arc-20160816; b=ajX7pfIRqKmYPKLw+HeG1BrBPHWZeClLfsPYTD8kI0WlMQnvmTPkTciGf7AmYdP34K K9pxfRh90gKSs34bvnQTa+TOTBlpgGop6PMU8LbBvtMfnKV9J2msIU+37G5LsdA5F4Pa ZzvLqZL7mDXUclqLhHWpd3nIWe/IW0h54gCOB4YMGEDu8MpOWykXiWqXUa9cWXYA04EJ ag1ywmVkZzofp4XhG7CxPs3ioVsifU+jayv535RF5DVWCeLZuDpizFN1J7OG2JaE6ivb rgniV27SmVvtaUjpIi1nycc5by/9SoDKkk5yLC+eebkZ+LqHyVdgYyZ91WubdE8p/y2Z z66w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6ufaB+OMXdYU7j7TBo3XtAZpCHOejyA+3wA93Op1lzU=; b=BefVx/D2BX0E+6+oNAPetLfjdCTXdDEtQ0mFhhXpqffzI6VBLeo01kMrGgB04L1M92 sRvYC3h2bzQD5l3YAEdw/luFaakqp0/NPxntlmO0C941IsHzKZp59QnkLa7dhNaZgNLk vqr+Li1syxUualHsvvuiOjLxlsqbA5x2ueY+g2SPxJBMcc5UoKldj5qXXlc3RlxJ/PUX CN+EMXX1HkpZOssES90m08oYL2lhGmPZJb1ba5ihv0oGcVNwhHiOLflb9S3c1HG86bTY FlVGraNEBmodRgwo9ahFi6ooOYTY6Qdg6N0rJEGNh/HfdcAYvotRWc5yFirQTz4lGlrb R2AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t8lLzjPF; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-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 f3si4066647edq.232.2021.08.11.05.06.38; Wed, 11 Aug 2021 05:06:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-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=t8lLzjPF; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-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 S237540AbhHKMHA (ORCPT + 7 others); Wed, 11 Aug 2021 08:07:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237312AbhHKMG5 (ORCPT ); Wed, 11 Aug 2021 08:06:57 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6219EC06179C for ; Wed, 11 Aug 2021 05:06:27 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id n12so1747311plf.4 for ; Wed, 11 Aug 2021 05:06:27 -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=6ufaB+OMXdYU7j7TBo3XtAZpCHOejyA+3wA93Op1lzU=; b=t8lLzjPFZAWIYgTJOrFd2HG+scMTfIhGn3oErjtmiM//ccrcySFz8JOOZKulU+EiNL OXO+8zbdgMhoqwmYzFPpIQvy4NwR+3xGy5J0bpgHy4m6WaA+Vf+QrgkpMTwpC5PcNtPD +3lIVvpcRqaoz4+sOPxLsf88Wq0iRFXBDSECTlXfjDnmdjovXDpk2WgY//lc1NDMlyiD OH+cO8WaQ/hiuH1bJmO6CiXIanr5Wlii23Zg8EHPNS8qNTCNeQvGb7mbutXNddc+MLFl bh2hLW7kZP4owycILCEv6xAz8aM45z9ROAHxGDHqSi3Dwf27fyvzFcDHRtXM4FVUR9Kw QHfA== 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=6ufaB+OMXdYU7j7TBo3XtAZpCHOejyA+3wA93Op1lzU=; b=bMZo9zfCTBoAFbNz5gkJQg1ju7627zb20OAi71OdJOsXaIvUiSPQVl9GGFC24wzKxD pzMnSwrzzp88J0CYlWsB7+tG2U2P8Vo9NzISnMPayvmMlkUU+rPgTfUtsBniuPrCHlGs Hxp+dIW1dbGuMS6tE0dMFKT3m0dYpdZaTuBS7DSF9xbdAkBh72a9S4eC5PkKQJVn+k7p MQmxFwOEyALBOoA5kUN8x47+ny50aUiUCPLUlJIo76LfKSf2bcJ63MkZrkTkg7U8dxp0 ey1hH32qZDOJMPj9p6fxcN2k2FwhPAaQ4J1yZRrukMaYWN31mluOpyPJwh7P1Wd+VQS/ E4Ww== X-Gm-Message-State: AOAM530YC5H89AftXHdQDXgFWkWC+GWosr5qcjgraC6w6OYXiqvm64v+ wnRmWrJwFI8K1ZU7eFjHpKTp0A== X-Received: by 2002:a63:4b60:: with SMTP id k32mr562898pgl.198.1628683587396; Wed, 11 Aug 2021 05:06:27 -0700 (PDT) Received: from localhost ([122.172.201.85]) by smtp.gmail.com with ESMTPSA id j22sm31239903pgb.62.2021.08.11.05.06.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Aug 2021 05:06:27 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Viresh Kumar , Matthias Brugger Cc: linux-pm@vger.kernel.org, Vincent Guittot , Lukasz Luba , Quentin Perret , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH V2 4/9] cpufreq: mediatek: Use auto-registration for energy model Date: Wed, 11 Aug 2021 17:28:42 +0530 Message-Id: X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.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/mediatek-cpufreq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.31.1.272.g89b43f80a514 diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c index 87019d5a9547..866163883b48 100644 --- a/drivers/cpufreq/mediatek-cpufreq.c +++ b/drivers/cpufreq/mediatek-cpufreq.c @@ -448,8 +448,6 @@ static int mtk_cpufreq_init(struct cpufreq_policy *policy) policy->driver_data = info; policy->clk = info->cpu_clk; - dev_pm_opp_of_register_em(info->cpu_dev, policy->cpus); - return 0; } @@ -471,6 +469,7 @@ static struct cpufreq_driver mtk_cpufreq_driver = { .get = cpufreq_generic_get, .init = mtk_cpufreq_init, .exit = mtk_cpufreq_exit, + .register_em = cpufreq_register_em_with_opp, .name = "mtk-cpufreq", .attr = cpufreq_generic_attr, };