]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] OMAP: clockdomain: add clkdm_get_pwrdm()
authorPaul Walmsley <paul@pwsan.com>
Wed, 21 May 2008 00:41:35 +0000 (18:41 -0600)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 21 Aug 2008 20:30:19 +0000 (21:30 +0100)
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>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-omap2/clockdomain.c

index b6ff5aa4726e4f97715543aaf77cb1a5f6c2890a..4c3ce9cfd9480f9b4974a671498513e74ee1cc5f 100644 (file)
@@ -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 */
 
 /**