init: qcom: Add charger_monitor service

This adds the charger monitor service. The charger monitor
is responsible to conduct the adaptive input current limting.

This service is supported on 8x26, 8974 and 8x10.

CRs-Fixed: 457381
Change-Id: I7b7b3cd751a06f67a460d821043cfc2e896a53e2
This commit is contained in:
David Keitel 2013-07-15 21:11:35 -07:00
parent 2bec042f0c
commit 24e96c7ab5
2 changed files with 19 additions and 1 deletions

View File

@ -716,3 +716,8 @@ on property:persist.usb.hvdcp.detect=true
on property:persist.usb.hvdcp.detect=false
stop hvdcp
service charger_monitor /system/bin/charger_monitor
user system
group system
disabled

View File

@ -69,6 +69,17 @@ start_battery_monitor()
fi
}
start_charger_monitor()
{
if ls /sys/module/qpnp_charger/parameters/charger_monitor; then
chown root.system /sys/module/qpnp_charger/parameters/*
chown root.system /sys/class/power_supply/battery/input_current_max
chmod 0664 /sys/class/power_supply/battery/input_current_max
chmod 0664 /sys/module/qpnp_charger/parameters/charger_monitor
start charger_monitor
fi
}
baseband=`getprop ro.baseband`
izat_premium_enablement=`getprop ro.qc.sdk.izat.premium_enabled`
izat_service_mask=`getprop ro.qc.sdk.izat.service_mask`
@ -178,7 +189,9 @@ case "$target" in
esac
case "$baseband" in
"msm")
start_battery_monitor;;
start_battery_monitor
start_charger_monitor
;;
esac
;;
esac