init script: start the vm_bms service for 8916
The vm_bms service is the voltage mode battery monitoring system (BMS). Start the service as root to set CAP_BLOCK_SUSPEND for wake lock capability. Later, the service will drop itself down as a system service but will retain CAP_BLOCK_SUSPEND capability. Change-Id: I7ee8eed0b075e2ee82b2b6c7e3a771d97b08a33a
This commit is contained in:
parent
736b536488
commit
439374a70d
|
@ -757,3 +757,8 @@ on property:persist.sys.rootagent=1
|
|||
start rootagent
|
||||
on property:persist.sys.rootagent=0
|
||||
stop rootagent
|
||||
|
||||
service vm_bms /system/bin/vm_bms
|
||||
user root
|
||||
group root
|
||||
disabled
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/system/bin/sh
|
||||
# Copyright (c) 2009-2013, The Linux Foundation. All rights reserved.
|
||||
# Copyright (c) 2009-2014, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
|
@ -83,6 +83,17 @@ start_charger_monitor()
|
|||
fi
|
||||
}
|
||||
|
||||
start_vm_bms()
|
||||
{
|
||||
if [ -e /dev/vm_bms ]; then
|
||||
chown -h root.system /sys/class/power_supply/bms/current_now
|
||||
chown -h root.system /sys/class/power_supply/bms/voltage_ocv
|
||||
chmod -h 0664 /sys/class/power_supply/bms/current_now
|
||||
chmod -h 0664 /sys/class/power_supply/bms/voltage_ocv
|
||||
start vm_bms
|
||||
fi
|
||||
}
|
||||
|
||||
baseband=`getprop ro.baseband`
|
||||
#
|
||||
# Suppress default route installation during RA for IPV6; user space will take
|
||||
|
@ -164,4 +175,7 @@ case "$target" in
|
|||
"msm8610")
|
||||
start_charger_monitor
|
||||
;;
|
||||
"msm8916")
|
||||
start_vm_bms
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
|
||||
# Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
|
@ -171,6 +171,10 @@
|
|||
/sys/devices/virtual/input/input* poll 0660 input system
|
||||
/sys/devices/virtual/input/input* pollrate_ms 0660 input system
|
||||
|
||||
# vm_bms
|
||||
/dev/vm_bms 0660 system system
|
||||
/dev/battery_data 0660 system system
|
||||
|
||||
# wlan
|
||||
/dev/wcnss_wlan 0660 system system
|
||||
#nfc permissions
|
||||
|
|
Loading…
Reference in New Issue