summaryrefslogtreecommitdiffstats
path: root/include/linux/spi
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@ru.mvista.com>2008-06-17 18:17:21 +0400
committerPierre Ossman <drzeus@drzeus.cx>2008-07-15 14:14:41 +0200
commit619ef4b42128709de4d89d209b2c874f560deecd (patch)
tree9c813630ed396b5efb590303c84a1f2935502ca7 /include/linux/spi
parent28f52482b41edc88cdf575aa6ed414c6e116ce10 (diff)
downloadop-kernel-dev-619ef4b42128709de4d89d209b2c874f560deecd.zip
op-kernel-dev-619ef4b42128709de4d89d209b2c874f560deecd.tar.gz
mmc_spi: add support for card-detection polling
This patch adds new platform data variable "caps", so platforms could pass theirs capabilities into MMC core (for example, platforms without interrupt on the CD line will most probably want to pass MMC_CAP_NEEDS_POLL). New platform get_cd() callback provided to optimize polling. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'include/linux/spi')
-rw-r--r--include/linux/spi/mmc_spi.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/spi/mmc_spi.h b/include/linux/spi/mmc_spi.h
index d5ca78b..a3626ae 100644
--- a/include/linux/spi/mmc_spi.h
+++ b/include/linux/spi/mmc_spi.h
@@ -23,6 +23,15 @@ struct mmc_spi_platform_data {
/* sense switch on sd cards */
int (*get_ro)(struct device *);
+ /*
+ * If board does not use CD interrupts, driver can optimize polling
+ * using this function.
+ */
+ int (*get_cd)(struct device *);
+
+ /* Capabilities to pass into mmc core (e.g. MMC_CAP_NEEDS_POLL). */
+ unsigned long caps;
+
/* how long to debounce card detect, in msecs */
u16 detect_delay;
OpenPOWER on IntegriCloud