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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Rajendra Nayak <rnayak@xxxxxx>

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@xxxxxx>
---
 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(-)

Index: linux-omap-2.6/arch/arm/plat-omap/omap-pm-noop.c
===================================================================
--- linux-omap-2.6.orig/arch/arm/plat-omap/omap-pm-noop.c	2009-04-15 11:44:51.000000000 +0530
+++ linux-omap-2.6/arch/arm/plat-omap/omap-pm-noop.c	2009-04-15 11:46:11.000000000 +0530
@@ -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-2.6/arch/arm/plat-omap/omap-pm-srf.c
===================================================================
--- linux-omap-2.6.orig/arch/arm/plat-omap/omap-pm-srf.c	2009-04-15 11:44:51.000000000 +0530
+++ linux-omap-2.6/arch/arm/plat-omap/omap-pm-srf.c	2009-04-15 11:46:11.000000000 +0530
@@ -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-2.6/arch/arm/plat-omap/include/mach/omap-pm.h
===================================================================
--- linux-omap-2.6.orig/arch/arm/plat-omap/include/mach/omap-pm.h	2009-04-15 11:44:51.000000000 +0530
+++ linux-omap-2.6/arch/arm/plat-omap/include/mach/omap-pm.h	2009-04-15 11:46:11.000000000 +0530
@@ -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
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux