How to configure GPIO as interrupt on IMX6Q(Saberlite) board in linux environment

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to configure GPIO as interrupt on IMX6Q(Saberlite) board in linux environment

2,258 次查看
anilghadiya
Contributor II

Hi all,

I want to configure GPIO9 pin as interrupt on my IMX6Q(sabrelite) board. I am using ubantu-oneric-windows(kernel 3.0.35_4.0.0).

What all configurations are required in order to achieve this?? I have connected i2c adapter 2 to my device for which i want to generate a interrupt.

Thanks and Regards,

Anil Patel

标签 (1)
0 项奖励
回复
3 回复数

1,198 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Anil

please look at example below

pad MX6_SABRELITE_CAP_TCH_INT1

#define MX6_SABRELITE_CAP_TCH_INT1    IMX_GPIO_NR(1, 9)

https://github.com/Aptina/i.MX6/blob/master/MT9D115_SOC2031/board-mx6q_sabrelite.c

Best regards

chip

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

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

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

1,198 次查看
anilghadiya
Contributor II

Hi,

We want to use two more GPIOs as interrupt line as our I2C device has three interrupt lines. GPIO_9 is already being used.

How can we configure other pins of IMX6 as interrupt? What all pins are available for this purpose.

Thanks in advance,

Anil Patel

0 项奖励
回复

1,198 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Anil

all pins which can be configured as GPIOs can

generate interrupts, one can check Chapter 4

External Signals and Pin Multiplexing IMX6DQRM

Other pins can be configured as in examples given below.

http://blog.skerpa.com/dschnell/blog/2013/10/27/linux-and-gpio-userspace-interrupts/

https://community.freescale.com/thread/317876

http://stackoverflow.com/questions/20656006/default-config-of-gpios-using-device-tree-freescale-i-mx...

Best regards

chip

0 项奖励
回复