From 521d0d538036267fcc1bfab9f2f6e550250caf72 Mon Sep 17 00:00:00 2001 From: Bryan O'Donoghue Date: Thu, 5 May 2016 15:34:56 +0100 Subject: [PATCH] greybus: greybus_protocols.h Add SVC_TIMESYNC_PING 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 Reviewed-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/greybus_protocols.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/greybus/greybus_protocols.h b/drivers/staging/greybus/greybus_protocols.h index d5a63d38a28a..9b21a35292d1 100644 --- a/drivers/staging/greybus/greybus_protocols.h +++ b/drivers/staging/greybus/greybus_protocols.h @@ -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 -- 2.20.1