help: debug board interfacing

Werner Almesberger werner at openmoko.org
Mon Jan 5 04:11:44 CET 2009


[ I hope you don't mind if I copy the "devel" list where this discussion
  started. Chances are that others are interested in this as well, and
  this gives them a chance to read it or to find the topic with a search
  engine. ]

Sreeraj a wrote:
> you guessed right. I want my neo -> debugBoard to do some I/O.  i guess i
> can use the  I2C pins for that.

That depends on whether you want to use them to connect I2C devices
or just as "dumb" GPIO. Inside the Neo, the I2C signals are used to
talk to the PMU and the audio codec. So if you use them as plain
GPIO, you'll affect (i.e., break) other subsystems.

SPI and EINT3 are better choices because they don't interfere with
functionality actively used inside the phone.

> Is there an existing kernel driver(in neo) for using the I2C pins?
> can i get some pointers where to start the coding ?

If connecting I2C devices, you can just use the I2C driver. An
application that uses the kernel I2C API can be found here:
http://svn.openmoko.org/developers/werner/pmu/

If you just want "dumb" GPIO, you can use the "gpio" program as a
basis:
http://svn.openmoko.org/trunk/src/target/gpio/

- Werner



More information about the devel mailing list