From patchwork Tue Sep 26 22:12:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 9972789 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2C7E46037F for ; Tue, 26 Sep 2017 22:12:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D9C42003F for ; Tue, 26 Sep 2017 22:12:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 109982868B; Tue, 26 Sep 2017 22:12:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E2362003F for ; Tue, 26 Sep 2017 22:12:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937533AbdIZWMs (ORCPT ); Tue, 26 Sep 2017 18:12:48 -0400 Received: from mail-pg0-f44.google.com ([74.125.83.44]:43511 "EHLO mail-pg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936837AbdIZWMr (ORCPT ); Tue, 26 Sep 2017 18:12:47 -0400 Received: by mail-pg0-f44.google.com with SMTP id u18so6666400pgo.0 for ; Tue, 26 Sep 2017 15:12:47 -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; bh=4uVz9pKwJPpfW6NCr+dkieCeGfH0WGQSssInTWhggB0=; b=U3XuazhmY5VpyfkD9hly6nO9O8ptfKMQcVjuiVDW/UtNYhBuj9jZOeHLp5FtAJcoNt h8kNocad1NkgPDsJqzz7mlWwiJ4XlrK6fe8JN6YDLzlI3PZACTjBSQxtvg2Pa4J1ua9V Qd8CrC77OmDR7H9MsfF/vj6sGW1A0AgpT8LqY= 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; bh=4uVz9pKwJPpfW6NCr+dkieCeGfH0WGQSssInTWhggB0=; b=l+7UIzfVAQkJgtIph46Pr/dHVoQyhJ2Ce9A2Xx/fGa7h/WeUpQAShrvBPar242I5iL wwYie5+RE8hMWrPwiw5Is7irpneVudMkm+nBsSwHZXgxAb0oRuKp/CRcML1emYftJqaY nUANwNrVvDCB7IjvdJZnjN03YvWP7CZJUXjscT4QJIgfUSWC4StAGl8MksEPLbhZJ5BF 8JOuL9ZDVcNVqNxvI0zpTDJuDy7XVX8WaSi30cvz1essccldgVrv3+i39ZmFv752Gj6h I4zpk/oyY4dcXeee3PTJhK9YX3hPCEGCKLZqdSvNHC4ezzmBE6beqcJN59sdznhygttx SzcA== X-Gm-Message-State: AHPjjUito7VrlXIL/twsYRpQG1FVCsj/bDGQxtf3rHdQoP30edHTMxkl 6ZF0Q0jtso6u0whmE1vWVosUwg== X-Google-Smtp-Source: AOwi7QC1O4lvMcUEHAqlogpoHjFC67OoNHR838shgMN4Nr38PTcOeVqGb/ubH4Yc9xAmvKjBvrzuPg== X-Received: by 10.99.121.135 with SMTP id u129mr12210524pgc.250.1506463966813; Tue, 26 Sep 2017 15:12:46 -0700 (PDT) Received: from localhost ([70.35.39.2]) by smtp.gmail.com with ESMTPSA id r22sm17181788pfe.78.2017.09.26.15.12.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Sep 2017 15:12:45 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Greg Kroah-Hartman , Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , linux-kernel@vger.kernel.org Subject: [PATCH V2] PM / OPP: Move the OPP directory out of power/ Date: Tue, 26 Sep 2017 15:12:40 -0700 Message-Id: <3eaed52523d54bdc7b43b335d5aefda9b4d1b4a8.1506463860.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The drivers/base/power/ directory is special and contains code related to power management core like system suspend/resume, hibernation, etc. It was fine to keep the OPP code inside it when we had just one file for it, but it is growing now and already has a directory for itself. Lets move it directly under drivers/ directory, just like cpufreq and cpuidle. Signed-off-by: Viresh Kumar Acked-by: Stephen Boyd --- V1->V2: - Update maintainers and add a Kconfig file in drivers/opp/. MAINTAINERS | 2 +- drivers/Kconfig | 2 ++ drivers/Makefile | 1 + drivers/base/power/Makefile | 1 - drivers/opp/Kconfig | 13 +++++++++++++ drivers/{base/power => }/opp/Makefile | 0 drivers/{base/power => }/opp/core.c | 0 drivers/{base/power => }/opp/cpu.c | 0 drivers/{base/power => }/opp/debugfs.c | 0 drivers/{base/power => }/opp/of.c | 0 drivers/{base/power => }/opp/opp.h | 0 kernel/power/Kconfig | 14 -------------- 12 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 drivers/opp/Kconfig rename drivers/{base/power => }/opp/Makefile (100%) rename drivers/{base/power => }/opp/core.c (100%) rename drivers/{base/power => }/opp/cpu.c (100%) rename drivers/{base/power => }/opp/debugfs.c (100%) rename drivers/{base/power => }/opp/of.c (100%) rename drivers/{base/power => }/opp/opp.h (100%) diff --git a/MAINTAINERS b/MAINTAINERS index 6671f375f7fc..d4efd224c967 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10037,7 +10037,7 @@ M: Stephen Boyd L: linux-pm@vger.kernel.org S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git -F: drivers/base/power/opp/ +F: drivers/opp/ F: include/linux/pm_opp.h F: Documentation/power/opp.txt F: Documentation/devicetree/bindings/opp/ diff --git a/drivers/Kconfig b/drivers/Kconfig index 505c676fa9c7..9e264d410c23 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -208,4 +208,6 @@ source "drivers/tee/Kconfig" source "drivers/mux/Kconfig" +source "drivers/opp/Kconfig" + endmenu diff --git a/drivers/Makefile b/drivers/Makefile index d90fdc413648..dd718a3007e9 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -125,6 +125,7 @@ obj-$(CONFIG_ACCESSIBILITY) += accessibility/ obj-$(CONFIG_ISDN) += isdn/ obj-$(CONFIG_EDAC) += edac/ obj-$(CONFIG_EISA) += eisa/ +obj-$(CONFIG_PM_OPP) += opp/ obj-$(CONFIG_CPU_FREQ) += cpufreq/ obj-$(CONFIG_CPU_IDLE) += cpuidle/ obj-y += mmc/ diff --git a/drivers/base/power/Makefile b/drivers/base/power/Makefile index 5998c53280f5..73a1cffc0a5f 100644 --- a/drivers/base/power/Makefile +++ b/drivers/base/power/Makefile @@ -1,7 +1,6 @@ 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/ obj-$(CONFIG_PM_GENERIC_DOMAINS) += domain.o domain_governor.o obj-$(CONFIG_HAVE_CLK) += clock_ops.o diff --git a/drivers/opp/Kconfig b/drivers/opp/Kconfig new file mode 100644 index 000000000000..a7fbb93f302c --- /dev/null +++ b/drivers/opp/Kconfig @@ -0,0 +1,13 @@ +config PM_OPP + bool + select SRCU + ---help--- + SOCs have a standard set of tuples consisting of frequency and + voltage pairs that the device will support per voltage domain. This + is called Operating Performance Point or OPP. The actual definitions + of OPP varies over silicon within the same family of devices. + + OPP layer organizes the data internally using device pointers + representing individual voltage domains and provides SOC + implementations a ready to use framework to manage OPPs. + For more information, read diff --git a/drivers/base/power/opp/Makefile b/drivers/opp/Makefile similarity index 100% rename from drivers/base/power/opp/Makefile rename to drivers/opp/Makefile diff --git a/drivers/base/power/opp/core.c b/drivers/opp/core.c similarity index 100% rename from drivers/base/power/opp/core.c rename to drivers/opp/core.c diff --git a/drivers/base/power/opp/cpu.c b/drivers/opp/cpu.c similarity index 100% rename from drivers/base/power/opp/cpu.c rename to drivers/opp/cpu.c diff --git a/drivers/base/power/opp/debugfs.c b/drivers/opp/debugfs.c similarity index 100% rename from drivers/base/power/opp/debugfs.c rename to drivers/opp/debugfs.c diff --git a/drivers/base/power/opp/of.c b/drivers/opp/of.c similarity index 100% rename from drivers/base/power/opp/of.c rename to drivers/opp/of.c diff --git a/drivers/base/power/opp/opp.h b/drivers/opp/opp.h similarity index 100% rename from drivers/base/power/opp/opp.h rename to drivers/opp/opp.h diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig index e8517b63eb37..e880ca22c5a5 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig @@ -259,20 +259,6 @@ config APM_EMULATION anything, try disabling/enabling this option (or disabling/enabling APM in your BIOS). -config PM_OPP - bool - select SRCU - ---help--- - SOCs have a standard set of tuples consisting of frequency and - voltage pairs that the device will support per voltage domain. This - is called Operating Performance Point or OPP. The actual definitions - of OPP varies over silicon within the same family of devices. - - OPP layer organizes the data internally using device pointers - representing individual voltage domains and provides SOC - implementations a ready to use framework to manage OPPs. - For more information, read - config PM_CLK def_bool y depends on PM && HAVE_CLK