Hi Ulf,
I like the fact that wakeups are now quite simplified. A couple of
comments below:

> By signaling the wakeup event for a time of 5 s for devices configured
> as wakeup capable, we likely will be prevent a sleep long enough to let
> user space consume the event.
Given that there is no pm_relax(), 5 seconds is probably too long.
User space should grab a wakeup_source of its own if it needs to
extend the awake state. I recommend putting just enough to start the
mount process - probably 0.5-1 second - but Android guys would know
better.

> +       /*
> +        * If the device is configured as wakeup, we prevent a new sleep for
> +        * 5 s to give provision for user space to consume the event.
> +        */
> +       if (cd_irq && !(host->caps & MMC_CAP_NEEDS_POLL) &&
> +               device_can_wakeup(mmc_dev(host)))
> +               pm_wakeup_event(mmc_dev(host), 5000);
It seems like device_can_wakeup() is redundant here and I'm not sure
what happens if a device is not wakeup capable. Was the intention to
go into autosleep until something else wakes up the system long enough
to complete the mount? Also is it ok if MMCs that require polling
exhibit wakeup behaviour of their own?

Zoran
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to