GPIO under Embedded Linux

Status
Not open for further replies.

ubuntu_amateur

Member level 4
Joined
Sep 24, 2006
Messages
71
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,665
to use GPIO, the GPIO controll register is needed to be set.
under Embedded Linux, should GPIO be mapped to PCI I/O space?
which IRQ should be arranged to it?
is there only load the driver of GPIO?

How can I use GPIO under Embedded Linux?
Anybody could provide some documents or tips?
 

I'm not really sure either, however, IIRC ARM maps "everything" to its memory space (memory-mapped I/O). Therefore, mmap() -- kernel mode function -- might help you. I think this function should be supported on embedded linux as well.
 

if used 0xcf8 and 0xcfc, GPIO can be setup, read and write.

but, how to arrange a IRQ to GPIO under Embedded Linux?
 

Hi,

You should read platform document for understand the memory map.
If you use an SCO with ARM core as a microprocessor, like Ti OMPA 1710, you should read the OMAP 1710 datasheet. In the datasheet, it will point out the GPIO memory address.

In the datasheet, GPIO will be mapped to the memory space of ARM memory space rather than PCI I/O space.
 

u have request the kernel for specific irq.
use following kernel API:
request_irq()
 

just write or read the registers to control gpio,it is very simple
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…