blob: 8737d813429b85abe826f9f96997f60e880ebe68 [file] [log] [blame]
--- laptop-mode-tools-1.59//usr/share/laptop-mode-tools/modules/cpufreq 2011-08-07 12:30:43.000000000 -0700
+++ laptop-mode-tools-1.59//usr/share/laptop-mode-tools/modules/cpufreq 2012-06-20 11:46:24.465328480 -0700
@@ -139,3 +139,39 @@
done
fi
+# Optional setting for the interactive governor.
+INTERACTIVE_DIR=/sys/devices/system/cpu/cpufreq/interactive
+
+get_setting() {
+ if [ $ON_AC -eq 1 ] ; then
+ if [ "$ACTIVATE" -eq 1 ] ; then
+ eval echo \$"LM_AC_CPU_"$1
+ else
+ eval echo \$"NOLM_AC_CPU_"$1
+ fi
+ else
+ eval echo \$"BATT_CPU_"$1
+ fi
+}
+
+set_optional_interactive_value() {
+ sysfs_name=$1
+ config_value=$(get_setting $2)
+
+ if [ -z "${config_value}" ]; then
+ return;
+ fi
+ if [ -f ${INTERACTIVE_DIR}/$sysfs_name ]; then
+ log "VERBOSE" "Setting $sysfs_name for all cpus"
+ set_sysctl $INTERACTIVE_DIR/$sysfs_name ${config_value}
+ fi
+}
+
+if [ -d ${INTERACTIVE_DIR} ]; then
+ set_optional_interactive_value input_boost INPUT_BOOST
+ set_optional_interactive_value above_hispeed_delay ABOVE_HISPEED_DELAY
+ set_optional_interactive_value go_hispeed_load GO_HISPEED_LOAD
+ set_optional_interactive_value hispeed_freq HISPEED_FREQ
+ set_optional_interactive_value min_sample_time MIN_SAMPLE_TIME
+ set_optional_interactive_value timer_rate TIMER_RATE
+fi