Commit c4821c05 authored by Nicolas Pitre's avatar Nicolas Pitre

ARM: bL_switcher: add kernel cmdline param to disable the switcher on boot

By adding no_bL_switcher to the kernel cmdline string, the switcher
won't be activated automatically at boot time.  It is still possible
to activate it later with:

	echo 1 > /sys/kernel/bL_switcher/active
Signed-off-by: default avatarNicolas Pitre <nico@linaro.org>
parent 6b7437ae
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <linux/string.h> #include <linux/string.h>
#include <linux/sysfs.h> #include <linux/sysfs.h>
#include <linux/irqchip/arm-gic.h> #include <linux/irqchip/arm-gic.h>
#include <linux/moduleparam.h>
#include <asm/smp_plat.h> #include <asm/smp_plat.h>
#include <asm/suspend.h> #include <asm/suspend.h>
...@@ -521,6 +522,9 @@ static int __init bL_switcher_sysfs_init(void) ...@@ -521,6 +522,9 @@ static int __init bL_switcher_sysfs_init(void)
#endif /* CONFIG_SYSFS */ #endif /* CONFIG_SYSFS */
static bool no_bL_switcher;
core_param(no_bL_switcher, no_bL_switcher, bool, 0644);
static int __init bL_switcher_init(void) static int __init bL_switcher_init(void)
{ {
int ret; int ret;
...@@ -530,9 +534,11 @@ static int __init bL_switcher_init(void) ...@@ -530,9 +534,11 @@ static int __init bL_switcher_init(void)
return -EINVAL; return -EINVAL;
} }
if (!no_bL_switcher) {
ret = bL_switcher_enable(); ret = bL_switcher_enable();
if (ret) if (ret)
return ret; return ret;
}
#ifdef CONFIG_SYSFS #ifdef CONFIG_SYSFS
ret = bL_switcher_sysfs_init(); ret = bL_switcher_sysfs_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment