Thread (35 messages) 35 messages, 6 authors, 2014-07-22
STALE4362d

[PATCH 1/3] mmc: dw_mmc: use mmc_regulator_get_supply to handle regulators

From: dianders@chromium.org (Doug Anderson)
Date: 2014-06-25 17:28:50
Also in: linux-mmc, linux-samsung-soc

Seungwon,

On Wed, Jun 25, 2014 at 4:18 AM, Seungwon Jeon [off-list ref] wrote:
quoted
quoted
quoted
+       case MMC_POWER_ON:
+               if (!IS_ERR(mmc->supply.vqmmc) &&
+                               !test_bit(DW_MMC_IO_POWERED, &slot->flags)) {
You can use regulator_is_enabled() instead of flag bit, DW_MMC_IO_POWERED.
I'd be a little worried about regulator_is_enabled() since regulators
are reference counted.  What if someone else is sharing this
regulator?  The regulator might happen to be enabled when you check it
but unless you add your own dw_mmc reference count they might turn it
off.
Important thing is that if powering vmmc failed at MMC_POWER_UP, vqmmc should not be powered.
Good point.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help