mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Adding new GPIO device/driver to Barebox
       [not found] <CE7ACB03.8CDD%ivor@veriline.co.za>
@ 2013-10-09 16:01 ` Ivor Kruger
  0 siblings, 0 replies; only message in thread
From: Ivor Kruger @ 2013-10-09 16:01 UTC (permalink / raw)
  To: barebox

I wish to add a new device to barebox (in fact, quite a few but lets just
look at one). I am a newbie to barebox but very comfortable with C.

The device is a TCA9555 GPIO expander on the I2C bus. The device is
probably covered by the linux driver gpio_pca953x.c so I will go ahead and
just add the pca953x device/driver pair or now. I am trying to sort out
the process of adding a driver at the moment and not so much the exact
details of the device/driver.

So the steps I took to do this was:

1. Copy the gpio_pca953x.c file to the barebox driver/gpio directory
2. Copy the pca953x.h file to the barebox include directory.
3. I then edited the .c file to fall in line with the barebox format
(looked at some other files as examples)
4. I edited the kConfig in the barebox/drivers/gpio directory to add the
option to select this device
5. I edited the makefile to include this file.
6. Changed the board.c file to load this device on the i2c bus

Then I used "ptxdist menuconfig barebox" to enable this device which is
now listed in the menu under drivers/config as expected.
Did the "ptxdist go" and checked the output BUT the file is not compiled.
I sort of expected it to try and compile and possible give a load of
errorsŠ.but it did not even try to compile.

Clearly I am missing a step that is so obvious that it is not mentioned
anywhere.

Can someone please point me in the right direction?

Thanks in advance






_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-10-09 21:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CE7ACB03.8CDD%ivor@veriline.co.za>
2013-10-09 16:01 ` Adding new GPIO device/driver to Barebox Ivor Kruger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox