touchscreen: support ilitek touch panel variants

Reworked the script logic to load both variants' touchscreen kernel modules. Only the nova_0flash_mmi.ko module needs a manual load of the firmware as the ili8992_mmi.ko module loads firmware automatically. The script runs a quick check for a known value and then loads firmware accordingly. Running both modules showed no issues.

Change-Id: Ib38f3adf802c505eb5aae58441efba4fda0e4f91
This commit is contained in:
lexingtontezz 2023-09-09 00:26:14 -04:00 committed by Tezz Dixon
parent 569dd9a075
commit fb391bf82f

View file

@ -1,11 +1,17 @@
#!/system/bin/sh
mount /vendor_dlkm
mount /vendor
modprobe -d /vendor/lib/modules /vendor/lib/modules/nova_0flash_mmi.ko
modprobe -d /vendor/lib/modules /vendor/lib/modules/ili9882_mmi.ko
sleep 1
if [ $(cat /sys/class/touchscreen/primary/productinfo) == "NT36672C" ]
then
echo 1 > /sys/class/touchscreen/primary/forcereflash
echo novatek_ts-csot-NT36672C-2302240D-605b-genevn.bin > /sys/class/touchscreen/primary/doreflash
echo "Reflashing firmware..."
echo 0 > /sys/class/touchscreen/primary/forcereflash
fi
is_fastboot=$(getprop init.svc.fastbootd)
if [ "$is_fastboot" != "running" ]; then