summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/soc/qcom/Kconfig10
-rw-r--r--drivers/soc/qcom/msm_performance.c8
2 files changed, 16 insertions, 2 deletions
diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
index 2babb640d38c..dd33016d5c88 100644
--- a/drivers/soc/qcom/Kconfig
+++ b/drivers/soc/qcom/Kconfig
@@ -475,6 +475,16 @@ config MSM_PERFORMANCE
It ensures that no more than a user specified number of CPUs stay
online at any given point in time.
+config MSM_PERFORMANCE_HOTPLUG_ON
+ bool "Hotplug functionality through msm_performance turned on"
+ depends on MSM_PERFORMANCE
+ default y
+ help
+ If some other core-control driver is present turn off the core-control
+ capability of msm_performance driver. Setting this flag to false will
+ compile out the nodes needed for core-control functionality through
+ msm_performance.
+
endif # ARCH_QCOM
config MSM_SUBSYSTEM_RESTART
diff --git a/drivers/soc/qcom/msm_performance.c b/drivers/soc/qcom/msm_performance.c
index e9d925291956..9d7f16d0a512 100644
--- a/drivers/soc/qcom/msm_performance.c
+++ b/drivers/soc/qcom/msm_performance.c
@@ -204,7 +204,9 @@ static const struct kernel_param_ops param_ops_max_cpus = {
.get = get_max_cpus,
};
+#ifdef CONFIG_MSM_PERFORMANCE_HOTPLUG_ON
device_param_cb(max_cpus, &param_ops_max_cpus, NULL, 0644);
+#endif
static int set_managed_cpus(const char *buf, const struct kernel_param *kp)
{
@@ -287,9 +289,11 @@ static int get_managed_online_cpus(char *buf, const struct kernel_param *kp)
static const struct kernel_param_ops param_ops_managed_online_cpus = {
.get = get_managed_online_cpus,
};
-device_param_cb(managed_online_cpus, &param_ops_managed_online_cpus,
- NULL, 0444);
+#ifdef CONFIG_MSM_PERFORMANCE_HOTPLUG_ON
+device_param_cb(managed_online_cpus, &param_ops_managed_online_cpus,
+ NULL, 0444);
+#endif
/*
* Userspace sends cpu#:min_freq_value to vote for min_freq_value as the new
* scaling_min. To withdraw its vote it needs to enter cpu#:0