summaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data/mmc-s3cmci.h
diff options
context:
space:
mode:
authorOlof Johansson2012-09-22 09:22:33 +0200
committerOlof Johansson2012-09-22 10:07:21 +0200
commite3a66aa33a8f06924f67770e15c22a5c52df314e (patch)
treefb8786f1300bdce8f6fc7462e3fd5699e057dd24 /include/linux/platform_data/mmc-s3cmci.h
parentARM: msm: Move core.h contents into common.h (diff)
parentARM: spear: move platform_data definitions (diff)
downloadkernel-qcow2-linux-e3a66aa33a8f06924f67770e15c22a5c52df314e.tar.gz
kernel-qcow2-linux-e3a66aa33a8f06924f67770e15c22a5c52df314e.tar.xz
kernel-qcow2-linux-e3a66aa33a8f06924f67770e15c22a5c52df314e.zip
Merge branch 'multiplatform/platform-data' into next/multiplatform
* multiplatform/platform-data: ARM: spear: move platform_data definitions ARM: samsung: move platform_data definitions ARM: orion: move platform_data definitions ARM: nomadik: move platform_data definitions ARM: w90x900: move platform_data definitions ARM: vt8500: move platform_data definitions ARM: tegra: move sdhci platform_data definition ARM: sa1100: move platform_data definitions ARM: pxa: move platform_data definitions ARM: netx: move platform_data definitions ARM: msm: move platform_data definitions ARM: imx: move platform_data definitions ARM: ep93xx: move platform_data definitions ARM: davinci: move platform_data definitions ARM: at91: move platform_data definitions Conflicts due to removed files: arch/arm/mach-tegra/board-harmony.c arch/arm/mach-tegra/board-trimslice.c Conflicts due to code removal: arch/arm/mach-tegra/board-paz00.c Context conflicts in: drivers/mmc/host/sdhci-tegra.c drivers/net/irda/pxaficp_ir.c Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'include/linux/platform_data/mmc-s3cmci.h')
-rw-r--r--include/linux/platform_data/mmc-s3cmci.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/include/linux/platform_data/mmc-s3cmci.h b/include/linux/platform_data/mmc-s3cmci.h
new file mode 100644
index 000000000000..c42d31711944
--- /dev/null
+++ b/include/linux/platform_data/mmc-s3cmci.h
@@ -0,0 +1,52 @@
+#ifndef _ARCH_MCI_H
+#define _ARCH_MCI_H
+
+/**
+ * struct s3c24xx_mci_pdata - sd/mmc controller platform data
+ * @no_wprotect: Set this to indicate there is no write-protect switch.
+ * @no_detect: Set this if there is no detect switch.
+ * @wprotect_invert: Invert the default sense of the write protect switch.
+ * @detect_invert: Invert the default sense of the write protect switch.
+ * @use_dma: Set to allow the use of DMA.
+ * @gpio_detect: GPIO number for the card detect line.
+ * @gpio_wprotect: GPIO number for the write protect line.
+ * @ocr_avail: The mask of the available power states, non-zero to use.
+ * @set_power: Callback to control the power mode.
+ *
+ * The @gpio_detect is used for card detection when @no_wprotect is unset,
+ * and the default sense is that 0 returned from gpio_get_value() means
+ * that a card is inserted. If @detect_invert is set, then the value from
+ * gpio_get_value() is inverted, which makes 1 mean card inserted.
+ *
+ * The driver will use @gpio_wprotect to signal whether the card is write
+ * protected if @no_wprotect is not set. A 0 returned from gpio_get_value()
+ * means the card is read/write, and 1 means read-only. The @wprotect_invert
+ * will invert the value returned from gpio_get_value().
+ *
+ * Card power is set by @ocr_availa, using MCC_VDD_ constants if it is set
+ * to a non-zero value, otherwise the default of 3.2-3.4V is used.
+ */
+struct s3c24xx_mci_pdata {
+ unsigned int no_wprotect:1;
+ unsigned int no_detect:1;
+ unsigned int wprotect_invert:1;
+ unsigned int detect_invert:1; /* set => detect active high */
+ unsigned int use_dma:1;
+
+ unsigned int gpio_detect;
+ unsigned int gpio_wprotect;
+ unsigned long ocr_avail;
+ void (*set_power)(unsigned char power_mode,
+ unsigned short vdd);
+};
+
+/**
+ * s3c24xx_mci_set_platdata - set platform data for mmc/sdi device
+ * @pdata: The platform data
+ *
+ * Copy the platform data supplied by @pdata so that this can be marked
+ * __initdata.
+ */
+extern void s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata);
+
+#endif /* _ARCH_NCI_H */