Merge tag 'docs-4.20' of git://git.lwn.net/linux
[linux-2.6-block.git] / drivers / staging / greybus / firmware.h
CommitLineData
eb50fd3a 1// SPDX-License-Identifier: GPL-2.0
cca22207
VK
2/*
3 * Greybus Firmware Management Header
4 *
5 * Copyright 2016 Google Inc.
6 * Copyright 2016 Linaro Ltd.
cca22207
VK
7 */
8
9#ifndef __FIRMWARE_H
10#define __FIRMWARE_H
11
12#include "greybus.h"
13
350e3ac2 14#define FW_NAME_PREFIX "gmp_"
8a704565 15
ac96a609
VK
16/*
17 * Length of the string in format: "FW_NAME_PREFIX""%08x_%08x_%08x_%08x_%s.tftf"
18 * (3 + 1 + 4 * (8 + 1) + 10 + 1 + 4 + 1)
19 */
b2abeaa1 20#define FW_NAME_SIZE 56
8a704565 21
013e6653
VK
22/* Firmware Management Protocol specific functions */
23int fw_mgmt_init(void);
24void fw_mgmt_exit(void);
25struct gb_connection *to_fw_mgmt_connection(struct device *dev);
26int gb_fw_mgmt_request_handler(struct gb_operation *op);
27int gb_fw_mgmt_connection_init(struct gb_connection *connection);
28void gb_fw_mgmt_connection_exit(struct gb_connection *connection);
29
cca22207
VK
30/* Firmware Download Protocol specific functions */
31int gb_fw_download_request_handler(struct gb_operation *op);
32int gb_fw_download_connection_init(struct gb_connection *connection);
33void gb_fw_download_connection_exit(struct gb_connection *connection);
34
e3eda54d
VK
35/* CAP Protocol specific functions */
36int cap_init(void);
37void cap_exit(void);
38int gb_cap_connection_init(struct gb_connection *connection);
39void gb_cap_connection_exit(struct gb_connection *connection);
40
cca22207 41#endif /* __FIRMWARE_H */