aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2011-12-25 20:40:03 -0500
committerChris Ball <cjb@laptop.org>2012-01-11 23:58:45 -0500
commitb67e198073b2d2f16572f5fa77553fec14775f69 (patch)
treeb6496468a572a1bbe21b9ae5141b74be2ec42057 /include/linux/mmc
parentcbb18b309d3d6b6661f931279697eac77b6591c9 (diff)
mmc: add a card hotplug handler context
SD/MMC controllers provide different card insertion and removal detection methods. On some of them the controller itself issues an interrupt, on others polling is used, on yet others auxiliary means are used for this purpose, e.g., a GPIO IRQ. Further, on some systems one of those methods can be chosen at driver probing time and configured in software. E.g., on some systems the SD/MMC controller card hot-plug detection pin can be configured either as a respective controller functions, or an IRQ-capable GPIO. To support such flexible configurations a card hot-plug context is added by this patch. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r--include/linux/mmc/host.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 9a03d0335745..742f0e102e1e 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -167,6 +167,11 @@ struct mmc_async_req {
167 int (*err_check) (struct mmc_card *, struct mmc_async_req *); 167 int (*err_check) (struct mmc_card *, struct mmc_async_req *);
168}; 168};
169 169
170struct mmc_hotplug {
171 unsigned int irq;
172 void *handler_priv;
173};
174
170struct mmc_host { 175struct mmc_host {
171 struct device *parent; 176 struct device *parent;
172 struct device class_dev; 177 struct device class_dev;
@@ -300,6 +305,7 @@ struct mmc_host {
300 305
301 struct delayed_work detect; 306 struct delayed_work detect;
302 int detect_change; /* card detect flag */ 307 int detect_change; /* card detect flag */
308 struct mmc_hotplug hotplug;
303 309
304 const struct mmc_bus_ops *bus_ops; /* current bus driver */ 310 const struct mmc_bus_ops *bus_ops; /* current bus driver */
305 unsigned int bus_refs; /* reference counter */ 311 unsigned int bus_refs; /* reference counter */