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 <[email protected]>

Reviwed-by: Mark Brown <[email protected]>

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.

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to