aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm-debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/pm-debug.c')
-rw-r--r--arch/arm/mach-omap2/pm-debug.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index 7eb2c12c8b7c..1725da3f4e18 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -527,6 +527,29 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *dir)
527 return 0; 527 return 0;
528} 528}
529 529
530static int option_get(void *data, u64 *val)
531{
532 u32 *option = data;
533
534 *val = *option;
535
536 return 0;
537}
538
539static int option_set(void *data, u64 val)
540{
541 u32 *option = data;
542
543 *option = val;
544
545 if (option == &enable_off_mode)
546 omap3_pm_off_mode_enable(val);
547
548 return 0;
549}
550
551DEFINE_SIMPLE_ATTRIBUTE(pm_dbg_option_fops, option_get, option_set, "%llu\n");
552
530static int __init pm_dbg_init(void) 553static int __init pm_dbg_init(void)
531{ 554{
532 int i; 555 int i;
@@ -569,6 +592,10 @@ static int __init pm_dbg_init(void)
569 592
570 } 593 }
571 594
595 (void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUGO, d,
596 &enable_off_mode, &pm_dbg_option_fops);
597 (void) debugfs_create_file("sleep_while_idle", S_IRUGO | S_IWUGO, d,
598 &sleep_while_idle, &pm_dbg_option_fops);
572 pm_dbg_init_done = 1; 599 pm_dbg_init_done = 1;
573 600
574 return 0; 601 return 0;