sdhci-spear.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * include/linux/mmc/sdhci-spear.h
  3. *
  4. * SDHCI declarations specific to ST SPEAr platform
  5. *
  6. * Copyright (C) 2010 ST Microelectronics
  7. * Viresh Kumar<viresh.kumar@st.com>
  8. *
  9. * This file is licensed under the terms of the GNU General Public
  10. * License version 2. This program is licensed "as is" without any
  11. * warranty of any kind, whether express or implied.
  12. */
  13. #ifndef MMC_SDHCI_SPEAR_H
  14. #define MMC_SDHCI_SPEAR_H
  15. #include <linux/platform_device.h>
  16. /*
  17. * struct sdhci_plat_data: spear sdhci platform data structure
  18. *
  19. * @card_power_gpio: gpio pin for enabling/disabling power to sdhci socket
  20. * @power_active_high: if set, enable power to sdhci socket by setting
  21. * card_power_gpio
  22. * @power_always_enb: If set, then enable power on probe, otherwise enable only
  23. * on card insertion and disable on card removal.
  24. * card_int_gpio: gpio pin used for card detection
  25. */
  26. struct sdhci_plat_data {
  27. int card_power_gpio;
  28. int power_active_high;
  29. int power_always_enb;
  30. int card_int_gpio;
  31. };
  32. /* This function is used to set platform_data field of pdev->dev */
  33. static inline void
  34. sdhci_set_plat_data(struct platform_device *pdev, struct sdhci_plat_data *data)
  35. {
  36. pdev->dev.platform_data = data;
  37. }
  38. #endif /* MMC_SDHCI_SPEAR_H */