~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/spi/mmc_spi.h

Version: ~ [ linux-5.4-rc3 ] ~ [ linux-5.3.6 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.79 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.149 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.196 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.196 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.75 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef __LINUX_SPI_MMC_SPI_H
  2 #define __LINUX_SPI_MMC_SPI_H
  3 
  4 #include <linux/device.h>
  5 #include <linux/spi/spi.h>
  6 #include <linux/interrupt.h>
  7 
  8 struct mmc_host;
  9 
 10 /* Put this in platform_data of a device being used to manage an MMC/SD
 11  * card slot.  (Modeled after PXA mmc glue; see that for usage examples.)
 12  *
 13  * REVISIT This is not a spi-specific notion.  Any card slot should be
 14  * able to handle it.  If the MMC core doesn't adopt this kind of notion,
 15  * switch the "struct device *" parameters over to "struct spi_device *".
 16  */
 17 struct mmc_spi_platform_data {
 18         /* driver activation and (optional) card detect irq hookup */
 19         int (*init)(struct device *,
 20                 irqreturn_t (*)(int, void *),
 21                 void *);
 22         void (*exit)(struct device *, void *);
 23 
 24         /* sense switch on sd cards */
 25         int (*get_ro)(struct device *);
 26 
 27         /*
 28          * If board does not use CD interrupts, driver can optimize polling
 29          * using this function.
 30          */
 31         int (*get_cd)(struct device *);
 32 
 33         /* Capabilities to pass into mmc core (e.g. MMC_CAP_NEEDS_POLL). */
 34         unsigned long caps;
 35 
 36         /* how long to debounce card detect, in msecs */
 37         u16 detect_delay;
 38 
 39         /* power management */
 40         u16 powerup_msecs;              /* delay of up to 250 msec */
 41         u32 ocr_mask;                   /* available voltages */
 42         void (*setpower)(struct device *, unsigned int maskval);
 43 };
 44 
 45 #ifdef CONFIG_OF
 46 extern struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi);
 47 extern void mmc_spi_put_pdata(struct spi_device *spi);
 48 #else
 49 static inline struct mmc_spi_platform_data *
 50 mmc_spi_get_pdata(struct spi_device *spi)
 51 {
 52         return spi->dev.platform_data;
 53 }
 54 static inline void mmc_spi_put_pdata(struct spi_device *spi) {}
 55 #endif /* CONFIG_OF */
 56 
 57 #endif /* __LINUX_SPI_MMC_SPI_H */
 58 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp