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: 114296 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp4332660qgf; Tue, 26 Sep 2017 15:12:51 -0700 (PDT) X-Received: by 10.84.234.196 with SMTP id i4mr11813334plt.432.1506463971008; Tue, 26 Sep 2017 15:12:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506463970; cv=none; d=google.com; s=arc-20160816; b=h84eEE/Xnv1Cxz/ywHjMyjiVj+xHCDUZdyaQXJBh+ROBUJkz2bPHgWepjGAMkzAetL V/9jEt6Z1EaW1m+22Xk4ttjjDtA7cH4pT/tTTMj9ql4rfPoZGLHKztaJeJMRVk9Jxdh0 21p73gMXzCPzfcjAhRP3UMwLWkosSF55uAfN1MGO/lGAlb+3RupVOH0m/IEQ3Ndc7vny K6pCuJ/Y43e1s4vC52jySm5dLcLksAlhTzToNYcr2QQrJqGEOsd0dYCDP0w4o44zdw9k A0PGVlbr6w3hjKjI0cOjNecTPEC6rBqXq31YFskpYG6kkoo4ocBwjt89DGbrVeju1n+r Gfug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=4uVz9pKwJPpfW6NCr+dkieCeGfH0WGQSssInTWhggB0=; b=Qf7j8hmXK84ozDOrXzra9S/4ulifJvhaYyH08yuzwjZG83JOcY/AopJSwjLHRUYZLQ em3OnwGgv7GYT9DRu/XwIUn4l73zo9Oe7u8atcDAbjTn/8oQaEVEk3JMOFkKU4KHk/Ao a+1aFcMbgH4PI0g9Ot50fCs6oKfGhv/AVNoavPIT+gCRxcwccTyg5kji4OhBP8WTyhN5 5LNLoZejCsMbBWkO7IJ7d8PZZH3M0LghX40rXDv5L4fw8DTnMlxAE6UPuL1S7YHRlESi 2nYeZiFR4mzGFtJKy5aY6pD97xxShfnKGjWu7SxaxQgmDzxKA5bQHE78jO+w6Eb2bRes s7sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U3Xuazhm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id o67si6258247pfj.330.2017.09.26.15.12.50; Tue, 26 Sep 2017 15:12:50 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U3Xuazhm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S969187AbdIZWMt (ORCPT + 26 others); Tue, 26 Sep 2017 18:12:49 -0400 Received: from mail-pg0-f47.google.com ([74.125.83.47]:44969 "EHLO mail-pg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935403AbdIZWMr (ORCPT ); Tue, 26 Sep 2017 18:12:47 -0400 Received: by mail-pg0-f47.google.com with SMTP id j16so6662628pga.1 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=PXjSFRuM8UUZ3ur2O/Doq2m13M36o1EMq/J2vKZ2r/DbNUotH8Rf/Xi5nQtV7COiCI gQa6aQXQE3j60bl6wktSJVhFUhicNaAr3Nq82KiMm30/PU1vDN7YLnyNBmtewAsLvxb+ ndg8AFhQQSPixjBNyqnab3bZCd4LnPvLmGDYr0G6+UiuNFbQg5maZWP0EgoobUfophbA VlTZeaX/VHWzsC9tBs4o08s2rlwGjXNKfjCd0Nvidiy9BtQxofy/PCUiBgZ7U0TBPBsz k5VbzrHgXQqX46F9sjygbTu5iRc6AAwzjTJlHHTXGZ5shGC4V9dCwlA59ECzWTaGR+Y5 AxZg== X-Gm-Message-State: AHPjjUgz5r9TUGWsp4WCEmmjAg2SBquw38T1oPPGUZHTbYSaYeYDzvSE yu4XaTm7aq6HfNSzxuMTGTys6g== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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%) -- 2.7.4 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