Re: [PATCH] mxcmmc: Add the ability to bind a regulator to manage the MMC card voltage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/11/2 Alberto Panizzo <maramaopercheseimorto@xxxxxxxxx>:

> +static inline void mxcmci_init_ocr(struct mxcmci_host *host)
> +{
> +#ifdef CONFIG_REGULATOR
> +       host->vcc = regulator_get(mmc_dev(host->mmc), "vmmc");
> +
> +       if (IS_ERR(host->vcc)) {
> +               host->vcc = NULL;
> +       } else {
> +               host->mmc->ocr_avail = mmc_regulator_get_ocrmask(host->vcc);
> +               if (host->pdata && host->pdata->ocr_avail)
> +                       dev_warn(mmc_dev(host->mmc),
> +                               "pdata->ocr_avail will not be used\n");
> +       }
> +#endif

You don't need these #ifdef CONFIG_REGULATOR guardposts
anymore. I implemented stub functions for the ocrmask functions
for 2.6.37.

> +static inline void mxcmci_set_power(struct mxcmci_host *host, unsigned int vdd)
> +{
> +#ifdef CONFIG_REGULATOR
> +       if (host->vcc)
> +               mmc_regulator_set_ocr(host->vcc, vdd);
> +#endif

Neither here.

But for both cases: no big deal. Take it the day it disturbs you :-)

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux