GPIO interrupt on i.MX6

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

GPIO interrupt on i.MX6

Jump to solution
11,673 Views
nluca
Contributor III

Hi,

I'm trying to configure an interrupt on a GPIO of my board i.MX6, in order to toggle another GPIO once the first has changed its value (this is the first stage of a more complicated project). I want to build a module and insert it on the running kernel. Attached is the source code and the Makefile I'm using to compile it. I'm actually able to compile the source code in a linux x86 system, but once I try to insert it on the i.MX6 environment (using insmod), I get these errors:

 

luca_gpio: Unknown symbol gpio_free (err 0)

luca_gpio: Unknown symbol __gpio_to_irq (err 0)

luca_gpio: Unknown symbol gpio_direction_output (err 0)

luca_gpio: Unknown symbol __gpio_set_value (err 0)

luca_gpio: Unknown symbol gpio_request (err 0)

 

Could anyone give me any suggestion to solve this issue, please?

 

Thanks a lot,

Luca

Original Attachment has been moved to: sources.zip

Labels (2)
1 Solution
5,506 Views
nluca
Contributor III

Hi Igor,

Thanks for your support. Actually my original code was almost fine, I only missed to include the GPL licence.

Best regards,

Luca

View solution in original post

0 Kudos
Reply
7 Replies
5,506 Views
phaniteja
Contributor II

Hello Luca,

I am trying to configure a GPIO pin and registered the ISR, (For more details please refer 474144). I have successfully registerd interrupt but my ISR is not getting hit.

Could you please share the DTS changes you have done and also updated source code, so that it will be helpful for us to resolve this issue.

Thanks,

Phani Movva

0 Kudos
Reply
5,507 Views
nluca
Contributor III

Hi Igor,

Thanks for your suggestions.

Actually I've already looked at the references you suggested and they have been very helpful as a start point. However, the method explained is working in polling mode and in user space: this means I'm not able to take a real-time action based on the state change of the input pin (e.g. change the state of another output pin). That's why I was asking about interrupts and kernel space modules. Any suggestion/explanation on how to achieve this?

Thanks guys,

Luca

0 Kudos
Reply
5,507 Views
igorpadykov
NXP Employee
NXP Employee

Hi Luca

one can look at sect.3.2.4 Interrupt Source Code Structure

attached Linux Manual.

Best regards

igor

0 Kudos
Reply
5,507 Views
nluca
Contributor III

Hi Igor,

Thanks for your suggestions. This is very interesting and a good starting point !

Just after having read the first pages, one more question is how to get all the starting point SW. I can download the 3.10.53 Linux kernel, but what about the BSP? And how should I combine the two software packages to get the full features OS for my i.MX6 Solo board? And what about the RFS?

Thanks a lot,

Luca

0 Kudos
Reply
5,507 Views
igorpadykov
NXP Employee
NXP Employee

Hi Luca

for SW starting point suggest to start with

https://community.freescale.com/docs/DOC-1616

Best regards

igor

0 Kudos
Reply
5,507 Views
nluca
Contributor III

Hi Igor,

Thanks for your support. Actually my original code was almost fine, I only missed to include the GPL licence.

Best regards,

Luca

0 Kudos
Reply