From patchwork Tue Sep 1 04:58:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 52911 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by patches.linaro.org (Postfix) with ESMTPS id 37DA42127E for ; Tue, 1 Sep 2015 04:59:23 +0000 (UTC) Received: by wicgc1 with SMTP id gc1sf6474565wic.3 for ; Mon, 31 Aug 2015 21:59:22 -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=d0CXWR+NVu2kqolZ+9Q3H4bntiTEOWlAtDijHApIu8w=; b=bKv5MjIFlwbWVGoSJuiAcsv/TVatTR57YaOzohc9n6qzQoftZA05uVqczOvnSPfodd CNm+GPde3sVDskCNz34fROgCYu3JoXbqLH/0+pne1Xrl6f+CB6xDkqpUgrm0nL/ZSe7p 3TEYqVbj39DZD/t3piFBfYiOpjlHE9L1qknAUMEYae6/PlWHAKkTvUa1HeqOPQaxiJAu L1Wf2dOoqlqFgEGt4SlcrkGKxNfqriBoMMSJ3r4D9QSNH1yj2XfHoMYOMXBLtO3zSeAN 1/UsSbkCTdG1Cp8tcpsRMYtS8NsH9lVbBxB6MbK/YPxORuLvuLzBXBaGChOB6WdZpBW9 TMbg== X-Gm-Message-State: ALoCoQkD2LXlrbDS/QoeG5sIdoG0ZusPEiaapjknUL2d5bRBBgE+KWFZsiAZj9b3Eo3s91L1oahl X-Received: by 10.112.54.166 with SMTP id k6mr7159086lbp.0.1441083562512; Mon, 31 Aug 2015 21:59:22 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.41 with SMTP id n9ls497782laj.88.gmail; Mon, 31 Aug 2015 21:59:22 -0700 (PDT) X-Received: by 10.112.219.70 with SMTP id pm6mr11882409lbc.41.1441083562204; Mon, 31 Aug 2015 21:59:22 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id f8si15351166lbv.92.2015.08.31.21.59.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Aug 2015 21:59:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lbbtg9 with SMTP id tg9so72159863lbb.1 for ; Mon, 31 Aug 2015 21:59:22 -0700 (PDT) X-Received: by 10.112.219.70 with SMTP id pm6mr11882406lbc.41.1441083562090; Mon, 31 Aug 2015 21:59:22 -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.164.42 with SMTP id yn10csp273437lbb; Mon, 31 Aug 2015 21:59:21 -0700 (PDT) X-Received: by 10.67.8.40 with SMTP id dh8mr42167336pad.129.1441083560881; Mon, 31 Aug 2015 21:59:20 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v1si27760376pdb.148.2015.08.31.21.59.19; Mon, 31 Aug 2015 21:59:20 -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 S1753626AbbIAE7Q (ORCPT + 28 others); Tue, 1 Sep 2015 00:59:16 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:34584 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753030AbbIAE7O (ORCPT ); Tue, 1 Sep 2015 00:59:14 -0400 Received: by pabzx8 with SMTP id zx8so163089731pab.1 for ; Mon, 31 Aug 2015 21:59:14 -0700 (PDT) X-Received: by 10.66.63.69 with SMTP id e5mr44275133pas.156.1441083554055; Mon, 31 Aug 2015 21:59:14 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id kv10sm16402907pbc.2.2015.08.31.21.59.12 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 31 Aug 2015 21:59:13 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , sboyd@codeaurora.org Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, nm@ti.com, 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 Resend 3/5] PM / OPP: Move opp core to its own directory Date: Tue, 1 Sep 2015 10:28:34 +0530 Message-Id: <54ff6f4e8fe495d9a859a7a7aa61ac2e79f08551.1441083292.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.182 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 Reviewed-by: Stephen Boyd --- 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 9c75fafd2901..a66b6f13969b 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