/* Bring MMC host in PM state (one level deeper).  */
static int omap_hsmmc_disable(struct mmc_host *mmc, int lazy)
/* Bring MMC host in PM state (one level deeper).  */
static int omap_hsmmc_disable(struct mmc_host *mmc, int lazy)
{
	struct omap_hsmmc_host *host = mmc_priv(mmc);
	switch (host->dpm_state) {
	case ENABLED: {
		int delay;
		delay = omap_hsmmc_enabled_to_disabled(host);
		if (lazy || delay < 0)
			return delay;
		return 0;
	}
	case DISABLED:
		return omap_hsmmc_disabled_to_sleep(host);
	case CARDSLEEP:
	case REGSLEEP:
		return omap_hsmmc_sleep_to_off(host);
	default:
		dev_dbg(mmc_dev(host->mmc), "UNKNOWN state\n");
		return -EINVAL;
	}
}