i2c.c (51835949dda3783d4639cfa74ce13a3c9829de00) | i2c.c (1a251f52cfdc417c84411a056bc142cbd77baef4) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * I2C Link Layer for PN544 HCI based Driver 4 * 5 * Copyright (C) 2012 Intel Corporation. All rights reserved. 6 */ 7 8#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt --- 112 unchanged lines hidden (view full) --- 121#define PN544_FW_CMD_RESULT_CRYPTOGRAPHIC_ERROR 0x19 122#define PN544_FW_CMD_RESULT_VERSION_CONDITIONS_ERROR 0x1D 123#define PN544_FW_CMD_RESULT_MEMORY_ERROR 0x20 124#define PN544_FW_CMD_RESULT_CHUNK_OK 0x21 125#define PN544_FW_CMD_RESULT_WRITE_FAILED 0x74 126#define PN544_FW_CMD_RESULT_COMMAND_REJECTED 0xE0 127#define PN544_FW_CMD_RESULT_CHUNK_ERROR 0xE6 128 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * I2C Link Layer for PN544 HCI based Driver 4 * 5 * Copyright (C) 2012 Intel Corporation. All rights reserved. 6 */ 7 8#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt --- 112 unchanged lines hidden (view full) --- 121#define PN544_FW_CMD_RESULT_CRYPTOGRAPHIC_ERROR 0x19 122#define PN544_FW_CMD_RESULT_VERSION_CONDITIONS_ERROR 0x1D 123#define PN544_FW_CMD_RESULT_MEMORY_ERROR 0x20 124#define PN544_FW_CMD_RESULT_CHUNK_OK 0x21 125#define PN544_FW_CMD_RESULT_WRITE_FAILED 0x74 126#define PN544_FW_CMD_RESULT_COMMAND_REJECTED 0xE0 127#define PN544_FW_CMD_RESULT_CHUNK_ERROR 0xE6 128 |
129#define MIN(X, Y) ((X) < (Y) ? (X) : (Y)) 130 | |
131#define PN544_FW_WRITE_BUFFER_MAX_LEN 0x9f7 132#define PN544_FW_I2C_MAX_PAYLOAD PN544_HCI_I2C_LLC_MAX_SIZE 133#define PN544_FW_I2C_WRITE_FRAME_HEADER_LEN 8 134#define PN544_FW_I2C_WRITE_DATA_MAX_LEN MIN((PN544_FW_I2C_MAX_PAYLOAD -\ 135 PN544_FW_I2C_WRITE_FRAME_HEADER_LEN),\ 136 PN544_FW_WRITE_BUFFER_MAX_LEN) 137#define PN544_FW_SECURE_CHUNK_WRITE_HEADER_LEN 3 138#define PN544_FW_SECURE_CHUNK_WRITE_DATA_MAX_LEN (PN544_FW_I2C_MAX_PAYLOAD -\ --- 826 unchanged lines hidden --- | 129#define PN544_FW_WRITE_BUFFER_MAX_LEN 0x9f7 130#define PN544_FW_I2C_MAX_PAYLOAD PN544_HCI_I2C_LLC_MAX_SIZE 131#define PN544_FW_I2C_WRITE_FRAME_HEADER_LEN 8 132#define PN544_FW_I2C_WRITE_DATA_MAX_LEN MIN((PN544_FW_I2C_MAX_PAYLOAD -\ 133 PN544_FW_I2C_WRITE_FRAME_HEADER_LEN),\ 134 PN544_FW_WRITE_BUFFER_MAX_LEN) 135#define PN544_FW_SECURE_CHUNK_WRITE_HEADER_LEN 3 136#define PN544_FW_SECURE_CHUNK_WRITE_DATA_MAX_LEN (PN544_FW_I2C_MAX_PAYLOAD -\ --- 826 unchanged lines hidden --- |