greybus: control: Add TimeSync get-last-event logic
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Thu, 12 May 2016 11:43:51 +0000 (12:43 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Sat, 14 May 2016 16:26:24 +0000 (18:26 +0200)
commitfa433b619655bf2d253094074d132004a9fa479c
tree92d260093ea1daba0fa8ec6926982525ab37f1c0
parent5705020fbe2a274a1a49709e688b4cc471425036
greybus: control: Add TimeSync get-last-event logic

gb_control_timesync_get_last_event() sends a request asking for the
FrameTime at the last SVC strobe event. The responding entity returns the
FrameTime in the response phase of the request. Performing this operation
to an Interface after previously:

1. Synchronizing time using timesync-enable/timesync-authoritative
2. Sending an SVC_TIMESYNC_PING

will return the FrameTime of the responding entity at the SVC-ping. If
this command is sent before synchronization has been initiated or
successfully completed the responding entity should return an error
code.

- control.c::gb_control_timesync_get_last_event(u64 *frame_time)
  Returns the FrameTime at the last SVC_TIMESYNC_PING to the AP Module.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/control.c
drivers/staging/greybus/control.h
drivers/staging/greybus/greybus_protocols.h