sm6375-common: Define OEM fast charge sysfs node

* required for oem fast charger detection
 * this forces android to display "charging rapidly" whenever our
   proprietary 33w charger is connected, based on the value of
   this node (0/1)

Change-Id: I5094dfcd721a56e3ede62b16cdf187c898bdedf2
This commit is contained in:
ghostrider-reborn
2023-06-27 06:33:15 +03:00
committed by boedhack99
parent 1779f36fec
commit d49bf5fde6
3 changed files with 13 additions and 0 deletions

View File

@@ -276,4 +276,7 @@
<!-- Enable video pause workaround when enabling/disabling the camera. -->
<bool name="config_useVideoPauseWorkaround">true</bool>
<!-- Path to fast charging status file to detect whether an oem fast charger is active -->
<string name="config_oemFastChargerStatusPath" translatable="false">/sys/class/power_supply/bms/fastcharge_mode</string>
</resources>

View File

@@ -11,3 +11,9 @@ binder_call(system_app, hal_audio_default)
binder_call(system_app, hal_vibrator_default)
binder_call(system_app, hal_wifi_supplicant_default)
binder_call(system_app, wificond)
# Fast charger node
allow system_app vendor_sysfs_battery_supply:dir { search };
allow system_app vendor_sysfs_battery_supply:file { getattr open read };
r_dir_file(system_app, vendor_sysfs_battery_supply)

View File

@@ -10,3 +10,7 @@ allow system_server system_file:file r_file_perms;
# Allow system_server to set vendor_persist_camera_prop
get_prop(system_server, vendor_camera_prop)
get_prop(system_server,vendor_persist_camera_prop)
# Allow system_server to read Fast Charging status
allow system_server vendor_sysfs_battery_supply:file { getattr open read };
allow system_server vendor_sysfs_battery_supply:file rw_file_perms;