From fb391bf82f8caccdb88e19367e1e309499da785b Mon Sep 17 00:00:00 2001 From: lexingtontezz Date: Sat, 9 Sep 2023 00:26:14 -0400 Subject: [PATCH] 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 --- recovery/root/system/bin/runatboot.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recovery/root/system/bin/runatboot.sh b/recovery/root/system/bin/runatboot.sh index 1dadbd8..8dab218 100755 --- a/recovery/root/system/bin/runatboot.sh +++ b/recovery/root/system/bin/runatboot.sh @@ -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