From ae19300740da278361353ee478d6ba53ab143db8 Mon Sep 17 00:00:00 2001 From: Zhao Wei Liew Date: Fri, 11 Nov 2016 06:59:46 +0800 Subject: [PATCH] land: Properly set up low power modes on charger We don't need all of the other stuff. Just disable all cores and enable LPM. Change-Id: I4721f9a5aa57d0523f37f7352ade8b9a2919b0d9 --- rootdir/init.qcom.power.rc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/rootdir/init.qcom.power.rc b/rootdir/init.qcom.power.rc index 69e1034..4dc8a7b 100644 --- a/rootdir/init.qcom.power.rc +++ b/rootdir/init.qcom.power.rc @@ -135,7 +135,17 @@ on class_start:late_start trigger enable-low-power on charger - trigger enable-low-power + # Offline all cores other than CPU0 + write /sys/devices/system/cpu/cpu1/online 0 + write /sys/devices/system/cpu/cpu2/online 0 + write /sys/devices/system/cpu/cpu3/online 0 + write /sys/devices/system/cpu/cpu4/online 0 + write /sys/devices/system/cpu/cpu5/online 0 + write /sys/devices/system/cpu/cpu6/online 0 + write /sys/devices/system/cpu/cpu7/online 0 + + write /sys/module/lpm_levels/parameters/sleep_disabled 0 + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor powersave on property:init.svc.recovery=running trigger enable-low-power