Re: MMC_CAP_POWER_OFF_CARD, MMC_PM_KEEP_POWER - when to set

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

 



Hi Guennadi,

On Thu, May 24, 2012 at 4:07 PM, Guennadi Liakhovetski
<g.liakhovetski@xxxxxx> wrote:
> How do you know, if this is a normal sd-card slot?

Not sure I follow the question.

But if you ask whether we can dynamically set MMC_CAP_POWER_OFF_CARD,
then we can't (with what we know today).

This CAP is dealing with issues of specific boards which,
unfortunately, we have no way (today) to dynamically probe.

>> No, MMC_PM_KEEP_POWER is different: it is a dynamic user decision
>> controlling whether the card should stay on while the system is
>> suspended,
>
> Isn't it both?

Yes, you're right - we need host support to keep the card powered
while the system is suspended.

> A complete board reset in this case will differ from the card power-off
> only in the state of the rest of the SD-card ping, e.g., the clock. So,
> additionally switching off the clock in this case should be equivalent to
> the board reset?

Not really - consider the example I gave you, where you are required
to toggle a card reset pin after you power cycle it, but there's no
way to control that pin. In that case, only a complete board reset can
help you.

> Given the above, wouldn't it be sufficient to test (mmc->pm_flags &
> MMC_PM_KEEP_POWER) to decide, whether the card can be suspended?

No,

MMC_PM_KEEP_POWER is about the ability (and desire) to keep the card
powered while the system is suspended.

MMC_CAP_POWER_OFF_CARD is about the ability to power off the card
without killing it completely until the next board reset.

These two flags really address completely different problems, despite
the similar nomenclature.

Thanks,
Ohad.
--
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