UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor tomams
Visitor
7,563 Views
Registered: ‎11-02-2008

Interrupts, GPIO & External

Hi

 

I try to use GPIO & external interrupts. I do not see in the cat /proc/interrupts. I do see the interrupts in dts file for GPIO but not for external interrupt

 

Please can you let me know how to get them?

 

 

tom

0 Kudos
8 Replies
Xilinx Employee
Xilinx Employee
7,554 Views
Registered: ‎04-23-2008

Re: Interrupts, GPIO & External

Make sure the driver is compiled into the kernel.

In the kernel menu config, set

Device Drivers ->  GPIO Support -> Xilinx GPIO support

 

-Brian

0 Kudos
Xilinx Employee
Xilinx Employee
7,551 Views
Registered: ‎09-10-2008

Re: Interrupts, GPIO & External

The GPIO driver does not support interrupts at this time so you wouldn't see them in proc/interrupts. 

 

The device tree file would have them if you put them into the EDK system as it's a reflection of the EDK system (system.mhs).

 

Thanks.

0 Kudos
Xilinx Employee
Xilinx Employee
7,549 Views
Registered: ‎04-23-2008

Re: Interrupts, GPIO & External

> The GPIO driver does not support interrupts at this time

 

:-(

0 Kudos
Visitor tomams
Visitor
7,544 Views
Registered: ‎11-02-2008

Re: Interrupts, GPIO & External

Hi

 

Thanks. What about the external interrupt signal directly connected to the interrupt controller. How do I access/see on the linux.?

 

 

0 Kudos
Xilinx Employee
Xilinx Employee
7,540 Views
Registered: ‎09-10-2008

Re: Interrupts, GPIO & External

You would need to hook into the interrrupt system like done in drivers. 

 

You might be able to do some kind of user mode driver as I think they can use interrupts.   I don't know much about what kind of performance to expect there,  but I would expect it to be slow.

0 Kudos
Xilinx Employee
Xilinx Employee
7,539 Views
Registered: ‎09-10-2008

Re: Interrupts, GPIO & External

What's your application so that we better understand your requirements for the future?
0 Kudos
Xilinx Employee
Xilinx Employee
7,536 Views
Registered: ‎04-23-2008

Re: Interrupts, GPIO & External

Tom,

Whether or not a device uses interrupts is essentially opaque to the user application that uses the driver. For example,

a read on the device could either return the most recently read value which was read by the driver at the last interrupt, or, it could just go and read from the device on the spot.  A select could poll in user space for a change in value, or poll in the kernel for a change in value, or put the process to sleep until the next device interrupt.  The ways to implement the driver are very numerous (off the top of my head, I don't know what choices this particular driver did make. The application could be written the same regardless of whether the driver uses interrupts or not.

 

To re-architect the driver to use interrupts rather than polling won't be a 10 minue job, so I'd really only seriously consider it if you are planning on using GPIO as some sort of input data bus and have some throughput needs to achieve.

 

You can read up on some of this drivers usage details here:

http://xilinx.wikidot.com/osl-gpio-driver

 

-Brian

 

0 Kudos
Visitor tomams
Visitor
7,533 Views
Registered: ‎11-02-2008

Re: Interrupts, GPIO & External

Hi

 

Thanks for your responses. This is actually the continuation of the touch screen issue. I need to use interrupt for pen_irq. I can use it thro GPIO or directly connect to the interrupt contoller. 

 

I have been using stand alone system for long time. Now, I am switching all my systems to linux based. I have many devices(pcores) which use interrupt. 

 

tom

0 Kudos