From patchwork Mon Aug 10 06:32:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 52137 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id 2702622919 for ; Mon, 10 Aug 2015 06:33:22 +0000 (UTC) Received: by labth1 with SMTP id th1sf57782757lab.2 for ; Sun, 09 Aug 2015 23:33:21 -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=W+V0V7IA25gNaHY5UYluhFAx1syDxoRfHW8m1fAIm1E=; b=DuLbNOHd+dMtXghLQPkOBBNAvCVPAHf5kpdLSvstnZZEI4P/kgmKuGXNB2ZZhSm/uL R/1XeeC+DJWfLs2ypFBb75hWYA/JJ7LUo8jL1Rj1GvN9MtBs05ODz18VoddGaSJaziPG /q0JljhUUhjBrOUOLMz3G/2IY0YaIaZmM7DrJP7FzYY5Ipl4gYnIRtUMU40vxswFU4OH M7XCLjWWsZswq+BOHpkNUEsQjfjOjfOTCpbSGwfgYK+8CVDoYtgvoXi/gOTJZEDaqFqP BezBxchj9FylVEBu4nJXRLHR3B9GdTqd5IoHFzGe6fJ8aKQTaoWDyUHCJNM5uluXDJSx BI6g== X-Gm-Message-State: ALoCoQlHcdxpG7BGjcxKreeq3jG2J7mQCzX9n7+6jlm14230aNCWhiMYzW55EeCrFJ7QbdHyBzIZ X-Received: by 10.112.99.37 with SMTP id en5mr5839170lbb.7.1439188401117; Sun, 09 Aug 2015 23:33:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.198 with SMTP id 6ls116031law.79.gmail; Sun, 09 Aug 2015 23:33:20 -0700 (PDT) X-Received: by 10.152.9.37 with SMTP id w5mr14801702laa.43.1439188400967; Sun, 09 Aug 2015 23:33:20 -0700 (PDT) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id j1si13482857lbc.15.2015.08.09.23.33.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Aug 2015 23:33:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by labd1 with SMTP id d1so34743178lab.1 for ; Sun, 09 Aug 2015 23:33:20 -0700 (PDT) X-Received: by 10.112.209.106 with SMTP id ml10mr18669522lbc.112.1439188400859; Sun, 09 Aug 2015 23:33:20 -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 l6csp1746698lba; Sun, 9 Aug 2015 23:33:19 -0700 (PDT) X-Received: by 10.66.161.232 with SMTP id xv8mr9752341pab.137.1439188398807; Sun, 09 Aug 2015 23:33:18 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wm7si31565406pbc.49.2015.08.09.23.33.17; Sun, 09 Aug 2015 23:33:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 S1753984AbbHJGdQ (ORCPT + 12 others); Mon, 10 Aug 2015 02:33:16 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:35181 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753672AbbHJGdP (ORCPT ); Mon, 10 Aug 2015 02:33:15 -0400 Received: by pacgr6 with SMTP id gr6so19956132pac.2 for ; Sun, 09 Aug 2015 23:33:15 -0700 (PDT) X-Received: by 10.69.25.102 with SMTP id ip6mr17206291pbd.150.1439188394874; Sun, 09 Aug 2015 23:33:14 -0700 (PDT) Received: from localhost ([223.227.137.11]) by smtp.gmail.com with ESMTPSA id bu10sm18661381pac.36.2015.08.09.23.33.11 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 09 Aug 2015 23:33:14 -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 4/6] PM / OPP: Move opp core to its own directory Date: Mon, 10 Aug 2015 12:02:00 +0530 Message-Id: <6dcf599b49886fd5a2157f2e61f7424cc754b6f0.1439187821.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@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.215.54 as permitted sender) smtp.mail=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..7ff2726dab6c 100644 --- a/drivers/base/power/Makefile +++ b/drivers/base/power/Makefile @@ -1,8 +1,8 @@ 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_GENERIC_DOMAINS) += domain.o domain_governor.o obj-$(CONFIG_HAVE_CLK) += clock_ops.o +obj-$(CONFIG_PM_OPP) += opp/ ccflags-$(CONFIG_DEBUG_DRIVER) := -DDEBUG 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