On Mon, 2014-05-12 at 20:14 +0900, Jaehoon Chung wrote:
> Use the mmc regulator API into core.c instead of enabling locally.
> It can use the "vmmc", and optional "vqmmc".
> 
> Signed-off-by: Jaehoon Chung <[email protected]>
> ---
>  drivers/mmc/host/dw_mmc.c |   61 
> ++++++++++++++++++---------------------------
>  1 file changed, 24 insertions(+), 37 deletions(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index e0e933d..3ab7231 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -937,6 +937,7 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct 
> mmc_ios *ios)
>       struct dw_mci_slot *slot = mmc_priv(mmc);
>       const struct dw_mci_drv_data *drv_data = slot->host->drv_data;
>       u32 regs;
> +     int ret;
>  
>       switch (ios->bus_width) {
>       case MMC_BUS_WIDTH_4:
> @@ -975,16 +976,36 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct 
> mmc_ios *ios)
>  
>       switch (ios->power_mode) {
>       case MMC_POWER_UP:
> +             if (!IS_ERR(mmc->supply.vmmc))
> +                     mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd);
> +
>               set_bit(DW_MMC_CARD_NEED_INIT, &slot->flags);
>               regs = mci_readl(slot->host, PWREN);
>               regs |= (1 << slot->id);
>               mci_writel(slot->host, PWREN, regs);
> +

Looks like stray newline here?

Dinh


--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to