sunfish: Enable toggle support of Lineage Health HAL

Co-authored-by: Michael Bestas <mkbestas@lineageos.org>
Change-Id: I6d4ac302dd695df8fe33ccabc400a53bb83c4cc8
This commit is contained in:
kyasu
2024-07-21 15:53:46 +09:00
committed by Michael Bestas
parent 94f2ea4aec
commit 8a9d395bb8
3 changed files with 7 additions and 5 deletions

View File

@@ -12,8 +12,9 @@ TARGET_KERNEL_SOURCE := kernel/google/msm-4.14
TARGET_NEEDS_DTBOIMAGE := true
# Lineage Health
TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_DEADLINE := true
TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_TOGGLE := false
TARGET_HEALTH_CHARGING_CONTROL_CHARGING_PATH := /sys/class/power_supply/sm7150_bms/charge_disable
TARGET_HEALTH_CHARGING_CONTROL_CHARGING_ENABLED := 0
TARGET_HEALTH_CHARGING_CONTROL_CHARGING_DISABLED := 1
# Manifests
DEVICE_MANIFEST_FILE += device/google/sunfish/lineage_manifest.xml

View File

@@ -366,9 +366,6 @@ on early-boot
# FG cycle count read from dumpstate + backup restore from health HAL (and pixelstats)
chown system system /sys/class/power_supply/maxfg/cycle_counts_bins
# Adaptive charge
chown system system /sys/class/power_supply/battery/charge_deadline
# Battery Defender
chown system system /sys/devices/platform/soc/soc:google,charger/charge_stop_level
chown system system /sys/devices/platform/soc/soc:google,charger/charge_start_level

View File

@@ -146,3 +146,7 @@ firmware_directories /vendor/firmware_mnt/image/
# socinfo
/sys/devices/soc0 serial_number 0000 root root
# Charger
/sys/class/power_supply/sm7150_bms charge_disable 0660 system system
/sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm6150@0:google,bms/power_supply/sm7150_bms charge_disable 0660 system system