[02/10] OMAP3: PM: Additional api's in omap-pm layer
diff mbox

Message ID 5A47E75E594F054BAF48C5E4FC4B92AB02FB102C1E@dbde02.ent.ti.com
State Superseded
Delegated to: Kevin Hilman
Headers show

Commit Message

Rajendra Nayak April 3, 2009, 4:08 p.m. UTC
From: Rajendra Nayak <rnayak@ti.com>

This patch adds 2 new apis to the OMAP PM layer to be able
to get the latest VDD1 as well as VDD2 opps.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
---
 arch/arm/plat-omap/include/mach/omap-pm.h |   17 +++++++++++++++++
 arch/arm/plat-omap/omap-pm-noop.c         |   22 ++++++++++++++++++++++
 arch/arm/plat-omap/omap-pm-srf.c          |   15 ++++++++++++++-
 3 files changed, 53 insertions(+), 1 deletion(-)

To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

Index: linux-omap-pm/arch/arm/plat-omap/omap-pm-noop.c
===================================================================
--- linux-omap-pm.orig/arch/arm/plat-omap/omap-pm-noop.c
+++ linux-omap-pm/arch/arm/plat-omap/omap-pm-noop.c
@@ -198,6 +198,28 @@  u8 omap_pm_dsp_get_opp(void)
 	return 0;
 }
 
+u8 omap_pm_vdd1_get_opp(void)
+{
+	pr_debug("OMAP PM: User requests current VDD1 OPP\n");
+
+	/*
+	 * For l-o call resource_get_level of vdd1_opp resource.
+	 */
+
+	return 0;
+}
+
+u8 omap_pm_vdd2_get_opp(void)
+{
+	pr_debug("OMAP PM: User requests current VDD2 OPP\n");
+
+	/*
+	 * For l-o call resource_get_level of vdd2_opp resource.
+	 */
+
+	return 0;
+}
+
 /*
  * CPUFreq-originated constraint
  *
Index: linux-omap-pm/arch/arm/plat-omap/omap-pm-srf.c
===================================================================
--- linux-omap-pm.orig/arch/arm/plat-omap/omap-pm-srf.c
+++ linux-omap-pm/arch/arm/plat-omap/omap-pm-srf.c
@@ -209,10 +209,23 @@  u8 omap_pm_dsp_get_opp(void)
 {
 	pr_debug("OMAP PM: DSP requests current DSP OPP ID\n");
 	return resource_get_level("vdd1_opp");
-	return 0;
 }
 EXPORT_SYMBOL(omap_pm_dsp_get_opp);
 
+u8 omap_pm_vdd1_get_opp(void)
+{
+	pr_debug("OMAP PM: User requests current VDD1 OPP\n");
+	return resource_get_level("vdd1_opp");
+}
+EXPORT_SYMBOL(omap_pm_vdd1_get_opp);
+
+u8 omap_pm_vdd2_get_opp(void)
+{
+	pr_debug("OMAP PM: User requests current VDD2 OPP\n");
+	return resource_get_level("vdd2_opp");
+}
+EXPORT_SYMBOL(omap_pm_vdd2_get_opp);
+
 /*
  * CPUFreq-originated constraint
  *
Index: linux-omap-pm/arch/arm/plat-omap/include/mach/omap-pm.h
===================================================================
--- linux-omap-pm.orig/arch/arm/plat-omap/include/mach/omap-pm.h
+++ linux-omap-pm/arch/arm/plat-omap/include/mach/omap-pm.h
@@ -239,6 +239,23 @@  void omap_pm_dsp_set_min_opp(u8 opp_id);
  */
 u8 omap_pm_dsp_get_opp(void);
 
+/**
+ * omap_pm_vdd1_get_opp - report the current VDD1 OPP
+ *
+ * Report the current VDD1 OPP number.
+ *
+ * Returns the current VDD1 OPP ID, or 0 upon error.
+ */
+u8 omap_pm_vdd1_get_opp(void);
+
+/**
+ * omap_pm_vdd2_get_opp - report the current VDD2 OPP
+ *
+ * Report the current VDD2 OPP number.
+ *
+ * Returns the current VDD2 OPP ID, or 0 upon error.
+ */
+u8 omap_pm_vdd2_get_opp(void);
 
 /*
  * CPUFreq-originated constraint--