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 */ 24int fw_mgmt_init(void); 25void fw_mgmt_exit(void); 26struct gb_connection *to_fw_mgmt_connection(struct device *dev); 27int gb_fw_mgmt_request_handler(struct gb_operation *op); 28int gb_fw_mgmt_connection_init(struct gb_connection *connection); 29void gb_fw_mgmt_connection_exit(struct gb_connection *connection); 30 31/* Firmware Download Protocol specific functions */ 32int gb_fw_download_request_handler(struct gb_operation *op); 33int gb_fw_download_connection_init(struct gb_connection *connection); 34void gb_fw_download_connection_exit(struct gb_connection *connection); 35 36/* CAP Protocol specific functions */ 37int cap_init(void); 38void cap_exit(void); 39int gb_cap_connection_init(struct gb_connection *connection); 40void gb_cap_connection_exit(struct gb_connection *connection); 41 42#endif /* __FIRMWARE_H */ 43