arm: tegra: EDP: add compatibility to new EDP
Timo Alho [Fri, 25 Oct 2013 20:50:58 +0000 (23:50 +0300)]
This patch adds compatibility to new system EDP framework

Change-Id: Ifd9b4f99d341e838f287bf9b0c409380c03a5050
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: http://git-master/r/304007
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

arch/arm/mach-tegra/edp.c

index def33c7..8435a91 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/module.h>
 #include <linux/uaccess.h>
 #include <linux/edp.h>
+#include <linux/sysedp.h>
 #include <linux/tegra-soc.h>
 
 #include <mach/edp.h>
@@ -753,10 +754,13 @@ static const struct file_operations edp_reg_override_debugfs_fops = {
        .release        = single_release,
 };
 
-#ifdef CONFIG_EDP_FRAMEWORK
+#if defined(CONFIG_EDP_FRAMEWORK) || defined(CONFIG_SYSEDP_FRAMEWORK)
 static __init struct dentry *tegra_edp_debugfs_dir(void)
 {
-       return edp_debugfs_dir;
+       if (edp_debugfs_dir)
+               return edp_debugfs_dir;
+       else
+               return debugfs_create_dir("edp", NULL);
 }
 #else
 static __init struct dentry *tegra_edp_debugfs_dir(void)