[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201207162323.16114.rjw@sisk.pl>
Date: Mon, 16 Jul 2012 23:23:15 +0200
From: "Rafael J. Wysocki" <rjw@...k.pl>
To: Linux PM list <linux-pm@...r.kernel.org>
Cc: Mark Brown <broonie@...nsource.wolfsonmicro.com>,
LKML <linux-kernel@...r.kernel.org>,
Matthew Garrett <mjg59@...f.ucam.org>,
Magnus Damm <magnus.damm@...il.com>,
Arnd Bergmann <arnd@...db.de>,
Grant Likely <grant.likely@...retlab.ca>,
"Linux-sh list" <linux-sh@...r.kernel.org>
Subject: [RFC][PATCH 6/14] RM: shmobile: Add routine for automatic PM domains initialization
From: Rafael J. Wysocki <rjw@...k.pl>
Add a new routine, rmobile_init_domains(), allowing the caller
to initialize all generic PM objects stored in a table in one
operation.
Signed-off-by: Rafael J. Wysocki <rjw@...k.pl>
---
arch/arm/mach-shmobile/include/mach/pm-rmobile.h | 2 ++
arch/arm/mach-shmobile/pm-rmobile.c | 8 ++++++++
2 files changed, 10 insertions(+)
Index: linux/arch/arm/mach-shmobile/pm-rmobile.c
===================================================================
--- linux.orig/arch/arm/mach-shmobile/pm-rmobile.c
+++ linux/arch/arm/mach-shmobile/pm-rmobile.c
@@ -149,6 +149,14 @@ void rmobile_init_pm_domain(struct rmobi
__rmobile_pd_power_up(rmobile_pd, false);
}
+void rmobile_init_domains(struct rmobile_pm_domain domains[], int num)
+{
+ int j;
+
+ for (j = 0; j < num; j++)
+ rmobile_init_pm_domain(&domains[j]);
+}
+
void rmobile_add_device_to_domain(const char *domain_name,
struct platform_device *pdev)
{
Index: linux/arch/arm/mach-shmobile/include/mach/pm-rmobile.h
===================================================================
--- linux.orig/arch/arm/mach-shmobile/include/mach/pm-rmobile.h
+++ linux/arch/arm/mach-shmobile/include/mach/pm-rmobile.h
@@ -31,10 +31,12 @@ struct rmobile_pm_domain *to_rmobile_pd(
#ifdef CONFIG_PM
extern void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd);
+extern void rmobile_init_domains(struct rmobile_pm_domain domains[], int num);
extern void rmobile_add_device_to_domain(const char *domain_name,
struct platform_device *pdev);
#else
#define rmobile_init_pm_domain(pd) do { } while (0)
+#define rmobile_init_domains(domains, num) do { } while (0)
#define rmobile_add_device_to_domain(name, pdev) do { } while (0)
#endif /* CONFIG_PM */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists