summaryrefslogtreecommitdiffstats
path: root/drivers/nfc/st21nfcb
AgeCommit message (Collapse)Author
2014-09-08NFC: st21nfcb: Remove useless headersChristophe Ricard
Remove some headers as they are: - not relevent for st21nfcb. - called multiple times for no reason: example st21nfcb.h already include ndlc.h. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-08NFC: st21nfcb: Fix logic when running into i2c read retryChristophe Ricard
When retrying to read the NCI header, the CLF might not be available the first time. However it may not be successful the second time and this may cause an error in the function. Enforce the retrieve data length is as expected. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-07NFC: st21nfcb: Remove inappropriate kfree on a previously devm_kzalloc pointerChristophe Ricard
In case of an error during driver probe, info pointer was freed with kfree. No need to free anything when using devm_kzalloc. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-07NFC: st21nfcb: Remove useless new line in nfc_err callChristophe Ricard
Remove a uselss new line in nfc_err call. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-07NFC: st21nfcb: Remove double assignment of .owner in struct device_driverChristophe Ricard
The .owner member of struct device_driver is assigned THIS_MODULE twice. Introduced by: commit 35630df68d6030daf12dde12ed07bbe26324e6ac NFC: st21nfcb: Add driver for STMicroelectronics ST21NFCB NFC chip Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-07NFC: st21nfcb: Convert to use devm_gpio_request_oneChristophe Ricard
Simplify the code a bit as mention by Axel Lin in a previous patch for st21nfca. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-09-07NFC: st21nfcb: Fix scripts/checkpatch.pl error "code indent should use tabs ↵Christophe Ricard
where possible" Fixing scripts/checkpatch.pl error "code indent should use tabs where possible" in: - i2c.c in st21nfcb_nci_irq_thread_fn function. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-07-23NFC: st21nfcb: few code clean upChristophe Ricard
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-07-23NFC: st21nfcb: Add driver for STMicroelectronics ST21NFCB NFC chipChristophe Ricard
Add driver for STMicroelectronics ST21NFCB NFC controller. ST21NFCB is using NCI protocol and a proprietary low level transport protocol called NDLC used on top. NDLC: The protocol defines 2 types of frame: - One type carrying NCI data (referred as DATAFRAME frames). - One type carrying protocol information used for flow control and error control mechanisms (referred as SUPERVISOR frames). After each frame transmission to the NFC controller, the device host SHALL waitfor an ACK (SUPERVISOR frame) reception before sending a new frame. The NFC controller MAY send a frame at anytime to the device host. The NFC controller MAY send a specific WAIT supervisor frame to indicate to device host that a NCI data packet has been received but that it could take significant time before the NFC controller sends an ACK and thus allows next data reception. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>