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: 12430991 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 6CAD0C4338F for ; Wed, 11 Aug 2021 12:09:29 +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 3466960F56 for ; Wed, 11 Aug 2021 12:09:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3466960F56 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=R9WDNBHQ/HUK0rFQWvI8cumZHs9HkENF3kspHkgEu98=; b=R24tgTpgvpeO23 IjR8OmWLljlDOcvbevCtfuv+iZ230jAS245UkHJbS3ql0kOY240ZJ8cZcFy54JG15RzDu2Opb/dBE WvbVhiMtVEWKN7ovZoNr19zSXli2e7nv9ElsToqdQGwJNsqqSop47S5yPUek0VKMXAiKaQSWTy603 +SiZtH8E/kzciRXcjQdTQE2+HLQ2AxWTPjNn8WAYk83NsyhNnJIHrM7466AblDc8UGdAzOymwHEbP c1byPmcXuczFFIlFR9tC595d9tIqpv2A3HoOgnwElYi2VLOe2hwAdpkgbiKqG/ILOnnQJrTkCwXn5 QFWhEED0OfeBLSlgi3pQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDn0P-006teD-IR; Wed, 11 Aug 2021 12:06:45 +0000 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDn08-006tZb-DT for linux-arm-kernel@lists.infradead.org; Wed, 11 Aug 2021 12:06:32 +0000 Received: by mail-pj1-x1032.google.com with SMTP id m24-20020a17090a7f98b0290178b1a81700so4407391pjl.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=E25fmG+C8S3UndKIgj4GAdH5a01S2gRgWwC8ccF+Th/RXAfQ3LIa4FDV2MjSsCct20 p4cROY+diG3nh62iEKu+lXMuUBIeAS/4g5XVLq3fzqJKrcvnn0xvxB74Elx48KnFIZq/ +YV+Qvb+WbYw8k0kgQSsl0LJtQXk7VOpEz/FJ+GvU8uA6iKWtaLm67EwEdNuBXEQRDY9 gRbW45zsa0PQ5ayRCgmsAL+GSFoHZWQ0rZcYmbeJkLS8qtNl+FvqCdXEzKxKJP0rarEW FdUYcVVQ1RZsb07xDYK4g8gbm4QXH8MUCmjgRyIc92KANK7bmhRXpRb1sc+SsdQLDbV6 Ofhg== X-Gm-Message-State: AOAM533Etst67j1tIRhxM5H05mz6TYZe3F7bfrqbIqLWPj5id63uSwu4 ys/7Nyk0EZT/eOr7Gvl4rWD9aw== X-Google-Smtp-Source: ABdhPJwMwN2fm97TlkXuwYPxuFuL4cxb2WPXC0Be7ZXZT7ga2QkHLotZZsNvgbZMaOm1uLqj8hwR+w== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210811_050628_494652_A6DE441F X-CRM114-Status: GOOD ( 12.86 ) 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/mediatek-cpufreq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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, };