All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nayak, Rajendra" <rnayak@ti.com>
To: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: [PATCH 02/10] OMAP3: PM: Additional api's in omap-pm layer
Date: Fri, 3 Apr 2009 21:38:28 +0530	[thread overview]
Message-ID: <5A47E75E594F054BAF48C5E4FC4B92AB02FB102C1E@dbde02.ent.ti.com> (raw)

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

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

             reply	other threads:[~2009-04-03 16:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-03 16:08 Nayak, Rajendra [this message]
2009-04-15 12:55 [PATCH 02/10] OMAP3: PM: Additional api's in omap-pm layer Nayak, Rajendra

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=5A47E75E594F054BAF48C5E4FC4B92AB02FB102C1E@dbde02.ent.ti.com \
    --to=rnayak@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.