public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP PM: Expose vc registers in debugfs
@ 2010-12-30 12:04 sawant
  2011-01-03 15:21 ` Nishanth Menon
  0 siblings, 1 reply; 2+ messages in thread
From: sawant @ 2010-12-30 12:04 UTC (permalink / raw)
  To: linux-omap; +Cc: Anand Sawant

From: Anand Sawant <sawant@ti.com>

This patch will expose the following voltage controller registers
as part of voltage layer debugfs.
1. PRM_VC_BYPASS_VAL
2. PRM_VC_CMD_VAL - for all VDDs

This patch will help in debugging voltage scaling issues.

Tested on Zoom3 & OMAP4430 SDP.

Patch rebased to latest Kevin's PM branch.

Signed-off-by: Anand S Sawant <sawant@ti.com>
---
 arch/arm/mach-omap2/voltage.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] OMAP PM: Expose vc registers in debugfs
  2010-12-30 12:04 [PATCH] OMAP PM: Expose vc registers in debugfs sawant
@ 2011-01-03 15:21 ` Nishanth Menon
  0 siblings, 0 replies; 2+ messages in thread
From: Nishanth Menon @ 2011-01-03 15:21 UTC (permalink / raw)
  To: sawant; +Cc: linux-omap

sawant@ti.com had written, on 12/30/2010 06:04 AM, the following:
> From: Anand Sawant <sawant@ti.com>
> 
> This patch will expose the following voltage controller registers
> as part of voltage layer debugfs.
> 1. PRM_VC_BYPASS_VAL
> 2. PRM_VC_CMD_VAL - for all VDDs
> 
> This patch will help in debugging voltage scaling issues.
How does this patch help in debugging voltage scaling issues?

> 
> Tested on Zoom3 & OMAP4430 SDP.
> 
> Patch rebased to latest Kevin's PM branch.
> 
> Signed-off-by: Anand S Sawant <sawant@ti.com>
> ---
>  arch/arm/mach-omap2/voltage.c |   15 +++++++++++++++
>  1 files changed, 15 insertions(+), 0 deletions(-)
> 
> 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.
> + */
please remove this from this patch - has nothing to do with $subject
also, please read kernel documentation for function comment header style

>  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.
> + */
same here
>  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 */
and here
>  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));
why the cast to void?

>  }
>  
>  /* Voltage scale and accessory APIs */


-- 
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-03 15:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-30 12:04 [PATCH] OMAP PM: Expose vc registers in debugfs sawant
2011-01-03 15:21 ` Nishanth Menon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox