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