connectTheSignalSlot.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* linux/arch/arm/plat-samsung/include/plat/sdhci.h
  2. *
  3. * Copyright (c) 2011 Samsung Electronics Co., Ltd.
  4. * http://www.samsung.com
  5. *
  6. * Copyright 2008 Openmoko, Inc.
  7. * Copyright 2008 Simtec Electronics
  8. * http://armlinux.simtec.co.uk/
  9. * Ben Dooks <ben@simtec.co.uk>
  10. *
  11. * S3C Platform - SDHCI (HSMMC) platform data definitions
  12. *
  13. * This program is free software; you can redistribute it and/or modify
  14. * it under the terms of the GNU General Public License version 2 as
  15. * published by the Free Software Foundation.
  16. */
  17. #ifndef __PLAT_S3C_SDHCI_H
  18. #define __PLAT_S3C_SDHCI_H __FILE__
  19. #include <plat/devs.h>
  20. struct platform_device;
  21. struct mmc_host;
  22. struct mmc_card;
  23. struct mmc_ios;
  24. enum cd_types {
  25. S3C_SDHCI_CD_INTERNAL, /* use mmc internal CD line */
  26. S3C_SDHCI_CD_EXTERNAL, /* use external callback */
  27. S3C_SDHCI_CD_GPIO, /* use external gpio pin for CD line */
  28. S3C_SDHCI_CD_NONE, /* no CD line, use polling to detect card */
  29. S3C_SDHCI_CD_PERMANENT, /* no CD line, card permanently wired to host */
  30. };
  31. /**
  32. * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI
  33. * @max_width: The maximum number of data bits supported.
  34. * @host_caps: Standard MMC host capabilities bit field.
  35. * @host_caps2: The second standard MMC host capabilities bit field.
  36. * @cd_type: Type of Card Detection method (see cd_types enum above)
  37. * @ext_cd_init: Initialize external card detect subsystem. Called on
  38. * sdhci-s3c driver probe when cd_type == S3C_SDHCI_CD_EXTERNAL.
  39. * notify_func argument is a callback to the sdhci-s3c driver
  40. * that triggers the card detection event. Callback arguments:
  41. * dev is pointer to platform device of the host controller,
  42. * state is new state of the card (0 - removed, 1 - inserted).
  43. * @ext_cd_cleanup: Cleanup external card detect subsystem. Called on
  44. * sdhci-s3c driver remove when cd_type == S3C_SDHCI_CD_EXTERNAL.
  45. * notify_func argument is the same callback as for ext_cd_init.
  46. * @ext_cd_gpio: gpio pin used for external CD line, valid only if
  47. * cd_type == S3C_SDHCI_CD_GPIO
  48. * @ext_cd_gpio_invert: invert values for external CD gpio line
  49. * @cfg_gpio: Configure the GPIO for a specific card bit-width
  50. *
  51. * Initialisation data specific to either the machine or the platform
  52. * for the device driver to use or call-back when configuring gpio or
  53. * card speed information.
  54. */
  55. struct s3c_sdhci_platdata {
  56. unsigned int max_width;
  57. unsigned int host_caps;
  58. unsigned int host_caps2;
  59. unsigned int pm_caps;
  60. enum cd_types cd_type;
  61. int ext_cd_gpio;
  62. bool ext_cd_gpio_invert;
  63. int (*ext_cd_init)(void (*notify_func)(struct platform_device *,
  64. int state));
  65. int (*ext_cd_cleanup)(void (*notify_func)(struct platform_device *,
  66. int state));
  67. void (*cfg_gpio)(struct platform_device *dev, int width);
  68. };
  69. /* s3c_sdhci_set_platdata() - common helper for setting SDHCI platform data
  70. * @pd: The default platform data for this device.