Using GPIO?

May 14, 2004 6 Replies

Hi there,



Can't anybody point me in the right direction regarding usage of GPIO ports under Linux? I'm running on a PPC405EP, and when the kernel initialises, I get the messages:



IBM gpio driver version 07.25.02 GPIO #0 at 0xc3070700



Hence the "ibm_ocp_gpio.c"/"ibm_gpio_miscdev" module gets loaded. However, I then though the GPIO would be available through a "/dev/gpio"-device, but this does not exist.



How to get any further?



Regards, Martin Egholm



Which version of the kernel are you using, and where did you get it?

You should probably ask this question at

formatting link
after reviewing the archives there.

- Dan

I heard from a friend that since it is an misc-device, it should have major number 10, and the driver states a minor number 185, so now I should be able to create the device myself... I will get back with the result...

Kernel 2.4.21 from ELDK (as far as I recall). I haven't compiled a new one myself - yet!

// Martin

Hi, there - again...

Is there a news-group associated with that mailing-list, as well? I'd prefer that...

// Martin

There's a gateway between that list and nntp://news.gmane.org/gmane.linux.ports.ppc.embedded

See

formatting link
for how posts are authorized (I find that site confusing and hard to read, so be prepared to dig a bit).

- Dan

My technical stuff: http://kegel.com My politics: see http://www.misleader.org for examples of why I'm for regime change

There's a gateway between that list and nntp://news.gmane.org/gmane.linux.ports.ppc.embedded

See

formatting link
for how posts are authorized (I find that site confusing and hard to read, so be prepared to dig a bit).

- Dan

My technical stuff: http://kegel.com My politics: see http://www.misleader.org for examples of why I'm for regime change

And that worked! :-) I just created the device myself opened it, and inspired by the "gpio_test" test-application I'm now able to control a couple of attached LEDs and register user-input. However, I need to poll the input-ports in order to get the event at the moment. The next step is to lure how to register an interrupt-mechanism handling this...

Thanks for all your help so far, Martin

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required