diff options
author | Arnd Hannemann <arnd@arndnet.de> | 2010-08-24 17:26:59 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-10-29 00:29:08 +0200 |
commit | 19ca7502c508595edfb963e5dbcf62854a926506 (patch) | |
tree | bb7dfaa2cba6cc40fad59ee0f6a084ceb30eac7b /drivers/mmc/host/tmio_mmc.c | |
parent | 9b16c0a43b74393cc18666a7748293812c61af1f (diff) | |
download | op-kernel-dev-19ca7502c508595edfb963e5dbcf62854a926506.zip op-kernel-dev-19ca7502c508595edfb963e5dbcf62854a926506.tar.gz |
mmc: Allow the tmio_mmc mfd driver to specify get_cd handler
Some controllers, supported by the tmio_mmc driver do not have the card
detect pin of a slot connected, so that polling needs to be used and
card detection is handled by other means.
This patch exposes a get_cd hook for that purpose.
Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mmc/host/tmio_mmc.c')
-rw-r--r-- | drivers/mmc/host/tmio_mmc.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c index 69d98e3..1a47221 100644 --- a/drivers/mmc/host/tmio_mmc.c +++ b/drivers/mmc/host/tmio_mmc.c @@ -756,10 +756,23 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc) (sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT)) ? 0 : 1; } +static int tmio_mmc_get_cd(struct mmc_host *mmc) +{ + struct tmio_mmc_host *host = mmc_priv(mmc); + struct mfd_cell *cell = host->pdev->dev.platform_data; + struct tmio_mmc_data *pdata = cell->driver_data; + + if (!pdata->get_cd) + return -ENOSYS; + else + return pdata->get_cd(host->pdev); +} + static const struct mmc_host_ops tmio_mmc_ops = { .request = tmio_mmc_request, .set_ios = tmio_mmc_set_ios, .get_ro = tmio_mmc_get_ro, + .get_cd = tmio_mmc_get_cd, }; #ifdef CONFIG_PM |