diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2011-05-27 11:48:12 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-07-20 17:16:06 -0400 |
commit | 85d6509dc8ca24b2b652863ef7a75622ddca17d6 (patch) | |
tree | e564c2d4f80478027abc96cb7d87da952b38409e /drivers/mmc/host/sdhci-pltfm.h | |
parent | 3a5c3743f15f27237ab025736a981e2d0c9fdfed (diff) |
mmc: sdhci: make sdhci-pltfm device drivers self registered
The patch turns the common stuff in sdhci-pltfm.c into functions, and
add device drivers their own .probe and .remove which in turn call
into the common functions, so that those sdhci-pltfm device drivers
register itself and keep all device specific things away from common
sdhci-pltfm file.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-pltfm.h')
-rw-r--r-- | drivers/mmc/host/sdhci-pltfm.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h index 2b37016ad0ac..ff4b7eb326fb 100644 --- a/drivers/mmc/host/sdhci-pltfm.h +++ b/drivers/mmc/host/sdhci-pltfm.h | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/clk.h> | 14 | #include <linux/clk.h> |
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/platform_device.h> | ||
16 | #include <linux/mmc/sdhci-pltfm.h> | 17 | #include <linux/mmc/sdhci-pltfm.h> |
17 | 18 | ||
18 | struct sdhci_pltfm_host { | 19 | struct sdhci_pltfm_host { |
@@ -20,9 +21,17 @@ struct sdhci_pltfm_host { | |||
20 | void *priv; /* to handle quirks across io-accessor calls */ | 21 | void *priv; /* to handle quirks across io-accessor calls */ |
21 | }; | 22 | }; |
22 | 23 | ||
23 | extern struct sdhci_pltfm_data sdhci_cns3xxx_pdata; | 24 | extern struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev, |
24 | extern struct sdhci_pltfm_data sdhci_esdhc_imx_pdata; | 25 | struct sdhci_pltfm_data *pdata); |
25 | extern struct sdhci_pltfm_data sdhci_dove_pdata; | 26 | extern void sdhci_pltfm_free(struct platform_device *pdev); |
26 | extern struct sdhci_pltfm_data sdhci_tegra_pdata; | 27 | |
28 | extern int sdhci_pltfm_register(struct platform_device *pdev, | ||
29 | struct sdhci_pltfm_data *pdata); | ||
30 | extern int sdhci_pltfm_unregister(struct platform_device *pdev); | ||
31 | |||
32 | #ifdef CONFIG_PM | ||
33 | extern int sdhci_pltfm_suspend(struct platform_device *dev, pm_message_t state); | ||
34 | extern int sdhci_pltfm_resume(struct platform_device *dev); | ||
35 | #endif | ||
27 | 36 | ||
28 | #endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */ | 37 | #endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */ |