mmc_spi.h 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. #ifndef __LINUX_SPI_MMC_SPI_H
  2. #define __LINUX_SPI_MMC_SPI_H
  3. struct device;
  4. struct mmc_host;
  5. /* Put this in platform_data of a device being used to manage an MMC/SD
  6. * card slot. (Modeled after PXA mmc glue; see that for usage examples.)
  7. *
  8. * REVISIT This is not a spi-specific notion. Any card slot should be
  9. * able to handle it. If the MMC core doesn't adopt this kind of notion,
  10. * switch the "struct device *" parameters over to "struct spi_device *".
  11. */
  12. struct mmc_spi_platform_data {
  13. /* driver activation and (optional) card detect irq hookup */
  14. int (*init)(struct device *,
  15. irqreturn_t (*)(int, void *),
  16. void *);
  17. void (*exit)(struct device *, void *);
  18. /* sense switch on sd cards */
  19. int (*get_ro)(struct device *);
  20. /* how long to debounce card detect, in msecs */
  21. u16 detect_delay;
  22. /* power management */
  23. u16 powerup_msecs; /* delay of up to 250 msec */
  24. u32 ocr_mask; /* available voltages */
  25. void (*setpower)(struct device *, unsigned int maskval);
  26. };
  27. #endif /* __LINUX_SPI_MMC_SPI_H */