aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/spi/spi.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/spi/spi.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'include/linux/spi/spi.h')
-rw-r--r--include/linux/spi/spi.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 92e52a1e6af3..bb4f5fbbbd8e 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -204,6 +204,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
204/** 204/**
205 * struct spi_master - interface to SPI master controller 205 * struct spi_master - interface to SPI master controller
206 * @dev: device interface to this driver 206 * @dev: device interface to this driver
207 * @list: link with the global spi_master list
207 * @bus_num: board-specific (and often SOC-specific) identifier for a 208 * @bus_num: board-specific (and often SOC-specific) identifier for a
208 * given SPI controller. 209 * given SPI controller.
209 * @num_chipselect: chipselects are used to distinguish individual 210 * @num_chipselect: chipselects are used to distinguish individual
@@ -238,6 +239,8 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
238struct spi_master { 239struct spi_master {
239 struct device dev; 240 struct device dev;
240 241
242 struct list_head list;
243
241 /* other than negative (== assign one dynamically), bus_num is fully 244 /* other than negative (== assign one dynamically), bus_num is fully
242 * board-specific. usually that simplifies to being SOC-specific. 245 * board-specific. usually that simplifies to being SOC-specific.
243 * example: one SOC has three SPI controllers, numbered 0..2, 246 * example: one SOC has three SPI controllers, numbered 0..2,
@@ -578,7 +581,7 @@ extern int spi_bus_unlock(struct spi_master *master);
578 * Callable only from contexts that can sleep. 581 * Callable only from contexts that can sleep.
579 */ 582 */
580static inline int 583static inline int
581spi_write(struct spi_device *spi, const u8 *buf, size_t len) 584spi_write(struct spi_device *spi, const void *buf, size_t len)
582{ 585{
583 struct spi_transfer t = { 586 struct spi_transfer t = {
584 .tx_buf = buf, 587 .tx_buf = buf,
@@ -602,7 +605,7 @@ spi_write(struct spi_device *spi, const u8 *buf, size_t len)
602 * Callable only from contexts that can sleep. 605 * Callable only from contexts that can sleep.
603 */ 606 */
604static inline int 607static inline int
605spi_read(struct spi_device *spi, u8 *buf, size_t len) 608spi_read(struct spi_device *spi, void *buf, size_t len)
606{ 609{
607 struct spi_transfer t = { 610 struct spi_transfer t = {
608 .rx_buf = buf, 611 .rx_buf = buf,
@@ -617,8 +620,8 @@ spi_read(struct spi_device *spi, u8 *buf, size_t len)
617 620
618/* this copies txbuf and rxbuf data; for small transfers only! */ 621/* this copies txbuf and rxbuf data; for small transfers only! */
619extern int spi_write_then_read(struct spi_device *spi, 622extern int spi_write_then_read(struct spi_device *spi,
620 const u8 *txbuf, unsigned n_tx, 623 const void *txbuf, unsigned n_tx,
621 u8 *rxbuf, unsigned n_rx); 624 void *rxbuf, unsigned n_rx);
622 625
623/** 626/**
624 * spi_w8r8 - SPI synchronous 8 bit write followed by 8 bit read 627 * spi_w8r8 - SPI synchronous 8 bit write followed by 8 bit read