mirror of
https://github.com/Evolution-X-Devices/device_nokia_sdm660-common
synced 2026-02-01 08:51:29 +00:00
This HAL makes use of the sysfs attribute /sys/class/qcom-battery/restricted_charging to control whether fast charging is allowed or not. When fast charging is disabled (i.e. 1 is written to the sysfs attribute), current is restricted to 1 A (the value at /sys/class/qcom-battery/restricted_current, in uA). This has been tested on the Nokia 6.1 (PL2); however, it should work on other Nokia SDM660 devices as well since they share the same kernel source. Adapted from the work at android_hardware_samsung: https://github.com/LineageOS/android_hardware_samsung/tree/lineage-20/hidl/fastcharge FastCharge interface definition: https://github.com/LineageOS/android_hardware_lineage_interfaces/tree/lineage-20.0/fastcharge/1.0 Change-Id: I78ce842ef6263c19088f29a40abfa1ef6534cc99