aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/vp.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@ti.com>2011-04-05 17:39:11 -0400
committerKevin Hilman <khilman@ti.com>2011-09-15 15:09:07 -0400
commit633ef8b7475a224b6be662d7c698cd705157064f (patch)
tree03b219463824f61398fd358e84bc6d9c80fda951 /arch/arm/mach-omap2/vp.c
parentb7ea803e55769768d1eff3b32e4f99837fa6ddb5 (diff)
OMAP3+: voltage: remove unneeded debugfs interface
Remove read-only debugfs interface to VP values. Most of the values are init-time only and never change. Current voltage value should be retreived from the (eventual) regulator framework interface to the voltage domain. Fixes to original version provided by Nishanth Menon <nm@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/vp.c')
-rw-r--r--arch/arm/mach-omap2/vp.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c
index 53d6018fa67..c9a315f9d3d 100644
--- a/arch/arm/mach-omap2/vp.c
+++ b/arch/arm/mach-omap2/vp.c
@@ -1,6 +1,5 @@
1#include <linux/kernel.h> 1#include <linux/kernel.h>
2#include <linux/init.h> 2#include <linux/init.h>
3#include <linux/debugfs.h>
4 3
5#include <plat/common.h> 4#include <plat/common.h>
6 5
@@ -10,8 +9,6 @@
10#include "prm-regbits-44xx.h" 9#include "prm-regbits-44xx.h"
11#include "prm44xx.h" 10#include "prm44xx.h"
12 11
13static void __init vp_debugfs_init(struct voltagedomain *voltdm);
14
15static void vp_latch_vsel(struct voltagedomain *voltdm) 12static void vp_latch_vsel(struct voltagedomain *voltdm)
16{ 13{
17 struct omap_vp_instance *vp = voltdm->vp; 14 struct omap_vp_instance *vp = voltdm->vp;
@@ -87,8 +84,6 @@ void __init omap_vp_init(struct voltagedomain *voltdm)
87 (vdd->vp_rt_data.vlimitto_timeout << 84 (vdd->vp_rt_data.vlimitto_timeout <<
88 vp->common->vlimitto_timeout_shift)); 85 vp->common->vlimitto_timeout_shift));
89 voltdm->write(vp_val, vp->vlimitto); 86 voltdm->write(vp_val, vp->vlimitto);
90
91 vp_debugfs_init(voltdm);
92} 87}
93 88
94/* VP force update method of voltage scaling */ 89/* VP force update method of voltage scaling */
@@ -300,61 +295,3 @@ void omap_vp_disable(struct voltagedomain *voltdm)
300 295
301 return; 296 return;
302} 297}
303
304/* Voltage debugfs support */
305static int vp_volt_debug_get(void *data, u64 *val)
306{
307 struct voltagedomain *voltdm = (struct voltagedomain *)data;
308 struct omap_vp_instance *vp = voltdm->vp;
309 struct omap_vdd_info *vdd = voltdm->vdd;
310 u8 vsel;
311
312 if (!vdd) {
313 pr_warning("Wrong paramater passed\n");
314 return -EINVAL;
315 }
316
317 vsel = voltdm->read(vp->voltage);
318
319 if (!voltdm->pmic->vsel_to_uv) {
320 pr_warning("PMIC function to convert vsel to voltage"
321 "in uV not registerd\n");
322 return -EINVAL;
323 }
324
325 *val = voltdm->pmic->vsel_to_uv(vsel);
326 return 0;
327}
328
329DEFINE_SIMPLE_ATTRIBUTE(vp_volt_debug_fops, vp_volt_debug_get, NULL, "%llu\n");
330
331static void __init vp_debugfs_init(struct voltagedomain *voltdm)
332{
333 struct omap_vdd_info *vdd = voltdm->vdd;
334 struct dentry *debug_dir;
335
336 debug_dir = debugfs_create_dir("vp", vdd->debug_dir);
337 if (IS_ERR(debug_dir))
338 pr_err("%s: Unable to create VP debugfs dir dir\n", __func__);
339
340 (void) debugfs_create_x16("errorgain", S_IRUGO, debug_dir,
341 &(vdd->vp_rt_data.vpconfig_errorgain));
342 (void) debugfs_create_x16("smpswaittimemin", S_IRUGO,
343 debug_dir,
344 &(vdd->vp_rt_data.vstepmin_smpswaittimemin));
345 (void) debugfs_create_x8("stepmin", S_IRUGO, debug_dir,
346 &(vdd->vp_rt_data.vstepmin_stepmin));
347 (void) debugfs_create_x16("smpswaittimemax", S_IRUGO,
348 debug_dir,
349 &(vdd->vp_rt_data.vstepmax_smpswaittimemax));
350 (void) debugfs_create_x8("stepmax", S_IRUGO, debug_dir,
351 &(vdd->vp_rt_data.vstepmax_stepmax));
352 (void) debugfs_create_x8("vddmax", S_IRUGO, debug_dir,
353 &(vdd->vp_rt_data.vlimitto_vddmax));
354 (void) debugfs_create_x8("vddmin", S_IRUGO, debug_dir,
355 &(vdd->vp_rt_data.vlimitto_vddmin));
356 (void) debugfs_create_x16("timeout", S_IRUGO, debug_dir,
357 &(vdd->vp_rt_data.vlimitto_timeout));
358 (void) debugfs_create_file("curr_volt", S_IRUGO, debug_dir,
359 (void *) voltdm, &vp_volt_debug_fops);
360}