diff mbox

OMAP PM: Expose vc registers in debugfs

Message ID 1293710669-3014-1-git-send-email-sawant@ti.com (mailing list archive)
State Changes Requested
Delegated to: Kevin Hilman
Headers show

Commit Message

Anand Sawant Dec. 30, 2010, 12:04 p.m. UTC
None
diff mbox

Patch

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 */