mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ivor Kruger <ivor@veriline.co.za>
To: barebox@lists.infradead.org
Subject: Adding new GPIO device/driver to Barebox
Date: Wed, 09 Oct 2013 09:01:46 -0700	[thread overview]
Message-ID: <CE7ACBD7.8CDF%ivor@veriline.co.za> (raw)
In-Reply-To: <CE7ACB03.8CDD%ivor@veriline.co.za>

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

           reply	other threads:[~2013-10-09 21:14 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CE7ACB03.8CDD%ivor@veriline.co.za>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CE7ACBD7.8CDF%ivor@veriline.co.za \
    --to=ivor@veriline.co.za \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox