LG8n: charger: Powersaving in charger mode

Bug: 72445880
Test: boot to charger
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
This commit is contained in:
Wei Wang 2023-08-29 12:41:08 +01:00 committed by Shirayuki39
parent f8adb7226a
commit 1ca23a7b10

View file

@ -9,6 +9,18 @@ on charger
write /sys/devices/system/cpu/cpufreq/policy6/scaling_min_freq 0 write /sys/devices/system/cpu/cpufreq/policy6/scaling_min_freq 0
write /sys/class/devfreq/mtk-dvfsrc-devfreq/userspace/set_freq 0 write /sys/class/devfreq/mtk-dvfsrc-devfreq/userspace/set_freq 0
# Lock to lowest frequency on charger mode
write /sys/devices/system/cpu/cpufreq/policy0/scaling_governor powersave
write /sys/devices/system/cpu/cpufreq/policy6/scaling_governor powersave
# Offline all cores except 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
on post-fs-data on post-fs-data
write /sys/devices/system/cpu/cpufreq/policy0/scaling_governor sugov_ext write /sys/devices/system/cpu/cpufreq/policy0/scaling_governor sugov_ext