summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rootdir/etc/init.qcom.power.rc87
1 files changed, 42 insertions, 45 deletions
diff --git a/rootdir/etc/init.qcom.power.rc b/rootdir/etc/init.qcom.power.rc
index 809e37e..7b6c454 100644
--- a/rootdir/etc/init.qcom.power.rc
+++ b/rootdir/etc/init.qcom.power.rc
@@ -1,30 +1,6 @@
on early-init
write /sys/block/mmcblk0/bdi/read_ahead_kb 512
-on charger
- write /sys/module/lpm_levels/enable_low_power/l2 2
- write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 1
- write /sys/module/msm_thermal/core_control/enabled 0
- write /sys/devices/system/cpu/cpu1/online 1
- write /sys/devices/system/cpu/cpu2/online 1
- write /sys/devices/system/cpu/cpu3/online 1
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "powersave"
- write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "powersave"
- write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "powersave"
- write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "powersave"
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000
- write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 300000
- write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 300000
- write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 300000
- write /sys/module/msm_thermal/core_control/enabled 1
- write /sys/devices/system/cpu/cpu1/online 0
- write /sys/devices/system/cpu/cpu2/online 0
- write /sys/devices/system/cpu/cpu3/online 0
-
on enable-low-power
write /sys/module/lpm_levels/enable_low_power/l2 4
write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1
@@ -43,34 +19,17 @@ on enable-low-power
write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled 1
write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled 1
write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu1/retention/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu2/retention/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu3/retention/suspend_enabled 1
write /sys/module/msm_pm/modes/cpu0/retention/idle_enabled 1
write /sys/module/msm_pm/modes/cpu1/retention/idle_enabled 1
write /sys/module/msm_pm/modes/cpu2/retention/idle_enabled 1
write /sys/module/msm_pm/modes/cpu3/retention/idle_enabled 1
+
write /sys/module/msm_thermal/core_control/enabled 0
+
write /sys/devices/system/cpu/cpu1/online 1
write /sys/devices/system/cpu/cpu2/online 1
write /sys/devices/system/cpu/cpu3/online 1
- write /sys/class/devfreq/qcom,cpubw.40/governor "cpubw_hwmon"
-
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000
- write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 300000
- write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 300000
- write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 300000
-
- chown root system /sys/devices/system/cpu/cpu1/online
- chown root system /sys/devices/system/cpu/cpu2/online
- chown root system /sys/devices/system/cpu/cpu3/online
- chmod 664 /sys/devices/system/cpu/cpu1/online
- chmod 664 /sys/devices/system/cpu/cpu2/online
- chmod 664 /sys/devices/system/cpu/cpu3/online
-
- write /dev/cpuctl/cpu.notify_on_migrate 1
-
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive"
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "interactive"
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "interactive"
@@ -84,6 +43,17 @@ on enable-low-power
write /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor 100000
write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 30000
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000
+ write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 300000
+ write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 300000
+ write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 300000
+ chown root system /sys/devices/system/cpu/cpu1/online
+ chown root system /sys/devices/system/cpu/cpu2/online
+ chown root system /sys/devices/system/cpu/cpu3/online
+ chmod 664 /sys/devices/system/cpu/cpu1/online
+ chmod 664 /sys/devices/system/cpu/cpu2/online
+ chmod 664 /sys/devices/system/cpu/cpu3/online
+
write /sys/module/msm_thermal/core_control/enabled 1
write /sys/module/cpu_boost/parameters/boost_ms 20
@@ -91,13 +61,40 @@ on enable-low-power
write /sys/module/cpu_boost/parameters/input_boost_freq 1497600
write /sys/module/cpu_boost/parameters/input_boost_ms 40
+ write /sys/class/devfreq/qcom,cpubw.40/governor "cpubw_hwmon"
+ write /sys/class/kgsl/kgsl-3d0/devfreq/governor "msm-adreno-tz"
+
+ write /dev/cpuctl/cpu.notify_on_migrate 1
+
+on charger
+ write /sys/module/lpm_levels/enable_low_power/l2 2
+ write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1
+ write /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled 1
+ write /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled 1
+ write /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled 1
+ write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 1
+ write /sys/module/msm_thermal/core_control/enabled 0
+ write /sys/devices/system/cpu/cpu1/online 1
+ write /sys/devices/system/cpu/cpu2/online 1
+ write /sys/devices/system/cpu/cpu3/online 1
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "powersave"
+ write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "powersave"
+ write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "powersave"
+ write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "powersave"
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000
+ write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 300000
+ write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 300000
+ write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 300000
+ write /sys/module/msm_thermal/core_control/enabled 1
+ write /sys/devices/system/cpu/cpu1/online 0
+ write /sys/devices/system/cpu/cpu2/online 0
+ write /sys/devices/system/cpu/cpu3/online 0
+
on boot
trigger enable-low-power
on property:init.svc.recovery=running
trigger enable-low-power
- write /sys/class/android_usb/android0/idVendor 0FCE
- write /sys/class/android_usb/android0/idProduct 6${ro.usb.pid_suffix}
on property:dev.bootcomplete=1
# Set max mA current for usb/dc charger