]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
greybus: timesync/pm: Make synchronous call to restore FrameTime
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Fri, 15 Jul 2016 17:01:49 +0000 (18:01 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 15 Jul 2016 23:01:17 +0000 (08:01 +0900)
When we discussed and agreed a serialized way to-do PM runtime
suspend/resume we omitted the necessity to restore the FrameTime on resume.
This patch restores the FrameTime synchronously such that when an Interface
PM resume callback completes we have either successfully restored the
FrameTime including the new Interface or we've produced a result code to
indicate what went wrong when trying.

Suggested-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Tested-by: David Lin <dtwlin@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/interface.c

index 16e268f1b109592a9ef7cdcda635fc60e8434a2f..b3bd96e43128509ef46d843f8996ef9ba6260258 100644 (file)
@@ -579,6 +579,12 @@ static int gb_interface_resume(struct device *dev)
                return ret;
        }
 
+       ret = gb_timesync_schedule_synchronous(intf);
+       if (ret) {
+               dev_err(dev, "failed to synchronize FrameTime: %d\n", ret);
+               return ret;
+       }
+
        return 0;
 }