From patchwork Thu Dec 30 12:04:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Sawant X-Patchwork-Id: 440571 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBUMBEnK000490 for ; Thu, 30 Dec 2010 22:12:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753420Ab0L3MEs (ORCPT ); Thu, 30 Dec 2010 07:04:48 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:45626 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752717Ab0L3MEs (ORCPT ); Thu, 30 Dec 2010 07:04:48 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id oBUC4i2L015968 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 30 Dec 2010 06:04:46 -0600 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id oBUC4hnu021755; Thu, 30 Dec 2010 17:34:44 +0530 (IST) From: sawant@ti.com To: linux-omap@vger.kernel.org Cc: Anand Sawant Subject: [PATCH] OMAP PM: Expose vc registers in debugfs Date: Thu, 30 Dec 2010 17:34:29 +0530 Message-Id: <1293710669-3014-1-git-send-email-sawant@ti.com> X-Mailer: git-send-email 1.7.0.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 30 Dec 2010 22:12:54 +0000 (UTC) diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c index ed6079c..a9b52e4 100644 --- a/arch/arm/mach-omap2/voltage.c +++ b/arch/arm/mach-omap2/voltage.c @@ -336,6 +336,11 @@ static void omap4_voltage_write_reg(u32 val, u16 mod, u8 offset) } /* Voltage debugfs support */ + +/** + * Gets the current vp output voltage (auto-compensated) for the + * voltage domain. + */ static int vp_volt_debug_get(void *data, u64 *val) { struct omap_vdd_info *vdd = (struct omap_vdd_info *) data; @@ -359,6 +364,10 @@ static int vp_volt_debug_get(void *data, u64 *val) return 0; } +/** + * Gets the current nominal OPP voltage (non auto-compensated) for the + * voltage domain. + */ static int nom_volt_debug_get(void *data, u64 *val) { struct omap_vdd_info *vdd = (struct omap_vdd_info *) data; @@ -456,6 +465,7 @@ static void __init vp_init(struct omap_vdd_info *vdd) vdd->write_reg(vp_val, mod, vdd->vp_offs.vlimitto); } +/* Creates debugfs entries for key vp & vc parameters */ static void __init vdd_debugfs_init(struct omap_vdd_info *vdd) { char *name; @@ -501,6 +511,11 @@ static void __init vdd_debugfs_init(struct omap_vdd_info *vdd) (void) debugfs_create_file("curr_nominal_volt", S_IRUGO, vdd->debug_dir, (void *) vdd, &nom_volt_debug_fops); + + (void) debugfs_create_x8("vc_bypass_val", S_IRUGO, vdd->debug_dir, + &(vdd->vc_reg.bypass_val_reg)); + (void) debugfs_create_x8("vc_cmdval", S_IRUGO, vdd->debug_dir, + &(vdd->vc_reg.cmdval_reg)); } /* Voltage scale and accessory APIs */