From patchwork Wed Aug 11 11:58:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 12430983 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 9C052C432BE for ; Wed, 11 Aug 2021 12:09:00 +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 5D7E960FC0 for ; Wed, 11 Aug 2021 12:09:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5D7E960FC0 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=kEXVjnqK2Z2VJCpAybk4X2ZVLWvjzNEtJ133SWJlIbI=; b=ApmxhDgA3Uh4fV x1o/UpNM4HSlDaXufcTis4lk78ih2+0gztrJ2DSVcksyRX/NjvwB/OYdfX7x4gDjKfreIXzW2s2E/ UfgP/wMLDNRFxghHxIp9Pf02kjw5VOpXjgzm8Zm9NVI04SRU6tahyrgFJ4UZCRRT2NNg+2k1Y4Trj uhD0k0XL7EVvO89SxbdswnLMBdBbIB4cN8gyaVM25D5QJEVJi9AsjmxuBmI7swqMSWnrpM++5q9NS ccyoLUyv80SBvOSPPrwyVSPgexnin4SH3yo1RVBPi8uQf4VOTfzys8kIqZMJslTpG2LJldi55xPO4 0lMpTqq7D+4Q7ns16Ntw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDn0D-006taV-7g; Wed, 11 Aug 2021 12:06:33 +0000 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDn05-006tZ4-Bx for linux-arm-kernel@lists.infradead.org; Wed, 11 Aug 2021 12:06:26 +0000 Received: by mail-pj1-x102e.google.com with SMTP id u13-20020a17090abb0db0290177e1d9b3f7so9182347pjr.1 for ; Wed, 11 Aug 2021 05:06:24 -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=3ofSxGdnm5bQgO5ybUPtJlTPnLp/1dUTraYQIc2Dj88=; b=iwTOkiC/FXUeP1MLxGDlrpK1q06mt4TyUQNlfCjlir/zVNQVwmC8IyZx1okkLu9f/j 606hr/6LLIzeQjXQ+gfVkmRvwMz4YDiy+OMpHXFxUDReYSC1TvYUeK1zgTx7cyIWKHya 55Hv68e/543vCLaQpFrJNuOrjoAA/GphQd9g/FJuN5c6ngePB3XNSNhm58UFR2n1TjSU wPjXtCe5Lul1gMnoDsBOUUEHlYqDovYwMAbip1yoSpdkQ25r3e6hx7qrzJW4Ha4SR3+k y3evmJrMv5CVxHCDUXDyKcPKiojH6Fdp7VMRO0Tn8B8g27ZozDaQysQZ8T2urFOcaeHW y2bg== 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=3ofSxGdnm5bQgO5ybUPtJlTPnLp/1dUTraYQIc2Dj88=; b=lHJXIu/6UFyyGsmFttxlFXVlDI3rbR0TrOWd6N9K9XxRAvB9I4Kqg65yL8lNxnpkZW 3kySeXvuLCIVITfBDNllsqO9gJ254/YqBCdzF9h1O0+Gej5wvYsr3F0qKo8bIXZ+T7Yr 1ivHKeOmr0DhBxclkH2zoZkh2d8ckMLfPjDNpPNzfBLc40zzmNTZdiCGBFIT9kUYlRYm QbXJZrdRUfEqy7b5a1V7w4er41EVTZSeAFUXZQw+HyweU3jBfPgeCyAVYh4leQb+SKTf SZ9VPvG/gCc0Y2uPiHAcxAEqB1dOPdyS9E8+LDIREJ5Hv2Z/8cIXI1aOwvSNw+xBnmjv ik9Q== X-Gm-Message-State: AOAM530i9opSl7VnE+rGottsptD/RsvdqKIPlbKxBkvH5+4cPbgxOvf6 K9rpGRQe511iW1qF+lrhXdMmTA== X-Google-Smtp-Source: ABdhPJzZNCarUQb+wmgvHCqQuBebizl22BB5vB7L87pka2ErubXU+XPnoyKImVLRbKOai4WDMxq6rA== X-Received: by 2002:a17:90a:ff94:: with SMTP id hf20mr20868931pjb.64.1628683584303; Wed, 11 Aug 2021 05:06:24 -0700 (PDT) Received: from localhost ([122.172.201.85]) by smtp.gmail.com with ESMTPSA id x19sm28203832pfa.104.2021.08.11.05.06.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Aug 2021 05:06:23 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Viresh Kumar , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team 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 3/9] cpufreq: imx6q: Use auto-registration for energy model Date: Wed, 11 Aug 2021 17:28:41 +0530 Message-Id: <69cd4b06c671fabf828c853a7dd6ea6225357d42.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_050625_451082_563799EE X-CRM114-Status: GOOD ( 13.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/imx6q-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index 5bf5fc759881..90beb26ed34e 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -192,7 +192,6 @@ static int imx6q_cpufreq_init(struct cpufreq_policy *policy) policy->clk = clks[ARM].clk; cpufreq_generic_init(policy, freq_table, transition_latency); policy->suspend_freq = max_freq; - dev_pm_opp_of_register_em(cpu_dev, policy->cpus); return 0; } @@ -204,6 +203,7 @@ static struct cpufreq_driver imx6q_cpufreq_driver = { .target_index = imx6q_set_target, .get = cpufreq_generic_get, .init = imx6q_cpufreq_init, + .register_em = cpufreq_register_em_with_opp, .name = "imx6q-cpufreq", .attr = cpufreq_generic_attr, .suspend = cpufreq_generic_suspend,