Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3380815pxt; Tue, 10 Aug 2021 02:11:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvm9QpF2WegkA7OK+A77FSbgnZUuExkWEH1utFhT4kNHtg2+jUkXNKT//Arn6iF8Hs6NTs X-Received: by 2002:a92:db4e:: with SMTP id w14mr291808ilq.188.1628586689661; Tue, 10 Aug 2021 02:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628586689; cv=none; d=google.com; s=arc-20160816; b=yYrDHqWlhhyAbEMjSjRPasKSXMahLZWPyAfCEMRZrHQrTCbfL6U55qAzcQ28z2/n2p C30nJ7OUVL9wd0CdOUx+KZOzLcppBXirXFVlT4GFy169i98P3MF7DI3fWRQZNPgt30lg n48VX0z7/G25apjNRoObQ9+NUoYwiuEX04SJAiCqBa/z++AZleGB95VeBN0RYf7aKs7l rqFYsfd7EwGIOgSycfKv1Mdap7SW3Gfk60lNqCNskhpkC5/DkbvEAxP4JfdPCUiAujqU fQbGvSnTjnxce3mD7Dbd7DpK79+xaT9DRyAhD7CZbXf8LXj+NDQW/vbDJ//+KsaKQg1E F68A== 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=tPg7HlHiNHIgMXq3ifzrutSGoJ3kBhUfJVLyMOqT33Y=; b=xAKoh2sA4e1J0QS6Gwll+3jOpyYiUyVEb2rcavm/hYqfK8+TNERYaV47vcCSANC8j5 /8egQRZfHXy0KNjPunVh+DWzDocllX8gU2IZuPCvM9JR2GPFZPJ51MQnc3C3GonkRHI2 H8tBUeDJIRIX6A+l323gIWOkf/jzYcNPs/1QlCFJj9wuvks2rYFxZDNl2fnUyxdqPhyb TnOlPQgACcd9PcijC+TrHJwx0tie6Rt9UQVa+CDdZZUF8u5EYNpTyKjbTpV1jl2Y80Vf U4eaqwsgHcCCd6n582EuLBCJur8647fdjVXbjr0ydwdipi5uzD/6nmPZJjFhDIBChpER btBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aNHkIE5n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 15si22905307ilz.158.2021.08.10.02.11.11; Tue, 10 Aug 2021 02:11:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=aNHkIE5n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S235376AbhHJHht (ORCPT + 99 others); Tue, 10 Aug 2021 03:37:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235397AbhHJHhp (ORCPT ); Tue, 10 Aug 2021 03:37:45 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FCBDC06179F for ; Tue, 10 Aug 2021 00:37:23 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id a8so31827593pjk.4 for ; Tue, 10 Aug 2021 00:37:23 -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=tPg7HlHiNHIgMXq3ifzrutSGoJ3kBhUfJVLyMOqT33Y=; b=aNHkIE5ncBMIBjIjJvsC//j+DCdVWU0P4mzCLIQHFyneAmv1sc641l9Q+BDeuVkMJd PNmGFG0IJoM/1JPjohriJqPUme/cxg10EBbwPzE19jElRJFRedJFYBrpS9EiCnkJPzHr GLtZfw09928BFmsHu+W98ZpncTYDBeubpxHs7U7AUpTwy4DiNNHHBEW21Jwb/jKTctRy 0+dUm0n4ZOtUcmaYgKSn/jqluJVRsegnjQ2BCqTdVZpMK/1A1NxOY6IOjlWIU2ra9dj5 hdFCmsxmnfliD8GFswr/gVl+pA67f40FeLQqe3ecQZ8qxvkdGs5Bk1VBb3oBH+D7c8FO 1RDw== 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=tPg7HlHiNHIgMXq3ifzrutSGoJ3kBhUfJVLyMOqT33Y=; b=MS8xlzY+ub/J3c087u2A4fmEK2y0DZ9HILGnL4ihxCzRC9Kr1DyDb+BNRWyB8jxQXy 4wKVIR5Lj9P7xQvFac4/k88AMVjKneVc0G1W5JW+LBmMHb6DpC4C+rsmI435NRViSMjH 1HvMgoTaquBF/dOMSjpGUj8oF77hZ6rjOkCXtD2UUlvadwJyaz8OUTMDaDFSfQrcnKhk snis4AVGFZGcFPLbPN9UGXFHlwckpGl4LhLNjRykkQ0LWDppj0wBmmxqFfCsIE9yXPGz QcY+Lhf8eMFBUaGKw248prNwVHSFwWZQhwkf6YXwQO6z28l9uPHMAIOVenewL6vcS92i dDkg== X-Gm-Message-State: AOAM5334Lie8QDfS/64vN6Ub3RQtr7T3wUOzLScQnSGXJSAIvD2MfC4c i2Xj/WqleNkpi5N0EU+apkSgpg== X-Received: by 2002:a17:90b:1102:: with SMTP id gi2mr29168901pjb.43.1628581043191; Tue, 10 Aug 2021 00:37:23 -0700 (PDT) Received: from localhost ([122.172.201.85]) by smtp.gmail.com with ESMTPSA id 6sm1927629pjk.1.2021.08.10.00.37.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Aug 2021 00:37:22 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Vincent Donnefort , lukasz.luba@arm.com, Kevin Hilman , Viresh Kumar Cc: linux-pm@vger.kernel.org, Vincent Guittot , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/8] cpufreq: omap: Use auto-registration for energy model Date: Tue, 10 Aug 2021 13:06:52 +0530 Message-Id: X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the CPUFREQ_REGISTER_WITH_EM flag to allow cpufreq core to automatically register with the energy model. This allows removal of boiler plate code from the driver and fixes the unregistration part as well. Signed-off-by: Viresh Kumar --- drivers/cpufreq/omap-cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c index e035ee216b0f..303136f97773 100644 --- a/drivers/cpufreq/omap-cpufreq.c +++ b/drivers/cpufreq/omap-cpufreq.c @@ -131,7 +131,6 @@ static int omap_cpu_init(struct cpufreq_policy *policy) /* FIXME: what's the actual transition time? */ cpufreq_generic_init(policy, freq_table, 300 * 1000); - dev_pm_opp_of_register_em(mpu_dev, policy->cpus); return 0; } @@ -144,7 +143,8 @@ static int omap_cpu_exit(struct cpufreq_policy *policy) } static struct cpufreq_driver omap_driver = { - .flags = CPUFREQ_NEED_INITIAL_FREQ_CHECK, + .flags = CPUFREQ_NEED_INITIAL_FREQ_CHECK | + CPUFREQ_REGISTER_WITH_EM, .verify = cpufreq_generic_frequency_table_verify, .target_index = omap_target, .get = cpufreq_generic_get, -- 2.31.1.272.g89b43f80a514