linux/drivers/nfc/pn533/pn533.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Driver for NXP PN533 NFC Chip
 *
 * Copyright (C) 2011 Instituto Nokia de Tecnologia
 * Copyright (C) 2012-2013 Tieto Poland
 */

#define PN533_DEVICE_STD
#define PN533_DEVICE_PASORI
#define PN533_DEVICE_ACR122U
#define PN533_DEVICE_PN532
#define PN533_DEVICE_PN532_AUTOPOLL

#define PN533_ALL_PROTOCOLS

#define PN533_NO_TYPE_B_PROTOCOLS

/* Standard pn533 frame definitions (standard and extended)*/
#define PN533_STD_FRAME_HEADER_LEN
#define PN533_STD_FRAME_TAIL_LEN

#define PN533_EXT_FRAME_HEADER_LEN

#define PN533_CMD_DATAEXCH_HEAD_LEN
#define PN533_CMD_DATAEXCH_DATA_MAXLEN
#define PN533_CMD_DATAFRAME_MAXLEN

/*
 * Max extended frame payload len, excluding TFI and CC
 * which are already in PN533_FRAME_HEADER_LEN.
 */
#define PN533_STD_FRAME_MAX_PAYLOAD_LEN


/* Preamble (1), SoPC (2), ACK Code (2), Postamble (1) */
#define PN533_STD_FRAME_ACK_SIZE
/*
 * Preamble (1), SoPC (2), Packet Length (1), Packet Length Checksum (1),
 * Specific Application Level Error Code (1) , Postamble (1)
 */
#define PN533_STD_ERROR_FRAME_SIZE
#define PN533_STD_FRAME_CHECKSUM(f)
#define PN533_STD_FRAME_POSTAMBLE(f)
/* Half start code (3), LEN (4) should be 0xffff for extended frame */
#define PN533_STD_IS_EXTENDED(hdr)
#define PN533_EXT_FRAME_CHECKSUM(f)

/* start of frame */
#define PN533_STD_FRAME_SOF

/* standard frame identifier: in/out/error */
#define PN533_STD_FRAME_IDENTIFIER(f)
#define PN533_STD_FRAME_DIR_OUT
#define PN533_STD_FRAME_DIR_IN

/* PN533 Commands */
#define PN533_FRAME_CMD(f)

#define PN533_CMD_GET_FIRMWARE_VERSION
#define PN533_CMD_SAM_CONFIGURATION
#define PN533_CMD_RF_CONFIGURATION
#define PN533_CMD_IN_DATA_EXCHANGE
#define PN533_CMD_IN_COMM_THRU
#define PN533_CMD_IN_LIST_PASSIVE_TARGET
#define PN533_CMD_IN_ATR
#define PN533_CMD_IN_RELEASE
#define PN533_CMD_IN_JUMP_FOR_DEP
#define PN533_CMD_IN_AUTOPOLL

#define PN533_CMD_TG_INIT_AS_TARGET
#define PN533_CMD_TG_GET_DATA
#define PN533_CMD_TG_SET_DATA
#define PN533_CMD_TG_SET_META_DATA
#define PN533_CMD_UNDEF

#define PN533_CMD_RESPONSE(cmd)

/* PN533 Return codes */
#define PN533_CMD_RET_MASK
#define PN533_CMD_MI_MASK
#define PN533_CMD_RET_SUCCESS

#define PN533_FRAME_DATALEN_ACK
#define PN533_FRAME_DATALEN_ERROR
#define PN533_FRAME_DATALEN_EXTENDED

enum  pn533_protocol_type {};

/* Poll modulations */
enum {};
#define PN533_POLL_MOD_MAX

struct pn533_std_frame {} __packed;

struct pn533_ext_frame {} __packed;

struct pn533 {};

pn533_send_async_complete_t;

struct pn533_cmd {};


struct pn533_frame_ops {};


struct pn533_phy_ops {};


struct pn533 *pn53x_common_init(u32 device_type,
				enum pn533_protocol_type protocol_type,
				void *phy,
				const struct pn533_phy_ops *phy_ops,
				struct pn533_frame_ops *fops,
				struct device *dev);

int pn533_finalize_setup(struct pn533 *dev);
void pn53x_common_clean(struct pn533 *priv);
void pn533_recv_frame(struct pn533 *dev, struct sk_buff *skb, int status);
int pn532_i2c_nfc_alloc(struct pn533 *priv, u32 protocols,
			struct device *parent);
int pn53x_register_nfc(struct pn533 *priv, u32 protocols,
			struct device *parent);
void pn53x_unregister_nfc(struct pn533 *priv);

bool pn533_rx_frame_is_cmd_response(struct pn533 *dev, void *frame);
bool pn533_rx_frame_is_ack(void *_frame);