From patchwork Wed Apr 15 12:55:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajendra Nayak X-Patchwork-Id: 18357 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3FCtnCG017163 for ; Wed, 15 Apr 2009 12:55:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758334AbZDOMzm (ORCPT ); Wed, 15 Apr 2009 08:55:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758509AbZDOMzm (ORCPT ); Wed, 15 Apr 2009 08:55:42 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:39279 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758334AbZDOMzl convert rfc822-to-8bit (ORCPT ); Wed, 15 Apr 2009 08:55:41 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id n3FCtYge008084 for ; Wed, 15 Apr 2009 07:55:40 -0500 Received: from dbde71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id n3FCtXvb021672 for ; Wed, 15 Apr 2009 18:25:33 +0530 (IST) Received: from dbde02.ent.ti.com ([172.24.170.145]) by dbde71.ent.ti.com ([172.24.170.149]) with mapi; Wed, 15 Apr 2009 18:25:33 +0530 From: "Nayak, Rajendra" To: linux-omap Date: Wed, 15 Apr 2009 18:25:32 +0530 Subject: [PATCH 02/10] OMAP3: PM: Additional api's in omap-pm layer Thread-Topic: [PATCH 02/10] OMAP3: PM: Additional api's in omap-pm layer Thread-Index: Acm9yXX1iNmA/pq4QMO1ppLwvBuG9Q== Message-ID: <5A47E75E594F054BAF48C5E4FC4B92AB02FB25180D@dbde02.ent.ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Rajendra Nayak 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 --- 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 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