From: Paul Walmsley <paul@pwsan.com>
To: linux-omap@vger.kernel.org
Subject: [PATCH 4/6] clockdomain: add clkdm_get_pwrdm()
Date: Tue, 20 May 2008 18:41:35 -0600 [thread overview]
Message-ID: <20080521004133.6131.52400.stgit@localhost.localdomain> (raw)
In-Reply-To: <20080521003910.6131.63409.stgit@localhost.localdomain>
Add clkdm_get_pwrdm() to the clockdomain code. It will return a
pointer to the powerdomain struct that the clockdomain is contained
within. Used by the PM code.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
arch/arm/mach-omap2/clockdomain.c | 16 ++++++++++++++++
include/asm-arm/arch-omap/clockdomain.h | 5 +++--
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c
index ca944ec..6e5f892 100644
--- a/arch/arm/mach-omap2/clockdomain.c
+++ b/arch/arm/mach-omap2/clockdomain.c
@@ -315,6 +315,22 @@ int clkdm_for_each(int (*fn)(struct clockdomain *clkdm))
}
+/**
+ * clkdm_get_pwrdm - return a ptr to the pwrdm that this clkdm resides in
+ * @clkdm: struct clockdomain *
+ *
+ * Return a pointer to the struct powerdomain that the specified clockdomain
+ * 'clkdm' exists in, or returns NULL if clkdm argument is NULL.
+ */
+struct powerdomain *clkdm_get_pwrdm(struct clockdomain *clkdm)
+{
+ if (!clkdm)
+ return NULL;
+
+ return clkdm->pwrdm;
+}
+
+
/* Hardware clockdomain control */
/**
diff --git a/include/asm-arm/arch-omap/clockdomain.h b/include/asm-arm/arch-omap/clockdomain.h
index e4280bd..d2a4551 100644
--- a/include/asm-arm/arch-omap/clockdomain.h
+++ b/include/asm-arm/arch-omap/clockdomain.h
@@ -91,6 +91,9 @@ int clkdm_register(struct clockdomain *clkdm);
int clkdm_unregister(struct clockdomain *clkdm);
struct clockdomain *clkdm_lookup(const char *name);
+int clkdm_for_each(int (*fn)(struct clockdomain *clkdm));
+struct powerdomain *clkdm_get_pwrdm(struct clockdomain *clkdm);
+
void omap2_clkdm_allow_idle(struct clockdomain *clkdm);
void omap2_clkdm_deny_idle(struct clockdomain *clkdm);
@@ -100,6 +103,4 @@ int omap2_clkdm_sleep(struct clockdomain *clkdm);
int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk);
int omap2_clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk);
-int clkdm_for_each(int (*fn)(struct clockdomain *clkdm));
-
#endif
next prev parent reply other threads:[~2008-05-21 0:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-21 0:41 [PATCH 0/6] OMAP2 PM: link clocks to clockdomains, use clkdm/pwrdm code Paul Walmsley
2008-05-21 0:41 ` [PATCH 1/6] 24xx clock: associate clocks with clockdomains Paul Walmsley
2008-05-21 0:41 ` [PATCH 2/6] 24xx clock: add missing SSI L4 interface clock Paul Walmsley
2008-05-21 0:41 ` [PATCH 3/6] powerdomain: add pwrdm_get_mem_bank_count() Paul Walmsley
2008-05-21 0:41 ` Paul Walmsley [this message]
2008-05-21 0:41 ` [PATCH 5/6] 24xx PM: convert pm24xx.c code to use pwrdm/clkdm interfaces Paul Walmsley
2008-05-21 0:43 ` [PATCH 6/6] DSP Gateway: remove manual clockdomain/powerdomain tweaking Paul Walmsley
2008-05-28 20:41 ` [PATCH 0/6] OMAP2 PM: link clocks to clockdomains, use clkdm/pwrdm code Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080521004133.6131.52400.stgit@localhost.localdomain \
--to=paul@pwsan.com \
--cc=linux-omap@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox