samsung: hidl: add fastcharge implementation
authorFrancescodario Cuzzocrea <bosconovic@gmail.com>
Thu, 24 Dec 2020 15:00:30 +0000 (16:00 +0100)
committerBruno Martins <bgcngm@gmail.com>
Mon, 18 Jan 2021 23:05:40 +0000 (23:05 +0000)
commit2f88aeaf273859c25dc20486d8a2f944be488ecb
tree9c39c94025f1c27f80e3e8c5c9f726eb05573204
parentc14334424235d33a9a52c67f819e638f526c562e
samsung: hidl: add fastcharge implementation

 * On samsung, kernel exposes a sysfs node to disable fastcharge at
   will, depending on what the user sets in battery settings UI.

 * Disabling fast charge may be useful for reducing the heat produced by
   the device while charging, or for extending the lifespan of the battery

 * This commit introduces the fastcharge HIDL, which writes in the node

              /sys/class/sec/switch/afc_disable

   0 or 1 depeding on user selection.
   0 means that fastcharge is enabled, while 1 means that fastcharge is
     disabled

Change-Id: I369ba9c437b3a83a88c2ce74d603b7d7ddd9cfbb
hidl/fastcharge/Android.mk [new file with mode: 0644]
hidl/fastcharge/FastCharge.cpp [new file with mode: 0644]
hidl/fastcharge/FastCharge.h [new file with mode: 0644]
hidl/fastcharge/include/samsung_fastcharge.h [new file with mode: 0644]
hidl/fastcharge/service.cpp [new file with mode: 0644]
hidl/fastcharge/vendor.lineage.fastcharge@1.0-service.samsung.rc [new file with mode: 0644]
hidl/fastcharge/vendor.lineage.fastcharge@1.0-service.samsung.xml [new file with mode: 0644]