From 633ef8b7475a224b6be662d7c698cd705157064f Mon Sep 17 00:00:00 2001 From: Kevin Hilman Date: Tue, 5 Apr 2011 14:39:11 -0700 Subject: 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 Signed-off-by: Kevin Hilman --- arch/arm/mach-omap2/vp.c | 63 ------------------------------------------------ 1 file changed, 63 deletions(-) (limited to 'arch/arm/mach-omap2/vp.c') diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c index 53d6018..c9a315f 100644 --- a/arch/arm/mach-omap2/vp.c +++ b/arch/arm/mach-omap2/vp.c @@ -1,6 +1,5 @@ #include #include -#include #include @@ -10,8 +9,6 @@ #include "prm-regbits-44xx.h" #include "prm44xx.h" -static void __init vp_debugfs_init(struct voltagedomain *voltdm); - static void vp_latch_vsel(struct voltagedomain *voltdm) { struct omap_vp_instance *vp = voltdm->vp; @@ -87,8 +84,6 @@ void __init omap_vp_init(struct voltagedomain *voltdm) (vdd->vp_rt_data.vlimitto_timeout << vp->common->vlimitto_timeout_shift)); voltdm->write(vp_val, vp->vlimitto); - - vp_debugfs_init(voltdm); } /* VP force update method of voltage scaling */ @@ -300,61 +295,3 @@ void omap_vp_disable(struct voltagedomain *voltdm) return; } - -/* Voltage debugfs support */ -static int vp_volt_debug_get(void *data, u64 *val) -{ - struct voltagedomain *voltdm = (struct voltagedomain *)data; - struct omap_vp_instance *vp = voltdm->vp; - struct omap_vdd_info *vdd = voltdm->vdd; - u8 vsel; - - if (!vdd) { - pr_warning("Wrong paramater passed\n"); - return -EINVAL; - } - - vsel = voltdm->read(vp->voltage); - - if (!voltdm->pmic->vsel_to_uv) { - pr_warning("PMIC function to convert vsel to voltage" - "in uV not registerd\n"); - return -EINVAL; - } - - *val = voltdm->pmic->vsel_to_uv(vsel); - return 0; -} - -DEFINE_SIMPLE_ATTRIBUTE(vp_volt_debug_fops, vp_volt_debug_get, NULL, "%llu\n"); - -static void __init vp_debugfs_init(struct voltagedomain *voltdm) -{ - struct omap_vdd_info *vdd = voltdm->vdd; - struct dentry *debug_dir; - - debug_dir = debugfs_create_dir("vp", vdd->debug_dir); - if (IS_ERR(debug_dir)) - pr_err("%s: Unable to create VP debugfs dir dir\n", __func__); - - (void) debugfs_create_x16("errorgain", S_IRUGO, debug_dir, - &(vdd->vp_rt_data.vpconfig_errorgain)); - (void) debugfs_create_x16("smpswaittimemin", S_IRUGO, - debug_dir, - &(vdd->vp_rt_data.vstepmin_smpswaittimemin)); - (void) debugfs_create_x8("stepmin", S_IRUGO, debug_dir, - &(vdd->vp_rt_data.vstepmin_stepmin)); - (void) debugfs_create_x16("smpswaittimemax", S_IRUGO, - debug_dir, - &(vdd->vp_rt_data.vstepmax_smpswaittimemax)); - (void) debugfs_create_x8("stepmax", S_IRUGO, debug_dir, - &(vdd->vp_rt_data.vstepmax_stepmax)); - (void) debugfs_create_x8("vddmax", S_IRUGO, debug_dir, - &(vdd->vp_rt_data.vlimitto_vddmax)); - (void) debugfs_create_x8("vddmin", S_IRUGO, debug_dir, - &(vdd->vp_rt_data.vlimitto_vddmin)); - (void) debugfs_create_x16("timeout", S_IRUGO, debug_dir, - &(vdd->vp_rt_data.vlimitto_timeout)); - (void) debugfs_create_file("curr_volt", S_IRUGO, debug_dir, - (void *) voltdm, &vp_volt_debug_fops); -} -- cgit v1.1