diff options
author | Mike Rapoport <mike@compulab.co.il> | 2009-02-03 02:04:20 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-09 15:03:48 -0500 |
commit | 0c2bec96945ccfc4a58a88d73531e392972ba6c5 (patch) | |
tree | c3bfabe4cc063031e0a647f519499d9053099ec0 /include/linux/spi | |
parent | d43e87868f67c5b52defd8d82bc3f54347ed2408 (diff) |
libertas: if_spi: add ability to call board specific setup/teardown methods
In certain cases it is required to perform board specific actions
before activating libertas G-SPI interface. These actions may include
power up of the chip, GPIOs setup, proper pin-strapping and SPI
controller config.
This patch adds ability to call board specific setup/teardown methods
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Andrey Yurovsky <andrey@cozybit.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux/spi')
-rw-r--r-- | include/linux/spi/libertas_spi.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/spi/libertas_spi.h b/include/linux/spi/libertas_spi.h index ada71b4f3788..79506f5f9e67 100644 --- a/include/linux/spi/libertas_spi.h +++ b/include/linux/spi/libertas_spi.h | |||
@@ -10,6 +10,9 @@ | |||
10 | */ | 10 | */ |
11 | #ifndef _LIBERTAS_SPI_H_ | 11 | #ifndef _LIBERTAS_SPI_H_ |
12 | #define _LIBERTAS_SPI_H_ | 12 | #define _LIBERTAS_SPI_H_ |
13 | |||
14 | struct spi_device; | ||
15 | |||
13 | struct libertas_spi_platform_data { | 16 | struct libertas_spi_platform_data { |
14 | /* There are two ways to read data from the WLAN module's SPI | 17 | /* There are two ways to read data from the WLAN module's SPI |
15 | * interface. Setting 0 or 1 here controls which one is used. | 18 | * interface. Setting 0 or 1 here controls which one is used. |
@@ -21,5 +24,9 @@ struct libertas_spi_platform_data { | |||
21 | 24 | ||
22 | /* GPIO number to use as chip select */ | 25 | /* GPIO number to use as chip select */ |
23 | u16 gpio_cs; | 26 | u16 gpio_cs; |
27 | |||
28 | /* Board specific setup/teardown */ | ||
29 | int (*setup)(struct spi_device *spi); | ||
30 | int (*teardown)(struct spi_device *spi); | ||
24 | }; | 31 | }; |
25 | #endif | 32 | #endif |