Re: [PATCH] OMAP: mmc_twl4030 nicely disable vmmc_aux

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

 



On Tuesday 24 March 2009, Adrian Hunter wrote:
> >From 1a3f939d95122d8e58a3750cf5bce09247357203 Mon Sep 17 00:00:00 2001
> From: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> 
> The MMC driver turns the power off before it turns it
> on. To avoid regulator warnings, vmmc_aux must only be
> disabled if it has previously been enabled.
> 
> Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>

Acked-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>

good catch.  


> ---
>  arch/arm/mach-omap2/mmc-twl4030.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c
> index 2ff50f0..cb56fe2 100644
> --- a/arch/arm/mach-omap2/mmc-twl4030.c
> +++ b/arch/arm/mach-omap2/mmc-twl4030.c
> @@ -305,7 +305,7 @@ static int twl_mmc23_set_power(struct device *dev, int slot, int power_on, int v
>  				ret = mmc_regulator_set_ocr(c->vcc, 0);
>  		}
>  	} else {
> -		if (c->vcc_aux)
> +		if (c->vcc_aux && (ret = regulator_is_enabled(c->vcc_aux)) > 0)
>  			ret = regulator_disable(c->vcc_aux);
>  		if (ret == 0)
>  			ret = mmc_regulator_set_ocr(c->vcc, 0);
> -- 
> 1.5.6.3
> 
> 



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

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux