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

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

Version: ~ [ linux-5.2 ] ~ [ linux-5.1.16 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.57 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.132 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.184 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.184 ] ~ [ 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.69 ] ~ [ 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.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ 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/spi/spi.h>
  5 #include <linux/interrupt.h>
  6 
  7 struct device;
  8 struct mmc_host;
  9 
 10 #define MMC_SPI_USE_CD_GPIO                     (1 << 0)
 11 #define MMC_SPI_USE_RO_GPIO                     (1 << 1)
 12 #define MMC_SPI_CD_GPIO_ACTIVE_LOW              (1 << 2)
 13 #define MMC_SPI_RO_GPIO_ACTIVE_LOW              (1 << 3)
 14 
 15 /* Put this in platform_data of a device being used to manage an MMC/SD
 16  * card slot.  (Modeled after PXA mmc glue; see that for usage examples.)
 17  *
 18  * REVISIT This is not a spi-specific notion.  Any card slot should be
 19  * able to handle it.  If the MMC core doesn't adopt this kind of notion,
 20  * switch the "struct device *" parameters over to "struct spi_device *".
 21  */
 22 struct mmc_spi_platform_data {
 23         /* driver activation and (optional) card detect irq hookup */
 24         int (*init)(struct device *,
 25                 irqreturn_t (*)(int, void *),
 26                 void *);
 27         void (*exit)(struct device *, void *);
 28 
 29         /*
 30          * Card Detect and Read Only GPIOs. To enable debouncing on the card
 31          * detect GPIO, set the cd_debounce to the debounce time in
 32          * microseconds.
 33          */
 34         unsigned int flags;
 35         unsigned int cd_gpio;
 36         unsigned int cd_debounce;
 37         unsigned int ro_gpio;
 38 
 39         /* Capabilities to pass into mmc core (e.g. MMC_CAP_NEEDS_POLL). */
 40         unsigned long caps;
 41         unsigned long caps2;
 42 
 43         /* how long to debounce card detect, in msecs */
 44         u16 detect_delay;
 45 
 46         /* power management */
 47         u16 powerup_msecs;              /* delay of up to 250 msec */
 48         u32 ocr_mask;                   /* available voltages */
 49         void (*setpower)(struct device *, unsigned int maskval);
 50 };
 51 
 52 #ifdef CONFIG_OF
 53 extern struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi);
 54 extern void mmc_spi_put_pdata(struct spi_device *spi);
 55 #else
 56 static inline struct mmc_spi_platform_data *
 57 mmc_spi_get_pdata(struct spi_device *spi)
 58 {
 59         return spi->dev.platform_data;
 60 }
 61 static inline void mmc_spi_put_pdata(struct spi_device *spi) {}
 62 #endif /* CONFIG_OF */
 63 
 64 #endif /* __LINUX_SPI_MMC_SPI_H */
 65 

~ [ 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