- 24 9月, 2014 10 次提交
-
-
由 Christophe Ricard 提交于
T2 was never started when sending a command. Start it when sending a command for the first attempt and stop it once we receive the answer. Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
On st21nfcb the irq line might be kept to active state because of other interfaces activity. This may generate i2c read tentative resulting in i2c NACK. This fix will currently let NDLC upper layer to decide when it is relevent to signal to the physical layer when the chip as muted. Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
St21nfcb has a reverse polarity compare to st21nfca. In st21nfcb case, the irq pin is active high. Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
This patch fix a previous patch introduce by commit 0a91e8ac It is actually fixing a double free mistake in all st21nfca_tm_* function. We decide to return directly in case of successful execution because skb got already freed. In st21nfca_tm_recv_dep_req it got freed by nfc_tm_data_received. Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
After a unsuccessful call to nfc_hci_send_event the skb was not freed and might lead to memory leak. Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
Fix few conding style issue such as useless line return or tab. Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Mark A. Greer 提交于
The recently added _trf7970a_tg_listen() routine has some return paths that don't unlock the mutex that is locked when the routine is entered. Fix this by always unlocking the mutex before returning. Signed-off-by: NMark A. Greer <mgreer@animalcreek.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Mark A. Greer 提交于
Recent changes to trf7970a_irq() added a couple return paths that don't unlock the mutex that is locked when the routine is entered. Fix this by ensuring the mutex is always unlocked before returning. Signed-off-by: NMark A. Greer <mgreer@animalcreek.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Mark A. Greer 提交于
There is no need to initialize the 'ret' variable in trf7970a_resume(). Signed-off-by: NMark A. Greer <mgreer@animalcreek.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Mark A. Greer 提交于
The trf7970a_suspend() routine always returns zero so don't use a local return variable to hold the return value. This fixes up a smatch warning. Signed-off-by: NMark A. Greer <mgreer@animalcreek.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
- 08 9月, 2014 30 次提交
-
-
由 Christophe 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: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
scripts/checkpatch.pl -f drivers/nfc/st21nfca.c is throwing the following: WARNING: else is not generally useful after a break or return #866: FILE: drivers/nfc/st21nfca/st21nfca.c:866: + return 0; + } else { Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
Align every macros on the same column. Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
Clean up st21nfca.h macros and move the one only used in st21nfca.c. Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe 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: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
gb_len in st21nfca_tm_send_atr_res can be negative. Not checking for that could lead to a potential kernel oops. We now make sure that atr_req->length > sizeof(struct st21nfca_atr_req) to avoid such situation. Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
skb is already verified to be not null from the below hci layer. Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
On top of st21nfca_im_recv_atr_res_cb and st21nfca_im_recv_dep_res_cb a condition if (err != 0) is present. Because err is never modified in the code err will always be 0 at the end. The condition can be removed. Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
nfcid3 is based on sensf_res value. target->sensf is never NULL as it is a table. Check the sensf_res_len instead to make sure sensf_res is set or not. Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
Remove a useless new line in nfc_err call. Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
If dev_num >= ST21NFCA_NUM_DEVICES, the driver was returning an incorrect success return code. Once dev_num is set, it was not stated as busy. Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe 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: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
Remove a uselss new line in nfc_err call. Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
The .owner member of struct device_driver is assigned THIS_MODULE twice. Introduced by: commit 35630df6 NFC: st21nfcb: Add driver for STMicroelectronics ST21NFCB NFC chip Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
Simplify the code a bit as mention by Axel Lin in a previous patch for st21nfca. Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
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: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
Fixing scripts/checkpatch.pl warning "Missing a blank line after declarations" in: - st21nfca.c: - check_presence after fwi variable declaration. - get_frame_size after len variable declaration. - st21nfca_hci_i2c_repack after "i, j, r, size" variable declaration. - st21nfca_dep.c st21nfca_tx_work after skb pointer declaration. Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Christophe Ricard 提交于
Fixing "sparse: cast to restricted __be32" message when building with make C=1 CF=-D__CHECK_ENDIAN__ Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Axel Lin 提交于
This simplifies the code a bit. Acked-by: NChristophe RICARD <christophe-h.ricard@st.com> Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Emil Goode 提交于
The .owner member of struct device_driver is assigned THIS_MODULE twice. Introduced by: commit c44cb2ed ("NFC: dts: st21nfca: Add device-tree (Open Firmware) support to st21nfca") Acked-by: NChristophe RICARD <christophe-h.ricard@st.com> Signed-off-by: NEmil Goode <emilgoode@gmail.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Mark A. Greer 提交于
Add the ability to detect the mode (i.e., RF technology) used by the initiator. The RF technology that was detected can be retrieved by calling the 'tg_get_rf_tech' driver hook. Signed-off-by: NMark A. Greer <mgreer@animalcreek.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Mark A. Greer 提交于
Add target mode support to the trf7970a NFC driver. This effectively enables full Peer-to-Peer support. To handle changing framing between sending a response frame and receiving the subsequent request frame, most of the framing changes take effect in the interrupt handler and not in trf7970a_tg_config_framing(). Signed-off-by: NMark A. Greer <mgreer@animalcreek.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Mark A. Greer 提交于
The digital layer can try to send a command with a timeout value of zero (e.g., digital_tg_send_psl_res(). The zero value is used as a flag to indicate that the driver should not expect a response. To handle this, the driver sets an internal timer because it should still get an interrupt with the TX bit set in the IRQ Status Register. When it gets that interrupt, it returns a return value of '0'. If it doesn't get the interrupt before timing out, it returns ETIMEDOUT as usual. Signed-off-by: NMark A. Greer <mgreer@animalcreek.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Mark A. Greer 提交于
Some paths leave a timer still running when trf7970a_send_err_upstream() is called. This can cause a timeout to occur in a subsequent transaction making it fail. Fix this by ensuring there is no timer running before sending an error upstream. Signed-off-by: NMark A. Greer <mgreer@animalcreek.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Mark A. Greer 提交于
Currently, the trf7970a driver blindly turns on its RF field when configuring its framing. This isn't a good idea if there is already a device generating an RF field. Instead, check if there is already an RF field present before turning on this device's RF field and, if there is, return EBUSY. Signed-off-by: NMark A. Greer <mgreer@animalcreek.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Mark A. Greer 提交于
When trf7970a_init() initializes the trf7970a it implicitly turns off the RF transmitter. Track this by clearing the TRF7970A_CHIP_STATUS_RF_ON bit in the cached trf->chip_status_ctrl. Signed-off-by: NMark A. Greer <mgreer@animalcreek.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Mark A. Greer 提交于
Don't try to turn off of RF transmitter is its already off. Signed-off-by: NMark A. Greer <mgreer@animalcreek.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Mark A. Greer 提交于
Rename trf7970a_config_rf_tech() and trf7970a_config_framing() to trf7970a_in_config_rf_tech() and trf7970a_in_config_framing(), respectively to avoid confusion when target support is added. Signed-off-by: NMark A. Greer <mgreer@animalcreek.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Mark A. Greer 提交于
The trf7970a should be given at least 1 ms to completely initialize after the 'Software Init' and 'Idle' commands have been issued. Signed-off-by: NMark A. Greer <mgreer@animalcreek.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Mark A. Greer 提交于
Add system suspend/resume support by gracefully shutting things down when suspending and bringing the device back to full power when resuming. Signed-off-by: NMark A. Greer <mgreer@animalcreek.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-