1 /* 2 * Greybus Firmware Management Header 3 * 4 * Copyright 2016 Google Inc. 5 * Copyright 2016 Linaro Ltd. 6 * 7 * Released under the GPLv2 only. 8 */ 9 10 #ifndef __FIRMWARE_H 11 #define __FIRMWARE_H 12 13 #include "greybus.h" 14 15 #define FW_NAME_PREFIX "gmp_" 16 17 /* 18 * Length of the string in format: "FW_NAME_PREFIX""%08x_%08x_%08x_%08x_%s.tftf" 19 * (3 + 1 + 4 * (8 + 1) + 10 + 1 + 4 + 1) 20 */ 21 #define FW_NAME_SIZE 56 22 23 /* Firmware Management Protocol specific functions */ 24 int fw_mgmt_init(void); 25 void fw_mgmt_exit(void); 26 struct gb_connection *to_fw_mgmt_connection(struct device *dev); 27 int gb_fw_mgmt_request_handler(struct gb_operation *op); 28 int gb_fw_mgmt_connection_init(struct gb_connection *connection); 29 void gb_fw_mgmt_connection_exit(struct gb_connection *connection); 30 31 /* Firmware Download Protocol specific functions */ 32 int gb_fw_download_request_handler(struct gb_operation *op); 33 int gb_fw_download_connection_init(struct gb_connection *connection); 34 void gb_fw_download_connection_exit(struct gb_connection *connection); 35 36 /* CAP Protocol specific functions */ 37 int cap_init(void); 38 void cap_exit(void); 39 int gb_cap_connection_init(struct gb_connection *connection); 40 void gb_cap_connection_exit(struct gb_connection *connection); 41 42 #endif /* __FIRMWARE_H */ 43