linux/drivers/nfc/s3fwrn5/firmware.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * NCI based driver for Samsung S3FWRN5 NFC chip
 *
 * Copyright (C) 2015 Samsung Electrnoics
 * Robert Baldyga <[email protected]>
 */

#ifndef __LOCAL_S3FWRN5_FIRMWARE_H_
#define __LOCAL_S3FWRN5_FIRMWARE_H_

/* FW Message Types */
#define S3FWRN5_FW_MSG_CMD
#define S3FWRN5_FW_MSG_RSP
#define S3FWRN5_FW_MSG_DATA

/* FW Return Codes */
#define S3FWRN5_FW_RET_SUCCESS
#define S3FWRN5_FW_RET_MESSAGE_TYPE_INVALID
#define S3FWRN5_FW_RET_COMMAND_INVALID
#define S3FWRN5_FW_RET_PAGE_DATA_OVERFLOW
#define S3FWRN5_FW_RET_SECT_DATA_OVERFLOW
#define S3FWRN5_FW_RET_AUTHENTICATION_FAIL
#define S3FWRN5_FW_RET_FLASH_OPERATION_FAIL
#define S3FWRN5_FW_RET_ADDRESS_OUT_OF_RANGE
#define S3FWRN5_FW_RET_PARAMETER_INVALID

/* ---- FW Packet structures ---- */
#define S3FWRN5_FW_HDR_SIZE

struct s3fwrn5_fw_header {};

#define S3FWRN5_FW_CMD_RESET

#define S3FWRN5_FW_CMD_GET_BOOTINFO

struct s3fwrn5_fw_cmd_get_bootinfo_rsp {};

#define S3FWRN5_FW_CMD_ENTER_UPDATE_MODE

struct s3fwrn5_fw_cmd_enter_updatemode {};

#define S3FWRN5_FW_CMD_UPDATE_SECTOR

struct s3fwrn5_fw_cmd_update_sector {};

#define S3FWRN5_FW_CMD_COMPLETE_UPDATE_MODE

struct s3fwrn5_fw_image {};

struct s3fwrn5_fw_info {};

int s3fwrn5_fw_request_firmware(struct s3fwrn5_fw_info *fw_info);
void s3fwrn5_fw_init(struct s3fwrn5_fw_info *fw_info, const char *fw_name);
int s3fwrn5_fw_setup(struct s3fwrn5_fw_info *fw_info);
bool s3fwrn5_fw_check_version(const struct s3fwrn5_fw_info *fw_info, u32 version);
int s3fwrn5_fw_download(struct s3fwrn5_fw_info *fw_info);
void s3fwrn5_fw_cleanup(struct s3fwrn5_fw_info *fw_info);

int s3fwrn5_fw_recv_frame(struct nci_dev *ndev, struct sk_buff *skb);

#endif /* __LOCAL_S3FWRN5_FIRMWARE_H_ */