device_google_raviole/conf/init.oriole.rc
Tai Kuo 7c202b299e raviole: support touch sensitivity mode switching
Use a persist system property to control the touch driver attribute
file glove_mode.

0: default sensitivity mode (default)
1: high sensitivity mode

Bug: 173330977
Bug: 174189638
Test: manual test
Signed-off-by: Tai Kuo <taikuo@google.com>
Change-Id: Id5e31bd335f8872993ea82ad9a7e7217ed9de5c6
2021-03-13 11:28:33 +08:00

36 lines
1.2 KiB
Text

# Oriole specific init.rc
import /vendor/etc/init/hw/init.gs101.rc
on init && property:ro.build.flavor=factory_oriole-userdebug
import /vendor/etc/init/hw/init.factory.rc
on init
# logbuffer
chown system system /dev/logbuffer_5-0057
# register/nvmem dump
chown system system /d/regmap/5-0036/registers
chown system system /sys/bus/nvmem/devices/4-00500/nvmem
on early-boot
# Wait for insmod_sh to finish all common modules
wait_for_prop vendor.common.modules.ready 1
start insmod_sh_oriole
service insmod_sh_oriole /vendor/bin/init.insmod.sh /vendor/etc/init.insmod.oriole.cfg
class main
user root
group root system
disabled
oneshot
on fs
# Fingerprint
chown system system /dev/goodix_fp
exec_background - system shell -- /vendor/bin/trusty_apploader /vendor/firmware/g6.app
# Toggle glove_mode according to touch_sensitivity_mode
on property:persist.vendor.touch_sensitivity_mode=0 && property:sys.boot_completed=1
write /sys/class/spi_master/spi11/spi11.0/glove_mode 00
on property:persist.vendor.touch_sensitivity_mode=1 && property:sys.boot_completed=1
write /sys/class/spi_master/spi11/spi11.0/glove_mode 01