mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-02-01 07:50:47 +00:00
Enable charger mode
1) device.mk: add charger_res_images to PRODUCT_PACKAGES to use the default charger mode images 2) init.hardware.rc: configure charger service class 3) BoardConfig.mk: enable suspend in charger mode Bug: 36046603 Change-Id: I3652a69784b8ecd4e670f26fdd66b7c68d578f9f Signed-off-by: Yueyao Zhu <yueyao@google.com>
This commit is contained in:
committed by
Thierry Strudel
parent
5a88dfd5db
commit
a18de9021d
@@ -110,3 +110,6 @@ TARGET_USES_HWC2 := true
|
||||
# Display
|
||||
TARGET_HAS_WIDE_COLOR_DISPLAY := true
|
||||
TARGET_HAS_HDR_DISPLAY := false
|
||||
|
||||
# Charger Mode
|
||||
BOARD_CHARGER_ENABLE_SUSPEND := true
|
||||
|
||||
@@ -421,3 +421,7 @@ PRODUCT_COPY_FILES += \
|
||||
# Provide meaningful APN configuration
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/apns-full-conf.xml:system/etc/apns-conf.xml
|
||||
|
||||
# Use the default charger mode images
|
||||
PRODUCT_PACKAGES += \
|
||||
charger_res_images
|
||||
|
||||
@@ -17,6 +17,19 @@
|
||||
import init.${ro.hardware}.usb.rc
|
||||
import init.${ro.hardware}.diag.rc
|
||||
|
||||
on charger
|
||||
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
|
||||
wait /dev/block/bootdevice
|
||||
|
||||
service charger /charger
|
||||
class charger
|
||||
seclabel u:r:charger:s0
|
||||
|
||||
on early-init
|
||||
mount debugfs debugfs /sys/kernel/debug
|
||||
chmod 0755 /sys/kernel/debug
|
||||
|
||||
Reference in New Issue
Block a user