]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
greybus: greybus_protocols.h Add SVC_TIMESYNC_PING
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Thu, 5 May 2016 14:34:56 +0000 (15:34 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 5 May 2016 20:49:02 +0000 (13:49 -0700)
In order to verify TimeSync functionality we require a TimeSync-ping
operation where the AP can command the SVC to initiate a single strobe of
downstream TimeSync slaves, and report the FrameTime at the strobe. Ping
will only be valid after the system has transitioned to a TIMESYNC_ACTIVE
state.

In the active state each TimeSync slave will graph a single incoming SVC
strobe as a ping and will store its frame time. The AP will then gather
each last-event FrameTime for presentation to user-space in the AP and/or
further automation based on the reported FrameTimes at the SVC ping.

This patch adds the SVC ping command definition to greybus_protocols.h.

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

index d5a63d38a28aece2ae4626269fd28b5a7ac29d17..9b21a35292d1d3d011ccafd7bb508ee983135333 100644 (file)
@@ -837,6 +837,7 @@ struct gb_spi_transfer_response {
 #define GB_SVC_TYPE_PWRMON_INTF_SAMPLE_GET     0x17
 #define GB_SVC_TYPE_TIMESYNC_WAKE_PINS_ACQUIRE 0x18
 #define GB_SVC_TYPE_TIMESYNC_WAKE_PINS_RELEASE 0x19
+#define GB_SVC_TYPE_TIMESYNC_PING              0x1a
 #define GB_SVC_TYPE_MODULE_INSERTED            0x1f
 #define GB_SVC_TYPE_MODULE_REMOVED             0x20
 #define GB_SVC_TYPE_INTF_ACTIVATE              0x27
@@ -975,6 +976,11 @@ struct gb_svc_timesync_wake_pins_acquire_request {
 /* timesync wake pins release request has no payload */
 /* timesync wake pins release response has no payload */
 
+/* timesync svc ping request has no payload */
+struct gb_svc_timesync_ping_response {
+       __le64  frame_time;
+} __packed;
+
 #define GB_SVC_UNIPRO_FAST_MODE                        0x01
 #define GB_SVC_UNIPRO_SLOW_MODE                        0x02
 #define GB_SVC_UNIPRO_FAST_AUTO_MODE           0x04