Re: [PATCH 13/29] mmc: tmio: add regulator support

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

 



On Thu, May 03, 2012 at 05:05:42PM +0200, Guennadi Liakhovetski wrote:

> +static void tmio_mmc_set_power(struct tmio_mmc_host *host, struct mmc_ios *ios)
> +{
> +	if (!(host->mmc->caps & MMC_CAP_POWER_OFF_CARD))
> +		return;
> +
> +	if (host->vdd)
> +		/* Errors ignored... */
> +		mmc_regulator_set_ocr(host->mmc, host->vdd,
> +				      ios->power_mode ? ios->vdd : 0);
> +	else if (host->set_pwr)
> +		host->set_pwr(host->pdev, ios->power_mode != MMC_POWER_OFF);
> +}

This looks pretty much identical to the previous code, should it be
being factored out into the core?  Or put the regulator bit in the core
and provide an option to override with manual callbacks if that's
required.

Attachment: signature.asc
Description: Digital signature


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

  Powered by Linux