|
|
@@ -1447,6 +1447,21 @@ int dpm_suspend_noirq(pm_message_t state)
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
+static void dpm_propagate_wakeup_to_parent(struct device *dev)
|
|
|
+{
|
|
|
+ struct device *parent = dev->parent;
|
|
|
+
|
|
|
+ if (!parent)
|
|
|
+ return;
|
|
|
+
|
|
|
+ spin_lock_irq(&parent->power.lock);
|
|
|
+
|
|
|
+ if (dev->power.wakeup_path && !parent->power.ignore_children)
|
|
|
+ parent->power.wakeup_path = true;
|
|
|
+
|
|
|
+ spin_unlock_irq(&parent->power.lock);
|
|
|
+}
|
|
|
+
|
|
|
static pm_callback_t dpm_subsys_suspend_late_cb(struct device *dev,
|
|
|
pm_message_t state,
|
|
|
const char **info_p)
|
|
|
@@ -1527,6 +1542,7 @@ Run:
|
|
|
async_error = error;
|
|
|
goto Complete;
|
|
|
}
|
|
|
+ dpm_propagate_wakeup_to_parent(dev);
|
|
|
|
|
|
Skip:
|
|
|
dev->power.is_late_suspended = true;
|
|
|
@@ -1660,21 +1676,6 @@ static int legacy_suspend(struct device *dev, pm_message_t state,
|
|
|
return error;
|
|
|
}
|
|
|
|
|
|
-static void dpm_propagate_wakeup_to_parent(struct device *dev)
|
|
|
-{
|
|
|
- struct device *parent = dev->parent;
|
|
|
-
|
|
|
- if (!parent)
|
|
|
- return;
|
|
|
-
|
|
|
- spin_lock_irq(&parent->power.lock);
|
|
|
-
|
|
|
- if (dev->power.wakeup_path && !parent->power.ignore_children)
|
|
|
- parent->power.wakeup_path = true;
|
|
|
-
|
|
|
- spin_unlock_irq(&parent->power.lock);
|
|
|
-}
|
|
|
-
|
|
|
static void dpm_clear_superiors_direct_complete(struct device *dev)
|
|
|
{
|
|
|
struct device_link *link;
|