BACKPORT: PM / sleep: Go direct_complete if driver has no callbacks
Backport notes: This resolves clk warnings in the designware i2c
driver on HiKey seen during suspend/resume.
Cherrypicked from: aa8e54b559479d0cb7eb632ba443b8cacd20cd4b
If a suitable prepare callback cannot be found for a given device and
its driver has no PM callbacks at all, assume that it can go direct to
complete when the system goes to sleep.
The reason for this is that there's lots of devices in a system that do
no PM at all and there's no reason for them to prevent their ancestors
to do direct_complete if they can support it.
Signed-off-by: Tomeu Vizoso <email@example.com>
Reviewed-by: Ulf Hansson <firstname.lastname@example.org>
Signed-off-by: Rafael J. Wysocki <email@example.com>
[jstultz: Backported to 4.4]
Signed-off-by: John Stultz <firstname.lastname@example.org>
(backported from aa8e54b559479d0cb7eb632ba443b8cacd20cd4b)
Signed-off-by: Mattias Nissler <email@example.com>
4 files changed