瀏覽代碼

adding touchscreen patch to setup.sh for surface go

Jake Day 6 年之前
父節點
當前提交
8535dcc3ce
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      setup.sh

+ 7 - 0
setup.sh

@@ -161,6 +161,13 @@ if [ "$SUR_MODEL" = "Surface Go" ]; then
 	echo "\nInstalling ath10k firmware for Surface Go...\n"
 	mkdir -p /lib/firmware/ath10k
 	unzip -o firmware/ath10k_firmware.zip -d /lib/firmware/ath10k/
+
+	if [ ! -f "/etc/init.d/surfacego-touchscreen" ]; then
+		echo "\nPatching power control for Surface Go touchscreen...\n"
+		echo "echo \"on\" > /sys/devices/pci0000:00/0000:00:15.1/i2c_designware.1/power/control" > /etc/init.d/surfacego-touchscreen
+		chmod 755 /etc/init.d/surfacego-touchscreen
+		update-rc.d surfacego-touchscreen defaults
+	fi
 fi
 
 echo "Installing marvell firmware...\n"