@@ -407,7 +407,10 @@ static int rpm_suspend(struct device *dev, int rpmflags)
if (parent && !parent->power.ignore_children) {
spin_unlock_irq(&dev->power.lock);
- pm_request_idle(parent);
+ if (dev->power.no_callbacks)
+ pm_runtime_idle(parent);
+ else
+ pm_request_idle(parent);
spin_lock_irq(&dev->power.lock);
}
This solution assumes that such sub-devices don't really need to have
callbacks of their own. It would work for SDIO, since we are
effectively no_callbacks devices anyway, and it only seems reasonable
to set SDIO functions as no_callbacks devices.
A different, bolder solution, will always call pm_runtime_idle instead
of pm_request_idle (see below): when a device is runtime suspended, it
can't be too bad to immediately send idle notification to its parent,
too. I'm aware this might not always be desirable, but I'm bringing
this up even just for the sake of discussion:
@@ -407,7 +407,7 @@ static int rpm_suspend(struct device *dev, int rpmflags)
if (parent && !parent->power.ignore_children) {
spin_unlock_irq(&dev->power.lock);
- pm_request_idle(parent);
+ pm_runtime_idle(parent);
spin_lock_irq(&dev->power.lock);
}