diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2008-03-11 22:13:06 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2008-03-11 22:13:06 +0100 |
commit | 906eea397a2f4378c4cab841fb832211e0414ce9 (patch) | |
tree | c910e8ab4fbd7061f9d594fb181956acf1b919cf /include | |
parent | 5864a49007e36af60b4959c32bf6b66058859dba (diff) | |
download | barebox-906eea397a2f4378c4cab841fb832211e0414ce9.tar.gz barebox-906eea397a2f4378c4cab841fb832211e0414ce9.tar.xz |
beginning of SPI support
Diffstat (limited to 'include')
-rw-r--r-- | include/spi/spi.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/spi/spi.h b/include/spi/spi.h new file mode 100644 index 0000000000..2811efce66 --- /dev/null +++ b/include/spi/spi.h @@ -0,0 +1,35 @@ +#ifndef __INCLUDE_SPI_H +#define __INCLUDE_SPI_H + +struct spi_board_info { + char *name; + int max_speed_hz; + int bus_num; + int chip_select; +}; + +struct spi_master { +}; + +struct spi_transfer { + /* it's ok if tx_buf == rx_buf (right?) + * for MicroWire, one buffer must be null + * buffers must work with dma_*map_single() calls, unless + * spi_message.is_dma_mapped reports a pre-existing mapping + */ + const void *tx_buf; + void *rx_buf; + unsigned len; + + unsigned cs_change:1; + u8 bits_per_word; + u16 delay_usecs; + u32 speed_hz; + + struct list_head transfer_list; +}; + +int spi_register_boardinfo(struct spi_board_info *info, int num); +int spi_register_master(struct spi_master *master); + +#endif /* __INCLUDE_SPI_H */ |