diff options
author | David Lin <dtwlin@google.com> | 2017-03-08 17:36:18 -0800 |
---|---|---|
committer | David Lin <dtwlin@google.com> | 2017-03-09 18:42:33 +0000 |
commit | 27b2c1e678468d5001f1540c78ada9ba2d1e236e (patch) | |
tree | 0051d6d753d0d94a4ee9a89a085d21c41f4d3dd8 /rootdir | |
parent | dda9cbb350aa16ce4705b245850b83f9117a9f16 (diff) | |
download | core-27b2c1e678468d5001f1540c78ada9ba2d1e236e.tar.gz core-27b2c1e678468d5001f1540c78ada9ba2d1e236e.tar.bz2 core-27b2c1e678468d5001f1540c78ada9ba2d1e236e.zip |
init.rc: enable ledtrig-transient support for vibrator
This change makes the init process to always attempts to enable
transient trigger for vibrator. This allows the exported properties to
change the ownership later at the on boot stage.
Test: device vibrates with the driver supports ledtrig-transient
Change-Id: If5eb7b7feaefe803f2ead634fbe4fc7b48da84ea
Signed-off-by: David Lin <dtwlin@google.com>
Diffstat (limited to 'rootdir')
-rw-r--r-- | rootdir/init.rc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc index c025d1379..d338767dd 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -244,6 +244,10 @@ on init # set RLIMIT_NICE to allow priorities from 19 to -20 setrlimit 13 40 40 + # This allows the ledtrig-transient properties to be created here so + # that they can be chown'd to system:system later on boot + write /sys/class/leds/vibrator/trigger "transient" + # Healthd can trigger a full boot from charger mode by signaling this # property when the power button is held. on property:sys.boot_from_charger_mode=1 @@ -557,6 +561,11 @@ on boot chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq + chown system system /sys/class/leds/vibrator/trigger + chown system system /sys/class/leds/vibrator/activate + chown system system /sys/class/leds/vibrator/brightness + chown system system /sys/class/leds/vibrator/duration + chown system system /sys/class/leds/vibrator/state chown system system /sys/class/timed_output/vibrator/enable chown system system /sys/class/leds/keyboard-backlight/brightness chown system system /sys/class/leds/lcd-backlight/brightness |