cw1200_platform.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. #ifndef CW1200_PLAT_H_INCLUDED
  8. #define CW1200_PLAT_H_INCLUDED
  9. struct cw1200_platform_data_spi {
  10. u8 spi_bits_per_word; /* REQUIRED */
  11. u16 ref_clk; /* REQUIRED (in KHz) */
  12. /* All others are optional */
  13. bool have_5ghz;
  14. const struct resource *reset; /* GPIO to RSTn signal */
  15. const struct resource *powerup; /* GPIO to POWERUP signal */
  16. int (*power_ctrl)(const struct cw1200_platform_data_spi *pdata,
  17. bool enable); /* Control 3v3 / 1v8 supply */
  18. int (*clk_ctrl)(const struct cw1200_platform_data_spi *pdata,
  19. bool enable); /* Control CLK32K */
  20. const u8 *macaddr; /* if NULL, use cw1200_mac_template module parameter */
  21. const char *sdd_file; /* if NULL, will use default for detected hw type */
  22. };
  23. struct cw1200_platform_data_sdio {
  24. u16 ref_clk; /* REQUIRED (in KHz) */
  25. /* All others are optional */
  26. const struct resource *irq; /* if using GPIO for IRQ */
  27. bool have_5ghz;
  28. bool no_nptb; /* SDIO hardware does not support non-power-of-2-blocksizes */
  29. const struct resource *reset; /* GPIO to RSTn signal */
  30. const struct resource *powerup; /* GPIO to POWERUP signal */
  31. int (*power_ctrl)(const struct cw1200_platform_data_sdio *pdata,
  32. bool enable); /* Control 3v3 / 1v8 supply */
  33. int (*clk_ctrl)(const struct cw1200_platform_data_sdio *pdata,
  34. bool enable); /* Control CLK32K */
  35. const u8 *macaddr; /* if NULL, use cw1200_mac_template module parameter */
  36. const char *sdd_file; /* if NULL, will use default for detected hw type */
  37. };
  38. const void *cw1200_get_platform_data(void);
  39. #endif /* CW1200_PLAT_H_INCLUDED */