Activating interrupt in device tree

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Activating interrupt in device tree

1,289 Views
arisav
Contributor III

We have attached ar1021 i2c touch controller to our product which uses Kontron SMARC Soc. How can I define it in device tree?

ar1021 i2c touch controller's interrupt line is connected to the pin P109 which is defined in 'SMARC sMAX6i' manual as

Pin
Signal
Direction
Termination
Type/tol
Controller
Controller PIn name
Port dl
Port solo
iomux instance
P109GPIO1 / CAM1_PWR#Bi-DirPU-470kCMOS / VDD_IOiMX6EIM_DA1GPIO3_IO01GPIO3_IO01ALT5 / ALT5

I have tried define ar1021 in device tree as below. Driver loads proberly but interrupt callback function is never called.

&i2c3

{

  

status = "okay";

ar1021@4D {

compatible = "microchip,ar1021-i2c";

reg = <0x4D>;

interrupt-parent = <&gpio3>;

interrupts = <1 IRQ_TYPE_EDGE_FALLING>;

wakeup-gpios = <&gpio3 1 IRQ_TYPE_LEVEL_HIGH>;

      

};

};

Problem seems to be that interrupt for PIN P109 is not defined correctly. Any ideas?

Labels (2)
0 Kudos
2 Replies

737 Views
igorpadykov
NXP Employee
NXP Employee

Hi Ari

please look at similar example for eGalax touch controller

http://lists.infradead.org/pipermail/linux-arm-kernel/2012-August/113944.html

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

737 Views
arisav
Contributor III

Thanks

I will try that.

Ari

0 Kudos