Re: [PATCH 2/3] dw_mmc: support mmc power control with regulator

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

 



Hi,

On Thu, Mar 17 2011, Chris Ball wrote:
>> @@ -1438,6 +1439,13 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>>  	}
>>  #endif /* CONFIG_MMC_DW_IDMAC */
>>  
>> +	host->vmmc = regulator_get(mmc_dev(mmc), "vmmc");
>> +	if (IS_ERR(host->vmmc)) {
>> +		printk(KERN_INFO "%s: no vmmc regulator found\n", mmc_hostname(mmc));
>> +		host->vmmc = NULL;
>> +	} else
>> +		regulator_enable(host->vmmc);
>> +
>>  	if (dw_mci_get_cd(mmc))
>>  		set_bit(DW_MMC_CARD_PRESENT, &slot->flags);
>>  	else
>
> I think you want an "#ifdef CONFIG_REGULATOR" around this hunk.
> Please try building the driver with CONFIG_REGULATOR=n.
>
> The other hunks in the patch shouldn't need it, because they test
> "host->vcc" before making any regulator calls.

Actually, <linux/regulator/consumer.h> provides no-op versions of all
these functions if CONFIG_REGULATOR is unset, so I guess this doesn't
matter; the driver builds without CONFIG_REGULATOR as-is.

Will merge for .39 with Will's ACK, thanks.

- Chris.
-- 
Chris Ball   <cjb@xxxxxxxxxx>   <http://printf.net/>
One Laptop Per Child
--
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