aboutsummaryrefslogtreecommitdiff
path: root/arch/avr32/mach-at32ap/include/mach
diff options
context:
space:
mode:
authorPeter Ma <pma@mediamatech.com>2009-08-27 00:31:47 -0700
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2009-08-27 10:20:58 +0200
commit0708420370db7350b75cbf64b1eb80ad1b2a89df (patch)
tree7dcfc21d595bba183468199fb9565a8afbc3c13d /arch/avr32/mach-at32ap/include/mach
parent3fe6ad6c39834350d74145de855fbffdde02ace4 (diff)
avr32: function for independently setting up SPI slaves
at32ap_spi_setup_slaves() is exposed to allow the addition of SPI slaves to a SPI bus that has already been registered. This is especially useful for add-on cards, which have their own board setup function. at32ap_spi_add_device() has been slightly re-organized, but should be transparent to existing users. So to add a SPI slave, after a SPI bus has already been registered: /* Configure the list of slaves on SPI controller "id" */ at32_spi_setup_slaves(id,spi_board_info,ARRAY_SIZE(spi_board_info)); /* Register the list of slaves */ spi_register_board_info(spi_board_info,ARRAY_SIZE(spi_board_info)); Signed-off-by: Peter Ma <pma@mediamatech.com> [haavard.skinnemoen@atmel.com: trivial whitespace fix] Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Diffstat (limited to 'arch/avr32/mach-at32ap/include/mach')
-rw-r--r--arch/avr32/mach-at32ap/include/mach/board.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h
index ddedb471f33..c7f25bb1d06 100644
--- a/arch/avr32/mach-at32ap/include/mach/board.h
+++ b/arch/avr32/mach-at32ap/include/mach/board.h
@@ -49,6 +49,7 @@ at32_add_device_eth(unsigned int id, struct eth_platform_data *data);
struct spi_board_info;
struct platform_device *
at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n);
+void at32_spi_setup_slaves(unsigned int bus_num, struct spi_board_info *b, unsigned int n);
struct atmel_lcdfb_info;
struct platform_device *