2019-06-14 02:43 AM
Hi, I use two touch panels, one is ft5306 and another is tsc2007. These are under same i2c bus, the i2c2 controller.The ft5306 use PG8 as interrupt line. The tsc2007 use PI8 as interrupt ine. Here is my dts code for these devices.
331 ft5x06: ft5x06@38 {
332 compatible = "edt,edt-ft5306";
333 reg = <0x38>;
334 interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
335 interrupt-parent = <&gpiog>;
336 interrupt-controller;
337 reset-gpios = <&gpiog 7 GPIO_ACTIVE_LOW>;
338 status = "okay";
339 };
362 tsc2007: tsc2007@48 {
363 compatible = "ti,tsc2007";
364 reg = <0x48>;
365 interrupt-parent = <&gpioi>;
366 interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
367 interrupt-controller;
368 gpios = <&gpioi 8 GPIO_ACTIVE_LOW>;
369 ti,x-plate-ohms = <660>;
370 wakeup-source;
371 };
When the linux system startup, the tsc2007 loaded and successful. But the ft5306 driver was error.
[ 6.996552] stm32mp157-pinctrl soc:pin-controller@50002000: irq line 8 already requested.
[ 7.038288] edt_ft5x06 0-0038: Unable to request touchscreen IRQ.
[ 7.076451] edt_ft5x06: probe of 0-0038 failed with error -16
It said the "irq line 8 already requested", but these devices use different IOs as interrupt. And I checked the /proc/interrupts file. The irq line 8 was requested by tsc2007. Now, I am confuse about the stm32gpio irq line. Because that two touchs dts code on other chip platform is works very well.
71: 0 0 stm32-exti-h 19 Edge 5c004000.rtc:wakeup
72: 0 0 stm32-exti-h 68 Edge m4@0
73: 0 0 stm32gpio 8 Edge tsc2007
Solved! Go to Solution.
2019-06-14 02:57 AM
Notice that EXTI can allocate interrupt of only one GPIO pin of same number regardless the GPIO port (see RM abstract below).
So, you cannot define EXTI8 to be from PG8 and PI8 at same time.
You should use another EXTIn channel and another PXn pin for the 2nd interrupt line (with n != 8).
2019-06-14 02:54 AM
The EXTI controller on STM32 can only select one Pin per Pin number. As you need PG8 and PI8, this does not work. Interrupts on PG8 and PG8 will work as will PG8 and PI9.
2019-06-14 02:57 AM
Notice that EXTI can allocate interrupt of only one GPIO pin of same number regardless the GPIO port (see RM abstract below).
So, you cannot define EXTI8 to be from PG8 and PI8 at same time.
You should use another EXTIn channel and another PXn pin for the 2nd interrupt line (with n != 8).