mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
![Solomon Peachy](/assets/img/avatar_default.png)
The only advantage of 'struct resource' is that it lets us assign names as part of the platform data. Unfortunately since we are using platform data, we are already limited to a single instance of each driver, rendering this moot. So, replace the struct resources with ints, resulting in cleaner code. This was based on a suggestion from Arnd Bergmann. Signed-off-by: Solomon Peachy <pizza@shaftnet.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
46 lines
1.8 KiB
C
46 lines
1.8 KiB
C
/*
|
|
* Copyright (C) ST-Ericsson SA 2011
|
|
*
|
|
* Author: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
|
|
* License terms: GNU General Public License (GPL) version 2
|
|
*/
|
|
|
|
#ifndef CW1200_PLAT_H_INCLUDED
|
|
#define CW1200_PLAT_H_INCLUDED
|
|
|
|
struct cw1200_platform_data_spi {
|
|
u8 spi_bits_per_word; /* REQUIRED */
|
|
u16 ref_clk; /* REQUIRED (in KHz) */
|
|
|
|
/* All others are optional */
|
|
bool have_5ghz;
|
|
int reset; /* GPIO to RSTn signal (0 disables) */
|
|
int powerup; /* GPIO to POWERUP signal (0 disables) */
|
|
int (*power_ctrl)(const struct cw1200_platform_data_spi *pdata,
|
|
bool enable); /* Control 3v3 / 1v8 supply */
|
|
int (*clk_ctrl)(const struct cw1200_platform_data_spi *pdata,
|
|
bool enable); /* Control CLK32K */
|
|
const u8 *macaddr; /* if NULL, use cw1200_mac_template module parameter */
|
|
const char *sdd_file; /* if NULL, will use default for detected hw type */
|
|
};
|
|
|
|
struct cw1200_platform_data_sdio {
|
|
u16 ref_clk; /* REQUIRED (in KHz) */
|
|
|
|
/* All others are optional */
|
|
bool have_5ghz;
|
|
bool no_nptb; /* SDIO hardware does not support non-power-of-2-blocksizes */
|
|
int reset; /* GPIO to RSTn signal (0 disables) */
|
|
int powerup; /* GPIO to POWERUP signal (0 disables) */
|
|
int irq; /* IRQ line or 0 to use SDIO IRQ */
|
|
int (*power_ctrl)(const struct cw1200_platform_data_sdio *pdata,
|
|
bool enable); /* Control 3v3 / 1v8 supply */
|
|
int (*clk_ctrl)(const struct cw1200_platform_data_sdio *pdata,
|
|
bool enable); /* Control CLK32K */
|
|
const u8 *macaddr; /* if NULL, use cw1200_mac_template module parameter */
|
|
const char *sdd_file; /* if NULL, will use default for detected hw type */
|
|
};
|
|
|
|
const void *cw1200_get_platform_data(void);
|
|
|
|
#endif /* CW1200_PLAT_H_INCLUDED */
|