2 * Copyright (C) ST-Ericsson SA 2011
4 * Author: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
5 * License terms: GNU General Public License (GPL) version 2
8 #ifndef CW1200_PLAT_H_INCLUDED
9 #define CW1200_PLAT_H_INCLUDED
11 struct cw1200_platform_data_spi {
12 u8 spi_bits_per_word; /* REQUIRED */
13 u16 ref_clk; /* REQUIRED (in KHz) */
15 /* All others are optional */
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 */
27 struct cw1200_platform_data_sdio {
28 u16 ref_clk; /* REQUIRED (in KHz) */
30 /* All others are optional */
31 const struct resource *irq; /* if using GPIO for IRQ */
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 */
44 const void *cw1200_get_platform_data(void);
46 #endif /* CW1200_PLAT_H_INCLUDED */