touch: init service to access gti interactive_calibrate sysfs
Write usage: setprop vendor.touch.gti0.ical VALUE
Any VALUE(e.g. 20X or 30X) set through this property will write
into gti interactive_calibrate sysfs except for the VALUE `read`.
Read usage: setprop vendor.touch.gti0.ical read
getprop vendor.touch.gti0.ical.result
setprop with VALUE `read` will read the gti
interactive_calibrate sysfs and save the result to
vendor.touch.gti0.ical.result.
Besides, please add your DOMAIN to access vendor_gti_prop.
set_prop(DOMAIN, vendor_gti_prop)
Bug: 331139251
Test: Manually verify the result.
Change-Id: I6296b9533dd0209e66832bfbbed6030a30077b96
Signed-off-by: Super Liu <supercjliu@google.com>
diff --git a/touch/gti/init.touch.gti1.rc b/touch/gti/init.touch.gti1.rc
index a4de328..ba99210 100644
--- a/touch/gti/init.touch.gti1.rc
+++ b/touch/gti/init.touch.gti1.rc
@@ -24,3 +24,15 @@
chown system system /proc/goog_touch_interface/gti.1/ss_base
chown system system /proc/goog_touch_interface/gti.1/ss_diff
chown system system /proc/goog_touch_interface/gti.1/ss_raw
+
+on property:vendor.touch.gti1.ical=*
+ setprop vendor.touch.gti1.ical.state init
+ start touch_gti1_ical
+ wait_for_prop vendor.touch.gti1.ical.state done
+
+service touch_gti1_ical /vendor/bin/touch_gti_ical 1 ${vendor.touch.gti1.ical}
+ class main
+ user system
+ group system shell
+ disabled
+ oneshot