/***********************************************************************
* I.MX6 Linux 自动获取AR1020 event input节点
* 说明:
* 本文主要记录如何自动获取AR1020 SPI电阻Touch产生的设备节点。
*
* 2016-4-5 深圳 南山平山村 曾剑锋
**********************************************************************/
cat /etc/profile
......
while [ -z $touchEvent ]
do
inputCheckLine=`cat /proc/bus/input/devices | grep -n "AR1020" | grep "Touchscreen"| awk -F: '{print $1}'`
touchEvent=`sed -n "$((${inputCheckLine}+4))p" /proc/bus/input/devices | grep -o "event."`
usleep 10
done
......