我正在使用kontron smarc-samx6i板运行nxp imx6q处理器。我目前正在使用yocto,因为我需要通过I2C连接ft5316的触摸屏。为此我按如下方式编辑了设备树:
polytouch: edt_ft5x06@39 {
compatible = "edt","edt_ft5x06","edt-ft5x06";
reg = <0x39>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_smx6_i2c_gpio_1>;
irq_pin=<&gpio3 1 0>;
interrupt-parent = <&gpio3>;
interrupts = <0 70 0x04>;
};
当我使用i2cdump
命令时触摸屏响应成功,但当我使用模块时,它不会响应。
当我使用以下命令时,我得到以下输出
root@smarc-samx6i:~# cat /proc/bus/input/devices
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="gpio-keys.27"
P: Phys=gpio-keys/input0
S: Sysfs=/devices/soc0/gpio-keys.27/input/input0
U: Uniq=
H: Handlers=kbd event0 evbug
B: PROP=0
B: EV=23
B: KEY=4000 100000 0 0 0
B: SW=1
我的设备未进行探测,并且在使用以下命令实例化设备时未收到任何错误:
echo edt_ft5x06 0x39> /sys/bus/i2c/devices/i2c-1/new_device
Instantiated device edt_ft5x06 at 0x39 device
我怎样才能让它发挥作用!!
答案 0 :(得分:0)
我认为“当使用模块时它不会响应”,你的意思是它不会响应触摸屏上的任何触摸事件。驱动模块是否正确加载?它是内置的还是用作可加载模块?您是否检查了“dmesg”以确认正确加载的驱动程序或lsmod的输出?如果驱动程序正确加载,您是否正在中断?
“cat / proc / interrupts”的输出是什么?按触摸屏时,您是否看到中断请求增加?如果没有,那么你有中断问题。如果您看到中断,是否可以使用“evtest”等实用程序查看是否有触摸屏事件?