On Wed, May 11, 2011 at 12:39:39PM +0200, Antonio Ospite wrote:
> Add support for powering up SD cards driven by regulators.
> This makes the mmc_spi driver work also with the Motorola A910 phone.
> 
> Signed-off-by: Antonio Ospite <osp...@studenti.unina.it>

Reviwed-by: Mark Brown <broo...@opensource.wolfsonmicro.com>

but

> +     switch (power_mode) {
> +     case MMC_POWER_OFF:
> +             if (host->vcc) {
> +                     int ret = mmc_regulator_set_ocr(host->mmc,
> +                                                     host->vcc, 0);
> +                     if (ret)
> +                             return ret;
> +             } else {
> +                     host->pdata->setpower(&host->spi->dev, vdd);
> +             }
> +             break;
> +
> +     case MMC_POWER_UP:
> +             if (host->vcc) {
> +                     int ret = mmc_regulator_set_ocr(host->mmc,
> +                                                     host->vcc, vdd);
> +                     if (ret)
> +                             return ret;
> +             } else {
>                       host->pdata->setpower(&host->spi->dev, vdd);
> -                     if (power_mode == MMC_POWER_UP)
> -                             msleep(host->powerup_msecs);
>               }
> +             msleep(host->powerup_msecs);
> +             break;

This stuff all looks like it should be factored out.

Reply via email to