aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/nfc/nfc-pn544.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/nfc/nfc-pn544.txt')
-rw-r--r--Documentation/nfc/nfc-pn544.txt84
1 files changed, 1 insertions, 83 deletions
diff --git a/Documentation/nfc/nfc-pn544.txt b/Documentation/nfc/nfc-pn544.txt
index 2fcac9f5996e..b36ca14ca2d6 100644
--- a/Documentation/nfc/nfc-pn544.txt
+++ b/Documentation/nfc/nfc-pn544.txt
@@ -1,32 +1,15 @@
1Kernel driver for the NXP Semiconductors PN544 Near Field 1Kernel driver for the NXP Semiconductors PN544 Near Field
2Communication chip 2Communication chip
3 3
4Author: Jari Vanhala
5Contact: Matti Aaltonen (matti.j.aaltonen at nokia.com)
6
7General 4General
8------- 5-------
9 6
10The PN544 is an integrated transmission module for contactless 7The PN544 is an integrated transmission module for contactless
11communication. The driver goes under drives/nfc/ and is compiled as a 8communication. The driver goes under drives/nfc/ and is compiled as a
12module named "pn544". It registers a misc device and creates a device 9module named "pn544".
13file named "/dev/pn544".
14 10
15Host Interfaces: I2C, SPI and HSU, this driver supports currently only I2C. 11Host Interfaces: I2C, SPI and HSU, this driver supports currently only I2C.
16 12
17The Interface
18-------------
19
20The driver offers a sysfs interface for a hardware test and an IOCTL
21interface for selecting between two operating modes. There are read,
22write and poll functions for transferring messages. The two operating
23modes are the normal (HCI) mode and the firmware update mode.
24
25PN544 is controlled by sending messages from the userspace to the
26chip. The main function of the driver is just to pass those messages
27without caring about the message content.
28
29
30Protocols 13Protocols
31--------- 14---------
32 15
@@ -47,68 +30,3 @@ and third (LSB) bytes of the message. The maximum FW message length is
47 30
48For the ETSI HCI specification see 31For the ETSI HCI specification see
49http://www.etsi.org/WebSite/Technologies/ProtocolSpecification.aspx 32http://www.etsi.org/WebSite/Technologies/ProtocolSpecification.aspx
50
51The Hardware Test
52-----------------
53
54The idea of the test is that it can performed by reading from the
55corresponding sysfs file. The test is implemented in the board file
56and it should test that PN544 can be put into the firmware update
57mode. If the test is not implemented the sysfs file does not get
58created.
59
60Example:
61> cat /sys/module/pn544/drivers/i2c\:pn544/3-002b/nfc_test
621
63
64Normal Operation
65----------------
66
67PN544 is powered up when the device file is opened, otherwise it's
68turned off. Only one instance can use the device at a time.
69
70Userspace applications control PN544 with HCI messages. The hardware
71sends an interrupt when data is available for reading. Data is
72physically read when the read function is called by a userspace
73application. Poll() checks the read interrupt state. Configuration and
74self testing are also done from the userspace using read and write.
75
76Example platform data:
77
78static int rx71_pn544_nfc_request_resources(struct i2c_client *client)
79{
80 /* Get and setup the HW resources for the device */
81}
82
83static void rx71_pn544_nfc_free_resources(void)
84{
85 /* Release the HW resources */
86}
87
88static void rx71_pn544_nfc_enable(int fw)
89{
90 /* Turn the device on */
91}
92
93static int rx71_pn544_nfc_test(void)
94{
95 /*
96 * Put the device into the FW update mode
97 * and then back to the normal mode.
98 * Check the behavior and return one on success,
99 * zero on failure.
100 */
101}
102
103static void rx71_pn544_nfc_disable(void)
104{
105 /* turn the power off */
106}
107
108static struct pn544_nfc_platform_data rx71_nfc_data = {
109 .request_resources = rx71_pn544_nfc_request_resources,
110 .free_resources = rx71_pn544_nfc_free_resources,
111 .enable = rx71_pn544_nfc_enable,
112 .test = rx71_pn544_nfc_test,
113 .disable = rx71_pn544_nfc_disable,
114};