aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-06-30 10:29:41 -0400
committerPierre Ossman <drzeus@drzeus.cx>2007-09-23 15:01:33 -0400
commitd1496c39e500857b8949cdb91af24e0eb8aae4d0 (patch)
tree020ef1ee2fefc2000e07d47ff4d7bf3d0a0ebf5e /include/linux/mmc
parent2342f3323c9a76367a1d7f9a35525ee3cb3911df (diff)
sdio: core support for SDIO function interrupt
Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r--include/linux/mmc/host.h4
-rw-r--r--include/linux/mmc/sdio_func.h7
2 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 8e2642ebf02f..00dc1809494c 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -123,6 +123,10 @@ struct mmc_host {
123 unsigned int bus_refs; /* reference counter */ 123 unsigned int bus_refs; /* reference counter */
124 unsigned int bus_dead:1; /* bus has been released */ 124 unsigned int bus_dead:1; /* bus has been released */
125 125
126 unsigned int sdio_irqs;
127 struct task_struct *sdio_irq_thread;
128 atomic_t sdio_irq_thread_abort;
129
126 unsigned long private[0] ____cacheline_aligned; 130 unsigned long private[0] ____cacheline_aligned;
127}; 131};
128 132
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h
index 8106d399c414..a8d268c9c276 100644
--- a/include/linux/mmc/sdio_func.h
+++ b/include/linux/mmc/sdio_func.h
@@ -16,6 +16,9 @@
16#include <linux/mod_devicetable.h> 16#include <linux/mod_devicetable.h>
17 17
18struct mmc_card; 18struct mmc_card;
19struct sdio_func;
20
21typedef void (sdio_irq_handler_t)(struct sdio_func *);
19 22
20/* 23/*
21 * SDIO function CIS tuple (unknown to the core) 24 * SDIO function CIS tuple (unknown to the core)
@@ -33,6 +36,7 @@ struct sdio_func_tuple {
33struct sdio_func { 36struct sdio_func {
34 struct mmc_card *card; /* the card this device belongs to */ 37 struct mmc_card *card; /* the card this device belongs to */
35 struct device dev; /* the device */ 38 struct device dev; /* the device */
39 sdio_irq_handler_t *irq_handler; /* IRQ callback */
36 unsigned int num; /* function number */ 40 unsigned int num; /* function number */
37 41
38 unsigned char class; /* standard interface class */ 42 unsigned char class; /* standard interface class */
@@ -105,6 +109,9 @@ extern void sdio_release_host(struct sdio_func *func);
105extern int sdio_enable_func(struct sdio_func *func); 109extern int sdio_enable_func(struct sdio_func *func);
106extern int sdio_disable_func(struct sdio_func *func); 110extern int sdio_disable_func(struct sdio_func *func);
107 111
112extern int sdio_claim_irq(struct sdio_func *func, sdio_irq_handler_t *handler);
113extern int sdio_release_irq(struct sdio_func *func);
114
108extern unsigned char sdio_readb(struct sdio_func *func, 115extern unsigned char sdio_readb(struct sdio_func *func,
109 unsigned int addr, int *err_ret); 116 unsigned int addr, int *err_ret);
110 117