diff options
author | Jeffrey Carlyle <jcarlyle@google.com> | 2016-05-06 12:43:52 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-05-09 08:47:18 +0200 |
commit | 144763bf8efd8bfc6b0c582fdf3f77564fc0296f (patch) | |
tree | d3b029e00076bb281ddc52ec638e78bd673573fa /drivers/staging/greybus/greybus_protocols.h | |
parent | 03b4fa4b5dd9ecd11c27cdaeacf46453a948df5a (diff) | |
download | op-kernel-dev-144763bf8efd8bfc6b0c582fdf3f77564fc0296f.zip op-kernel-dev-144763bf8efd8bfc6b0c582fdf3f77564fc0296f.tar.gz |
greybus: svc: implement svc_intf_{vsys,refclk,unipro}_{enable,disable} operations
Add SVC operations for fine grain control over vsys, refclk, and unipro
port power.
Testing done: used "new" firmware boot sequence to verify that modules
were correctly detected and booted.
Signed-off-by: Jeffrey Carlyle <jcarlyle@google.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/greybus_protocols.h')
-rw-r--r-- | drivers/staging/greybus/greybus_protocols.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/drivers/staging/greybus/greybus_protocols.h b/drivers/staging/greybus/greybus_protocols.h index 9b21a35..c77fb25 100644 --- a/drivers/staging/greybus/greybus_protocols.h +++ b/drivers/staging/greybus/greybus_protocols.h @@ -840,6 +840,12 @@ struct gb_spi_transfer_response { #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_VSYS_ENABLE 0x21 +#define GB_SVC_TYPE_INTF_VSYS_DISABLE 0x22 +#define GB_SVC_TYPE_INTF_REFCLK_ENABLE 0x23 +#define GB_SVC_TYPE_INTF_REFCLK_DISABLE 0x24 +#define GB_SVC_TYPE_INTF_UNIPRO_ENABLE 0x25 +#define GB_SVC_TYPE_INTF_UNIPRO_DISABLE 0x26 #define GB_SVC_TYPE_INTF_ACTIVATE 0x27 #define GB_SVC_TYPE_INTF_MAILBOX_EVENT 0x29 @@ -954,6 +960,43 @@ struct gb_svc_route_destroy_request { } __packed; /* route destroy response has no payload */ +/* used for svc_intf_vsys_{enable,disable} */ +struct gb_svc_intf_vsys_request { + __u8 intf_id; +} __packed; + +struct gb_svc_intf_vsys_response { + __u8 result_code; +#define GB_SVC_INTF_VSYS_OK 0x00 +#define GB_SVC_INTF_VSYS_BUSY 0x01 +#define GB_SVC_INTF_VSYS_FAIL 0x02 +} __packed; + +/* used for svc_intf_refclk_{enable,disable} */ +struct gb_svc_intf_refclk_request { + __u8 intf_id; +} __packed; + +struct gb_svc_intf_refclk_response { + __u8 result_code; +#define GB_SVC_INTF_REFCLK_OK 0x00 +#define GB_SVC_INTF_REFCLK_BUSY 0x01 +#define GB_SVC_INTF_REFCLK_FAIL 0x02 +} __packed; + +/* used for svc_intf_unipro_{enable,disable} */ +struct gb_svc_intf_unipro_request { + __u8 intf_id; +} __packed; + +struct gb_svc_intf_unipro_response { + __u8 result_code; +#define GB_SVC_INTF_UNIPRO_OK 0x00 +#define GB_SVC_INTF_UNIPRO_BUSY 0x01 +#define GB_SVC_INTF_UNIPRO_FAIL 0x02 +#define GB_SVC_INTF_UNIPRO_NOT_OFF 0x03 +} __packed; + struct gb_svc_timesync_enable_request { __u8 count; __le64 frame_time; |