From patchwork Tue Aug 11 10:34:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 52299 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id 1C5DC22FEC for ; Tue, 11 Aug 2015 10:35:27 +0000 (UTC) Received: by lbsm2 with SMTP id m2sf34803183lbs.1 for ; Tue, 11 Aug 2015 03:35:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=Dr1ZhwR+4AC8wh1C962zm4tOYZ2BPwKP+m9RAXiYLd0=; b=hVGbcLsFB/9WvgLMJFpxHRRkFxR8ktQ6ZItPbuWtgV3NCY4jMVimDd4zJZFvQ4pFKM dkQbIgCQmH6r/AFlhIYgHbReDTugu1UdmFonGwFp+nrQPgm0874S571DGTesf1Ce86vz OQ5Y0MWfZAPYsFmjIVUrlUXhBZxh+vFLanQjJmApz+pqQDvjd8kbvholnSJVinom1rN3 LIV5PDi4/ZOXo7wJfBl4amSyg4ZkYJHRR+kyHHe/0xPhZjmh6otBsB+hAXd0DFTl1eFC ybbAu4tbmc0oVaiAys1SA9lC9I8uGTOl6Mlf20kkVjag/SIWgCoZOLSplHauRmLsHOpp M6Sg== X-Gm-Message-State: ALoCoQlJFKATvhCWcUXjvfar/jqKpL/e5oySRsOHm6sdXqKDcmcQqxiKy+yF46AU5NchrqWQyb5v X-Received: by 10.112.173.230 with SMTP id bn6mr7765981lbc.15.1439289326103; Tue, 11 Aug 2015 03:35:26 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.1.199 with SMTP id 7ls222607lao.67.gmail; Tue, 11 Aug 2015 03:35:25 -0700 (PDT) X-Received: by 10.112.142.196 with SMTP id ry4mr25637798lbb.68.1439289325903; Tue, 11 Aug 2015 03:35:25 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id b10si1049349laf.14.2015.08.11.03.35.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Aug 2015 03:35:25 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbcbn3 with SMTP id bn3so16038662lbc.2 for ; Tue, 11 Aug 2015 03:35:25 -0700 (PDT) X-Received: by 10.112.126.101 with SMTP id mx5mr25871176lbb.35.1439289325792; Tue, 11 Aug 2015 03:35:25 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp2434326lba; Tue, 11 Aug 2015 03:35:24 -0700 (PDT) X-Received: by 10.68.241.103 with SMTP id wh7mr54792601pbc.88.1439289324601; Tue, 11 Aug 2015 03:35:24 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fl4si2741592pdb.129.2015.08.11.03.35.23; Tue, 11 Aug 2015 03:35:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964954AbbHKKfU (ORCPT + 28 others); Tue, 11 Aug 2015 06:35:20 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:36490 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964866AbbHKKfR (ORCPT ); Tue, 11 Aug 2015 06:35:17 -0400 Received: by pacrr5 with SMTP id rr5so125146615pac.3 for ; Tue, 11 Aug 2015 03:35:16 -0700 (PDT) X-Received: by 10.66.62.163 with SMTP id z3mr54556509par.12.1439289316719; Tue, 11 Aug 2015 03:35:16 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id lm8sm2112877pbc.22.2015.08.11.03.35.15 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 11 Aug 2015 03:35:16 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , nm@ti.com, sboyd@codeaurora.org Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, khilman@linaro.org, Viresh Kumar , Anand Moon , Bartlomiej Zolnierkiewicz , Greg Kroah-Hartman , Len Brown , linux-kernel@vger.kernel.org (open list), Pavel Machek Subject: [PATCH V2 4/6] PM / OPP: Move opp core to its own directory Date: Tue, 11 Aug 2015 16:04:37 +0530 Message-Id: <85058e64cb6a04bba66dfbaaab2069c961b3dca5.1439288881.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , OPP code is expanding and is already present in multiple directories (cpufreq and power). Lets move it to its own directory, to manage it better. This also moves/renames the cpufreq_opp file to cpu.c, as it will contain helpers for cpu device. Its not just about cpufreq, other frameworks can use OPPs as well. Signed-off-by: Viresh Kumar --- drivers/base/power/Makefile | 2 +- drivers/base/power/opp/Makefile | 2 ++ drivers/base/power/{opp.c => opp/core.c} | 0 drivers/{cpufreq/cpufreq_opp.c => base/power/opp/cpu.c} | 4 +++- drivers/cpufreq/Makefile | 1 - 5 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 drivers/base/power/opp/Makefile rename drivers/base/power/{opp.c => opp/core.c} (100%) rename drivers/{cpufreq/cpufreq_opp.c => base/power/opp/cpu.c} (97%) diff --git a/drivers/base/power/Makefile b/drivers/base/power/Makefile index f94a6ccfe787..5998c53280f5 100644 --- a/drivers/base/power/Makefile +++ b/drivers/base/power/Makefile @@ -1,7 +1,7 @@ obj-$(CONFIG_PM) += sysfs.o generic_ops.o common.o qos.o runtime.o wakeirq.o obj-$(CONFIG_PM_SLEEP) += main.o wakeup.o obj-$(CONFIG_PM_TRACE_RTC) += trace.o -obj-$(CONFIG_PM_OPP) += opp.o +obj-$(CONFIG_PM_OPP) += opp/ obj-$(CONFIG_PM_GENERIC_DOMAINS) += domain.o domain_governor.o obj-$(CONFIG_HAVE_CLK) += clock_ops.o diff --git a/drivers/base/power/opp/Makefile b/drivers/base/power/opp/Makefile new file mode 100644 index 000000000000..33c1e18c41a4 --- /dev/null +++ b/drivers/base/power/opp/Makefile @@ -0,0 +1,2 @@ +ccflags-$(CONFIG_DEBUG_DRIVER) := -DDEBUG +obj-y += core.o cpu.o diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp/core.c similarity index 100% rename from drivers/base/power/opp.c rename to drivers/base/power/opp/core.c diff --git a/drivers/cpufreq/cpufreq_opp.c b/drivers/base/power/opp/cpu.c similarity index 97% rename from drivers/cpufreq/cpufreq_opp.c rename to drivers/base/power/opp/cpu.c index 0f5e6d5f6da0..0dd033016e9d 100644 --- a/drivers/cpufreq/cpufreq_opp.c +++ b/drivers/base/power/opp/cpu.c @@ -1,5 +1,5 @@ /* - * Generic OPP helper interface for CPUFreq drivers + * Generic OPP helper interface for CPU device * * Copyright (C) 2009-2014 Texas Instruments Incorporated. * Nishanth Menon @@ -20,6 +20,7 @@ #include #include +#ifdef CONFIG_CPU_FREQ /** * dev_pm_opp_init_cpufreq_table() - create a cpufreq table for a device * @dev: device for which we do this operation @@ -112,3 +113,4 @@ void dev_pm_opp_free_cpufreq_table(struct device *dev, *table = NULL; } EXPORT_SYMBOL_GPL(dev_pm_opp_free_cpufreq_table); +#endif /* CONFIG_CPU_FREQ */ diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile index 2169bf792db7..2ba5b7c0bed1 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile @@ -1,6 +1,5 @@ # CPUfreq core obj-$(CONFIG_CPU_FREQ) += cpufreq.o freq_table.o -obj-$(CONFIG_PM_OPP) += cpufreq_opp.o # CPUfreq stats obj-$(CONFIG_CPU_FREQ_STAT) += cpufreq_stats.o