[PATCH] Add GPIO, I2C and SPI support for the RPi BSP

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Dec 16 09:38:04 UTC 2014


Hello Alan,

On 15/12/14 21:19, Alan Cudmore wrote:
> Is the ARM Zync BSP using the new i2c API?

yes, see file cadence-i2c.c and the functions mentioned by Chris.

> I was looking through the BSP and did not see how it is initialized.
>
> Also, the current libi2c supports SPI. Does anyone see a problem with 
> using libi2c for SPI and the new i2c API for i2c?

I think we need also something similar for SPI which is also message 
based, e.g.

struct spi_msg {
     uint16_t chip_select;
     uint16_t len;
     uint32_t bit_rate;
     uint32_t flags;
     const uint8_t *out;
     uint8_t *in;
};

This makes it easier to support sophisticated SPI modules like the 
Freescale DSPI.

>
> Finally, will new i2c drivers go in libchip, or in cpukit/dev ?

The I2C device drivers (devices connected via the I2C bus) should go 
into cpukit/dev and should have a test case in testsuites/libtests/i2c01.

The I2C bud drivers should be as general as possible.  Unfortunately we 
don't have a bus space abstraction yet, so I still placed the first I2C 
bus driver into the BSP.  This is not the right location in the long run.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list