init: provide initial pemissions for ondemand governor
also set all governor permissions a bit late
Change-Id: I5c1445b31bcaf34a535efd7438fd612ada460ea2
diff --git a/prebuilt/common/etc/init.local.rc b/prebuilt/common/etc/init.local.rc
index afcca7b..f62fcd6 100644
--- a/prebuilt/common/etc/init.local.rc
+++ b/prebuilt/common/etc/init.local.rc
@@ -16,6 +16,53 @@
start sysinit
on boot
+ # interactive governor
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost
+ chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
+ chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
+
+ # ondemand governor
+ chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostfreq
+ chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/boostfreq
+ chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostpulse
+ chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/boostpulse
+ chown system system /sys/devices/system/cpu/cpufreq/ondemand/boosttime
+ chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ chown system system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+ chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+ chown system system /sys/devices/system/cpu/cpufreq/ondemand/down_differential
+ chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/down_differential
+ chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ chown system system /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias
+ chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias
+ chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
+ chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
+ chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
+ chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
+
+ # Assume SMP uses shared cpufreq policy for all CPUs
+ chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
chown system system /sys/block/mmcblk0/queue/scheduler
chmod 0664 /sys/block/mmcblk0/queue/scheduler