Re: [PATCH 08/29] mmc: sh_mmcif: add regulator support

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

 



On Thu, 3 May 2012, Mark Brown wrote:

> On Thu, May 03, 2012 at 05:05:37PM +0200, Guennadi Liakhovetski wrote:
> 
> > +#include <linux/regulator/consumer.h>
> 
> Where's this used?

You're right, it's not. A forward declaration of struct regulator would 
suffice.

> > +static void sh_mmcif_set_power(struct sh_mmcif_host *host, struct mmc_ios *ios)
> > +{
> > +	struct sh_mmcif_plat_data *pd = host->pd->dev.platform_data;
> > +
> > +	if (!(host->mmc->caps & MMC_CAP_POWER_OFF_CARD))
> > +		return;
> 
> Surely the core should be implementing this?

Hm, actually, I don't think so. sh_mmcif_set_power() is called as a part 
of the driver's .set_ios() method. The core has to call that method 
regardless whether MMC_CAP_POWER_OFF_CARD is set or not. Only inside that 
method we can decide, that a part of its functionality (power on / off) is 
unavailable.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
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