mmc_spi.h 1.0 KB

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