我从使用yocto创建的内核中获得了以下dmesg输出。
bus: 'i2c': add driver edt_ft5x06
bus: 'i2c': driver_probe_device: matched device 1-0038 with driver edt_ft5x06
bus: 'i2c': really_probe: probing driver edt_ft5x06 with device 1-0038
edt_ft5x06 1-0038: no default pinctrl state
edt_ft5x06 1-0038: probe
edt_ft5x06 1-0038: no platform data?
edt_ft5x06: probe of 1-0038 failed with error -22
i2c-core: driver [edt_ft5x06] registered我的设备树包含:
smarc_i2c_cam: i2c-gpio-1 {
compatible = "i2c-gpio";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_smx6_i2c_gpio_1>;
gpios =
<&gpio4 10 0>, /* sda */
<&gpio1 6 0>; /* scl */
#address-cells = <1>;
#size-cells = <0>;
i2c-gpio,delay-us = <2>;
};
polytouch: edt-ft5x06@38 {
compatible = "edt,edt-ft5x06";
reg = <0x38>;
pinctrl-names = "default";
//pinctrl-1 = <&edt_ft5x06_pins>;
interrupt-parent = <&gpio3>;
interrupts = <1 8>;
};我的主板是smarc-samx6i (imx6q“飞思卡尔”处理器)。
Linux内核是3.10.17。
但是触摸没有反应,甚至连i2c也没有反应。还有什么需要我处理的吗?
发布于 2016-06-09 17:08:45
我有一个lenmaker 7英寸的触摸屏,带有"EDT-FT5x06“触摸屏,在一台Lenmaker (A20)上运行,运行在主线Linux4.6内核上。
这是我的设备树的补丁。看看wake-gpios和interrupts。
diff --git a/arch/arm/boot/dts/sun7i-a20-bananapro.dts b/arch/arm/boot/dts/sun7i-a20-bananapro.dts
index 18fcc87..50f1a36 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapro.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapro.dts
@@ -147,6 +147,26 @@
status = "okay";
};
+&i2c3 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c3_pins_a>;
+ edt: edt-ft5x06@38 {
+ compatible = "edt,edt-ft5x06";
+ reg = <0x38>;
+ interrupt-parent = <&pio>;
+ interrupts = <7 9 IRQ_TYPE_EDGE_FALLING>;
+ wake-gpios = <7 7 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&edt_ft5x06_pins>;
+ touchscreen-size-x = <1024>;
+ touchscreen-size-y = <600>;
+ touchscreen-inverted-x;
+ touchscreen-swapped-x-y;
+ };
+};
+
+
&ir0 {
pinctrl-names = "default";
pinctrl-0 = <&ir0_rx_pins_a>;
@@ -222,6 +242,14 @@
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
+
+ edt_ft5x06_pins: edt_ft5x06_pins@0 {
+ allwinner,pins = "PH7", "PH9";
+ allwinner,function = "gpio_out";
+ allwinner,drive = <SUN4I_PINCTRL_40_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+
};
®_usb1_vbus {也许您可以在linux内核模块的文档中找到更多信息:https://www.kernel.org/doc/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt
或者在这里:http://linux-sunxi.org/Touchscreen
发布于 2016-07-12 12:17:30
3.10.17内核中的edt ft5x06驱动程序未启用设备树。您必须从较新的内核(如4.1或更高版本)向后移植驱动程序,然后才能将设备树与驱动程序一起使用。
https://stackoverflow.com/questions/37699953
复制相似问题