2016-06-08 1 views
1

yocto로 만든 내 커널에서 다음과 같은 dmesg 출력을 얻습니다.yocto로 ft5x06 터치 스크린 인터페이스하기

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: [email protected] { 
    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가 응답하지 않습니다. 내가 돌보는 데 필요한 다른 것이 있습니까?

+0

기기 트리에 실수가 있습니다. 그러나 나는 당신이 단지 여기에서 잘못 생각했다고 생각합니다. 그렇지 않으면 당신의 전체 이미지가 만들어지지 않습니다. – h0ch5tr4355

+0

커널이 성공적으로 컴파일되고 있으며 장치 트리에 인터럽트 핀 구성에서 일부 구성이 있다는 것을 알 수 있습니다. 이 두 문법이 "interrupt-parent = <&gpio3>; 인터럽트 = <1 8>;" –

답변

1

본사 리눅스 커널 4.6에서 실행되는 Lenmaker BananaPro (A20)에서 "EDT-FT5x06"터치 컨트롤러가있는 lenmaker 7inch 터치 스크린이 있습니다.

다음은 내 장치 트리의 패치입니다. wake-gpiosinterrupts을 확인하십시오.

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: [email protected] { 
+   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: [email protected] { 
+  allwinner,pins = "PH7", "PH9"; 
+  allwinner,function = "gpio_out"; 
+  allwinner,drive = <SUN4I_PINCTRL_40_MA>; 
+  allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 
+ }; 
+ 
}; 

&reg_usb1_vbus { 

은 아마 당신은 리눅스 커널 모듈에서이 문서에서 자세한 내용을 찾을 : 여기 https://www.kernel.org/doc/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt

또는 : http://linux-sunxi.org/Touchscreen

+0

에 대한 위 정보에 따라 모든 정보를 제공했는데 gpio i2c와 같은 버스를 사용하는 것으로 나타났습니다. 두 장치가 공유하므로 edt-ft5x06을 프로빙하는 동안 장치 트리에서 i2cmux를 다시 추가합니다. edt_ft5x06과 동일합니다. 1-0038 : 플랫폼 데이터가 없습니까? edt_ft5x06 : 1-0038 프로브가 오류 -22로 실패했습니다. i2c i2c-1 : new_device : 0x38에 초기화 된 장치 edt-ft5x06 –

1

3.10.17 커널 동부 서머 타임 ft5x06 드라이버가 지원 장치 트리 없습니다. 4.1 또는 이후 버전과 같은 최신 커널에서 드라이버를 백포트해야하므로 드라이버와 함께 장치 트리를 사용할 수 있습니다.

+0

장치 트리를 사용하는 것 외에도 수동으로 터치 스크린 모듈을 커널 3.10.17에로드 할 수 있으며 그걸 써? –

+0

나는 당신의 질문을 정말로 이해하지 못했습니다. 장치 트리에 대한 드라이버가 올바르게 변경되고 올바른 장치 트리로 컴파일되면 모듈을 동적으로로드 할 수 있습니다. – Sanchayan

+0

menuconfig add make it을 사용하여 모듈을 추가했습니다. 커널을 부팅 한 후 cd /lib/modules/3.10.17-rel1.0\+g232293e/kernel/drivers/input/touchscreen/에서 직접 추가 할 수 있습니다. –