summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiulio Cervera <giulio.cervera@cyanogenmod.org>2014-11-25 16:58:33 +0100
committerChirayu Desai <chirayudesai1@gmail.com>2014-11-28 19:30:21 +0530
commit5cd8ae934771e93b7c44773c44bdbec565f09e18 (patch)
tree9db16057fc9ea43e79098a64367a06fbe4cbb2e5
parentd330400c455028b394fae42fe49ea29695eee50a (diff)
Charger updates
* Copy our charger binary as healthd * Add permissions * Add service Change-Id: Iedfffbbb1db9ffcdd9219cbe8a4a11255f7ca99a
-rw-r--r--rootdir/init.qcom.rc14
-rw-r--r--shinano.mk2
2 files changed, 15 insertions, 1 deletions
diff --git a/rootdir/init.qcom.rc b/rootdir/init.qcom.rc
index b265ef6..5035af9 100644
--- a/rootdir/init.qcom.rc
+++ b/rootdir/init.qcom.rc
@@ -251,6 +251,16 @@ on boot
chown system /sys/devices/virtual/timed_output/vibrator/vtg_level
+ # charger
+ chown root system /sys/module/qpnp_charger/parameters/charger_monitor
+ chown root system /sys/class/power_supply/battery/input_current_max
+ chown root system /sys/class/power_supply/battery/input_current_trim
+ chown root system /sys/class/power_supply/battery/voltage_min
+ chmod 0644 /sys/module/qpnp_charger/parameters/charger_monitor
+ chmod 0644 /sys/class/power_supply/battery/input_current_max
+ chmod 0644 /sys/class/power_supply/battery/input_current_trim
+ chmod 0644 /sys/class/power_supply/battery/voltage_min
+
# NFC
# Symlink for compability
symlink /dev/pn547 /dev/pn544
@@ -615,6 +625,10 @@ service setup_fs /system/bin/setup_fs /dev/block/platform/msm_sdcc.1/by-name/use
group root
oneshot
+service charger /sbin/healthd -c
+ class charger
+ seclabel u:r:healthd:s0
+
on property:init.svc.surfaceflinger=running
start ppd
diff --git a/shinano.mk b/shinano.mk
index 7a2b240..c54fab7 100644
--- a/shinano.mk
+++ b/shinano.mk
@@ -52,7 +52,7 @@ PRODUCT_PACKAGES += \
# Sbin
PRODUCT_COPY_FILES += \
- $(COMMON_PATH)/rootdir/charger:root/charger \
+ $(COMMON_PATH)/rootdir/charger:root/healthd \
$(COMMON_PATH)/rootdir/sbin/tad_static:root/sbin/tad_static
# ANT+