From patchwork Wed Aug 11 11:58:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 12430989 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 0F5E5C4338F for ; Wed, 11 Aug 2021 12:09:27 +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 AF73A60FC0 for ; Wed, 11 Aug 2021 12:09:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AF73A60FC0 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=vdbOSQNRVY8hwuWFhEXIo67jwNg3BHy82F/fchBhtUA=; b=W67aY2dEdpjKVw xJS2oCcrHqshs8CGoGN5GvErUwQ38PZhmfh/C0G4fG7e/Bmf30/S0yeUorWLRhLnya5rxbJ34OnXq 4slPwTc+fEnqlOArpzvbzvRGt/aakkkACgrtKlX5oVMjFO7Si+DLAw0VfWBonpgHvFO5Uk4RRHcYv /4CYZiumri7Lhs64518OtPg+yLiXzgMmte3zkJFwv1+OjO9CmQsD31U5GZvIwQtpxR6lk+LYcmPN1 YnHys8VFQQuQMl8Nz5/2PRfnrNkKws+DobM4oPAPB92eL/r/uQQ7utKZWLhOcb5yR9BsdVPIZ3cB8 rAk2+2jsE3oI86o6dVeA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDn0b-006tja-Bs; Wed, 11 Aug 2021 12:06:57 +0000 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDn0H-006tbe-PW for linux-arm-kernel@lists.infradead.org; Wed, 11 Aug 2021 12:06:39 +0000 Received: by mail-pj1-x102f.google.com with SMTP id s22-20020a17090a1c16b0290177caeba067so9246758pjs.0 for ; Wed, 11 Aug 2021 05:06:37 -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=4ZC+FP75mFAQwlcrfkbIZ+KkPc6ZyFBFhH1NecTG31o=; b=LkS+DJyCHnMxf56bNqFv4JSdLFaYjYrHiVV7mc3191cjFeYU3wHMqGpRM4gdjWsoAp MQJ4C/itAshvVXwGwO0e3Z2SG1ympyGA4sHg5fcQuGy769EMvr48vlOXEDlps+AMmvob 2bTZAOPXVOSz7g8rruXoulxOthp3RA6tJlmz9SJLfipbJTG226hE+c+VVrzYKhZypikQ I5OU4VJ3PEwx0lqwyHjDNO9EoYf8i6Krx/tylt0uhBBd4eCiVZha55T4ptkfiWUxRe6E nQOTmEUtmsGA+4cjv2I6J7D3TKxjHdMSkKn3iu0fUmY+nlCfnYG0zRgwcFR3496FyTfu b0NQ== 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=4ZC+FP75mFAQwlcrfkbIZ+KkPc6ZyFBFhH1NecTG31o=; b=OZe9UE+XZuSUlMPUande+HMNlMfLDuO6k9rjVSIJuhDA9tiP6nKkCuY9lRcLAGEe0A nyudbTVHAIvyWi3hTJ2LUdQhx38WTxGMNNQKvOG2yEqbauVXplUa7BASlZ3V6Z48UcL2 V0J/fc2gA2YFI6FAU2Yju3nfEys5RHl7lN91paLUTFtuZ1kocfTV+A+PRhZpOE5Cm0ZC Nw0+xGUKtd4wKtLAVOAFLXYfkQRuumKEyiGmGj5fkD1m1gKWWZqR5cr2BS2z1+Fg/uUa jqKXYyaST7bgQxi4y2CFZEiIOiuwBXAA1jGl7iRgL2h+0WCMZhfqWfoBcgKL0ikK54gj BFIQ== X-Gm-Message-State: AOAM530KEyAqlLK+0WSywT5IkynSoebVseFso+6+vxz+fh2w8Bk0KV2v VEs7zNDhACy/kC1/Te31yVkbNw== X-Google-Smtp-Source: ABdhPJzGHtxhmO400NQHWlqt2IjTlmDB9nqX4ApB7X9GkIcCGAOr8yD9hP2gPOMw9DkSYnZsAdZPGQ== X-Received: by 2002:aa7:8889:0:b029:3bc:e8a5:50ea with SMTP id z9-20020aa788890000b02903bce8a550eamr28572168pfe.73.1628683597329; Wed, 11 Aug 2021 05:06:37 -0700 (PDT) Received: from localhost ([122.172.201.85]) by smtp.gmail.com with ESMTPSA id 23sm14538606pgk.89.2021.08.11.05.06.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Aug 2021 05:06:36 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Sudeep Holla , Cristian Marussi , Viresh Kumar 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 7/9] cpufreq: scpi: Use auto-registration for energy model Date: Wed, 11 Aug 2021 17:28:45 +0530 Message-Id: <29c65db2dfcbfebdb291a3056cc2adaca8b34cec.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_050637_890269_6231D440 X-CRM114-Status: GOOD ( 12.78 ) 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/scpi-cpufreq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/cpufreq/scpi-cpufreq.c b/drivers/cpufreq/scpi-cpufreq.c index d6a698a1b5d1..bda3e7d42964 100644 --- a/drivers/cpufreq/scpi-cpufreq.c +++ b/drivers/cpufreq/scpi-cpufreq.c @@ -163,8 +163,6 @@ static int scpi_cpufreq_init(struct cpufreq_policy *policy) policy->fast_switch_possible = false; - dev_pm_opp_of_register_em(cpu_dev, policy->cpus); - return 0; out_free_cpufreq_table: @@ -200,6 +198,7 @@ static struct cpufreq_driver scpi_cpufreq_driver = { .init = scpi_cpufreq_init, .exit = scpi_cpufreq_exit, .target_index = scpi_cpufreq_set_target, + .register_em = cpufreq_register_em_with_opp, }; static int scpi_cpufreq_probe(struct platform_device *pdev)