summaryrefslogtreecommitdiff
path: root/drivers/nfc/pn533/pn533.h
diff options
context:
space:
mode:
authorLars Poeschel <poeschel@lemonage.de>2019-10-29 17:47:14 +0300
committerDavid S. Miller <davem@davemloft.net>2019-10-30 07:05:26 +0300
commitc656aa4c27b17a8c70da223ed5ab42145800d6b5 (patch)
tree2daa4cce7ac78fe27ad0653e20b6176c8e6bead3 /drivers/nfc/pn533/pn533.h
parent843cc92ed323692943c94d7e6ce97a0353b8c2d7 (diff)
downloadlinux-c656aa4c27b17a8c70da223ed5ab42145800d6b5.tar.xz
nfc: pn533: add UART phy driver
This adds the UART phy interface for the pn533 driver. The pn533 driver can be used through UART interface this way. It is implemented as a serdev device. Cc: Johan Hovold <johan@kernel.org> Cc: Claudiu Beznea <Claudiu.Beznea@microchip.com> Cc: David Miller <davem@davemloft.net> Signed-off-by: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/nfc/pn533/pn533.h')
-rw-r--r--drivers/nfc/pn533/pn533.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/nfc/pn533/pn533.h b/drivers/nfc/pn533/pn533.h
index 984f79fef59e..47d4a6bf9420 100644
--- a/drivers/nfc/pn533/pn533.h
+++ b/drivers/nfc/pn533/pn533.h
@@ -43,6 +43,11 @@
/* Preamble (1), SoPC (2), ACK Code (2), Postamble (1) */
#define PN533_STD_FRAME_ACK_SIZE 6
+/*
+ * 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 8
#define PN533_STD_FRAME_CHECKSUM(f) (f->data[f->datalen])
#define PN533_STD_FRAME_POSTAMBLE(f) (f->data[f->datalen + 1])
/* Half start code (3), LEN (4) should be 0xffff for extended frame */
@@ -84,6 +89,9 @@
#define PN533_CMD_MI_MASK 0x40
#define PN533_CMD_RET_SUCCESS 0x00
+#define PN533_FRAME_DATALEN_ACK 0x00
+#define PN533_FRAME_DATALEN_ERROR 0x01
+#define PN533_FRAME_DATALEN_EXTENDED 0xFF
enum pn533_protocol_type {
PN533_PROTO_REQ_ACK_RESP = 0,