From b67e198073b2d2f16572f5fa77553fec14775f69 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Sun, 25 Dec 2011 20:40:03 -0500 Subject: 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 Signed-off-by: Chris Ball --- include/linux/mmc/host.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/linux/mmc') diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 9a03d033574..742f0e102e1 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -167,6 +167,11 @@ struct mmc_async_req { int (*err_check) (struct mmc_card *, struct mmc_async_req *); }; +struct mmc_hotplug { + unsigned int irq; + void *handler_priv; +}; + struct mmc_host { struct device *parent; struct device class_dev; @@ -300,6 +305,7 @@ struct mmc_host { struct delayed_work detect; int detect_change; /* card detect flag */ + struct mmc_hotplug hotplug; const struct mmc_bus_ops *bus_ops; /* current bus driver */ unsigned int bus_refs; /* reference counter */ -- cgit v1.2.3