|
@@ -275,31 +275,6 @@ static int omap_hsmmc_get_cover_state(struct device *dev)
|
|
return !gpio_get_value_cansleep(mmc->switch_pin);
|
|
return !gpio_get_value_cansleep(mmc->switch_pin);
|
|
}
|
|
}
|
|
|
|
|
|
-#ifdef CONFIG_PM
|
|
|
|
-
|
|
|
|
-static int omap_hsmmc_suspend_cdirq(struct device *dev)
|
|
|
|
-{
|
|
|
|
- struct omap_hsmmc_host *host = dev_get_drvdata(dev);
|
|
|
|
-
|
|
|
|
- disable_irq(host->card_detect_irq);
|
|
|
|
- return 0;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static int omap_hsmmc_resume_cdirq(struct device *dev)
|
|
|
|
-{
|
|
|
|
- struct omap_hsmmc_host *host = dev_get_drvdata(dev);
|
|
|
|
-
|
|
|
|
- enable_irq(host->card_detect_irq);
|
|
|
|
- return 0;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-#else
|
|
|
|
-
|
|
|
|
-#define omap_hsmmc_suspend_cdirq NULL
|
|
|
|
-#define omap_hsmmc_resume_cdirq NULL
|
|
|
|
-
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
#ifdef CONFIG_REGULATOR
|
|
#ifdef CONFIG_REGULATOR
|
|
|
|
|
|
static int omap_hsmmc_set_power(struct device *dev, int power_on, int vdd)
|
|
static int omap_hsmmc_set_power(struct device *dev, int power_on, int vdd)
|
|
@@ -2234,8 +2209,6 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
|
|
"Unable to grab MMC CD IRQ\n");
|
|
"Unable to grab MMC CD IRQ\n");
|
|
goto err_irq_cd;
|
|
goto err_irq_cd;
|
|
}
|
|
}
|
|
- host->suspend = omap_hsmmc_suspend_cdirq;
|
|
|
|
- host->resume = omap_hsmmc_resume_cdirq;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
omap_hsmmc_disable_irq(host);
|
|
omap_hsmmc_disable_irq(host);
|
|
@@ -2322,25 +2295,6 @@ static int omap_hsmmc_remove(struct platform_device *pdev)
|
|
}
|
|
}
|
|
|
|
|
|
#ifdef CONFIG_PM
|
|
#ifdef CONFIG_PM
|
|
-static int omap_hsmmc_prepare(struct device *dev)
|
|
|
|
-{
|
|
|
|
- struct omap_hsmmc_host *host = dev_get_drvdata(dev);
|
|
|
|
-
|
|
|
|
- if (host->suspend)
|
|
|
|
- return host->suspend(dev);
|
|
|
|
-
|
|
|
|
- return 0;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static void omap_hsmmc_complete(struct device *dev)
|
|
|
|
-{
|
|
|
|
- struct omap_hsmmc_host *host = dev_get_drvdata(dev);
|
|
|
|
-
|
|
|
|
- if (host->resume)
|
|
|
|
- host->resume(dev);
|
|
|
|
-
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static int omap_hsmmc_suspend(struct device *dev)
|
|
static int omap_hsmmc_suspend(struct device *dev)
|
|
{
|
|
{
|
|
struct omap_hsmmc_host *host = dev_get_drvdata(dev);
|
|
struct omap_hsmmc_host *host = dev_get_drvdata(dev);
|
|
@@ -2398,8 +2352,6 @@ static int omap_hsmmc_resume(struct device *dev)
|
|
}
|
|
}
|
|
|
|
|
|
#else
|
|
#else
|
|
-#define omap_hsmmc_prepare NULL
|
|
|
|
-#define omap_hsmmc_complete NULL
|
|
|
|
#define omap_hsmmc_suspend NULL
|
|
#define omap_hsmmc_suspend NULL
|
|
#define omap_hsmmc_resume NULL
|
|
#define omap_hsmmc_resume NULL
|
|
#endif
|
|
#endif
|
|
@@ -2484,8 +2436,6 @@ static int omap_hsmmc_runtime_resume(struct device *dev)
|
|
static struct dev_pm_ops omap_hsmmc_dev_pm_ops = {
|
|
static struct dev_pm_ops omap_hsmmc_dev_pm_ops = {
|
|
.suspend = omap_hsmmc_suspend,
|
|
.suspend = omap_hsmmc_suspend,
|
|
.resume = omap_hsmmc_resume,
|
|
.resume = omap_hsmmc_resume,
|
|
- .prepare = omap_hsmmc_prepare,
|
|
|
|
- .complete = omap_hsmmc_complete,
|
|
|
|
.runtime_suspend = omap_hsmmc_runtime_suspend,
|
|
.runtime_suspend = omap_hsmmc_runtime_suspend,
|
|
.runtime_resume = omap_hsmmc_runtime_resume,
|
|
.runtime_resume = omap_hsmmc_runtime_resume,
|
|
};
|
|
};
|