Solomon Peachy | a910e4a | 2013-05-24 20:04:38 -0400 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) ST-Ericsson SA 2011 |
| 3 | * |
| 4 | * Author: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> |
| 5 | * License terms: GNU General Public License (GPL) version 2 |
| 6 | */ |
| 7 | |
| 8 | #ifndef CW1200_PLAT_H_INCLUDED |
| 9 | #define CW1200_PLAT_H_INCLUDED |
| 10 | |
| 11 | struct cw1200_platform_data_spi { |
| 12 | u8 spi_bits_per_word; /* REQUIRED */ |
| 13 | u16 ref_clk; /* REQUIRED (in KHz) */ |
| 14 | |
| 15 | /* All others are optional */ |
| 16 | bool have_5ghz; |
| 17 | const struct resource *reset; /* GPIO to RSTn signal */ |
| 18 | const struct resource *powerup; /* GPIO to POWERUP signal */ |
| 19 | int (*power_ctrl)(const struct cw1200_platform_data_spi *pdata, |
| 20 | bool enable); /* Control 3v3 / 1v8 supply */ |
| 21 | int (*clk_ctrl)(const struct cw1200_platform_data_spi *pdata, |
| 22 | bool enable); /* Control CLK32K */ |
| 23 | const u8 *macaddr; /* if NULL, use cw1200_mac_template module parameter */ |
| 24 | const char *sdd_file; /* if NULL, will use default for detected hw type */ |
| 25 | }; |
| 26 | |
| 27 | struct cw1200_platform_data_sdio { |
| 28 | u16 ref_clk; /* REQUIRED (in KHz) */ |
| 29 | |
| 30 | /* All others are optional */ |
| 31 | const struct resource *irq; /* if using GPIO for IRQ */ |
| 32 | bool have_5ghz; |
| 33 | bool no_nptb; /* SDIO hardware does not support non-power-of-2-blocksizes */ |
| 34 | const struct resource *reset; /* GPIO to RSTn signal */ |
| 35 | const struct resource *powerup; /* GPIO to POWERUP signal */ |
| 36 | int (*power_ctrl)(const struct cw1200_platform_data_sdio *pdata, |
| 37 | bool enable); /* Control 3v3 / 1v8 supply */ |
| 38 | int (*clk_ctrl)(const struct cw1200_platform_data_sdio *pdata, |
| 39 | bool enable); /* Control CLK32K */ |
| 40 | const u8 *macaddr; /* if NULL, use cw1200_mac_template module parameter */ |
| 41 | const char *sdd_file; /* if NULL, will use default for detected hw type */ |
| 42 | }; |
| 43 | |
| 44 | const void *cw1200_get_platform_data(void); |
| 45 | |
| 46 | #endif /* CW1200_PLAT_H_INCLUDED */ |