summaryrefslogtreecommitdiffstats
path: root/drivers/nfc/st21nfcb
Commit message (Collapse)AuthorAgeFilesLines
* NFC: st21nfcb: Remove useless headersChristophe Ricard2014-09-083-11/+0
| | | | | | | | | | 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>
* NFC: st21nfcb: Fix logic when running into i2c read retryChristophe Ricard2014-09-081-1/+3
| | | | | | | | | | 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>
* NFC: st21nfcb: Remove inappropriate kfree on a previously devm_kzalloc pointerChristophe Ricard2014-09-071-10/+5
| | | | | | | | 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>
* NFC: st21nfcb: Remove useless new line in nfc_err callChristophe Ricard2014-09-071-2/+1
| | | | | | | 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>
* NFC: st21nfcb: Remove double assignment of .owner in struct device_driverChristophe Ricard2014-09-071-1/+0
| | | | | | | | | | | | 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>
* NFC: st21nfcb: Convert to use devm_gpio_request_oneChristophe Ricard2014-09-071-24/+6
| | | | | | | | 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>
* NFC: st21nfcb: Fix scripts/checkpatch.pl error "code indent should use tabs ↵Christophe Ricard2014-09-071-1/+1
| | | | | | | | | | 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>
* NFC: st21nfcb: few code clean upChristophe Ricard2014-07-231-8/+8
| | | | | Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: st21nfcb: Add driver for STMicroelectronics ST21NFCB NFC chipChristophe Ricard2014-07-237-0/+1012
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>