- Feb 02, 2015
-
-
Christophe Ricard authored
The transaction notifies the host (DH) that an action is required to manage a specific Secure Element application. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
The st21nfcb chipset has 3 SWP (Single Wire Protocol) lines and supports up to 3 secure elements (UICC/eSE and µSD in the future). Some st21nfcb firmware does not support the nci command nci_nfcee_mode_set(NCI_NFCEE_DISABLE). For this reason, we assume 2 secures elements are always present (UICC and eSE). They will be added to the SE list once successfully activated and they will be available only after running through enable_se handler or when the poll in listen mode is started. During initialization, the white_list will be always set assuming both UICC & eSE are present. On eSE activation, the ATR bytes are fetched to build the command exchange timeout. The se_io hook will allow to transfer data over SWP. 2 kind of events may appear data is sent over: - ST21NFCB_EVT_TRANSMIT_DATA when receiving an apdu answer - ST21NFCB_EVT_WTX_REQUEST when the secure element needs more time than expected to process a command. If this timeout expires, we send a software reset, and then a hardware one if it still fails. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
- Jan 28, 2015
-
-
Robert Dolca authored
Currently there is no support for ACPI. This patch uses the following configuration: - Device id: NXP5440 - Pin mapping: - 0 IRQ pin - 1 enable pin - 2 firmware pin Signed-off-by:
Robert Dolca <robert.dolca@intel.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
- Jan 27, 2015
-
-
Robert Dolca authored
gpio_set_value was replaced with gpio_set_value_cansleep in order to allow GPIO access that may sleep. This is particularelly useful when GPIO is accessed using busses like I2C, SPI, USB Signed-off-by:
Robert Dolca <robert.dolca@intel.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
st21nfca has 1 physical SWP line and can support up to 2 secure elements (UICC & eSE) thanks to an external switch managed with a gpio. The platform integrator needs to specify thanks to 2 initialization properties, uicc-present and ese-present, if it is suppose to have uicc and/or ese. Of course if the platform does not have an external switch, only one kind of secure element can be supported. Those parameters are under platform integrator responsibilities. During initialization, the white_list will be set according to those parameters. The discovery_se function will assume a secure element is physically present according to uicc-present and ese-present values and will add it to the secure element list. On ese activation, the atr is retrieved to calculate a command exchange timeout based on the first atr(TB) value. The se_io will allow to transfer data over SWP. 2 kind of events may appear after a data is sent over: - ST21NFCA_EVT_TRANSMIT_DATA when receiving an apdu answer - ST21NFCA_EVT_WTX_REQUEST when the secure element needs more time than expected to compute a command. If this timeout expired, a first recovery tentative consist to send a simple software reset proprietary command. If this tentative still fail, a second recovery tentative consist to send a hardware reset proprietary command. This function is only relevant for eSE like secure element. This patch also change the way a pipe is referenced. There can be different pipe connected to the same gate with different host destination (ex: CONNECTIVITY). In order to keep host information every pipe are reference with a tuple (gate, host). In order to reduce changes, we are keeping unchanged the way a gate is addressed on the Terminal Host. However, this is working because we consider the apdu reader gate is only present on the eSE slot also the connectivity gate cannot give a reliable value; it will give the latest stored pipe value. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
The below event_received hci handler has change the gate parameter to pipe. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com>
-
Christophe Ricard authored
The below event_received hci handler has change the gate parameter to pipe. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com>
-
- Jan 26, 2015
-
-
Christophe Ricard authored
When the platform with CONFIG_ST21NFCB_I2C=y without any st21nfcb component physically connected a: "Unable to handle kernel NULL pointer dereference at virtual address" may show up at driver initialization phase. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
Fix some memory leaks after some nfc_hci_get_param calls. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
Remove unnecessary memory allocation message already shown by devm_kzalloc. This remove a warning when running scripts/checkpatch. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
skb_pipe_list and skb_pipe_info are allocated in nfc_hci_send_cmd. alloc_skb on those buffer are then useless. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
Do not insert in send queue the skb that contains unknown Packet Control Byte Acked-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Anda-Maria Nicolae <anda-maria.nicolae@intel.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
- Jan 25, 2015
-
-
Christophe Ricard authored
kfree_skb(skb) in st21nfca_hci_event_received is never reach. Reported-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
ndlc pointer got allocated with devm_kzalloc in ndlc_probe function. This gives this error message: drivers/nfc/st21nfcb/ndlc.c:296:1-6: WARNING: invalid free of devm_ allocated data. Reported-by:
Dan Carpenter <dan.carpenter@oracle.com> Reported-by:
Julia Lawall <julia.lawall@lip6.fr> Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
Other drivers are following the following compatible string format for dts: s/_/-/ Because some devices may still use the previous string, the new corrected string is added to the of_device_id table. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
Other drivers are following the following compatible string format for dts: s/_/-/ Because some devices may still use the previous string, the new corrected string is added to the of_device_id table. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
- Dec 15, 2014
-
-
Rafael J. Wysocki authored
After commit b2b49ccb (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. Replace CONFIG_PM_RUNTIME with CONFIG_PM in drivers/nfc/trf7970a.c. Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Dec 02, 2014
-
-
Christophe Ricard authored
Report error returned by devm_gpio_request_one instead of -ENODEV. Reported-by:
Dmitry Torokhov <dtor@chromium.org> Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
Report error returned by devm_gpio_request_one or st21nfca_hci_platform_init instead of -ENODEV. Reported-by:
Dmitry Torokhov <dtor@chromium.org> Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
- pr_info in st21nfcb_nci_i2c_disable is not necessary Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
In ndlc_probe function we initialize timers. They are not started. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
As many event with the same id can come from several gates, it will be easier to manage each of them by gate. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
- Dec 01, 2014
-
-
Christophe Ricard authored
- phy->gpio_irq is never done out of the request resources. - irq_of_parse_and_map is already done in the i2c core so client->irq is already set when entering in st21nfcb_hci_i2c_of_request_resources - In case of static platform configuration client->irq can be set directly. - It simplifies the code a bit. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
When CONFIG_OF is define add of_st21nfcb_i2c_match to MODULE_DEVICE_TABLE Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
- phy->gpio_irq is never done out of the request resources. - irq_of_parse_and_map is already done in the i2c core so client->irq is already set when entering in st21nfca_hci_i2c_of_request_resources - In case of static platform configuration client->irq can be set directly - It simplifies the code a bit. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
When CONFIG_OF is define add of_st21nfca_i2c_match to MODULE_DEVICE_TABLE. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
- Nov 28, 2014
-
-
Johannes Berg authored
This is a specific implementation, <asm/unaligned.h> is the multiplexer that has the arch-specific knowledge of which of the implementations needs to be used, so include that. Signed-off-by:
Johannes Berg <johannes.berg@intel.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
- Oct 20, 2014
-
-
Wolfram Sang authored
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Sep 24, 2014
-
-
Christophe Ricard authored
skb is already freed in st21nfca_tx_work and was freed also in st21nfca_im_send_psl_req. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
"skb" can be NULL here but it can't be an ERR_PTR: - IS_ERR(NULL) return false and skb migth be NULL. - skb cannot be a ERR_PTR as nfc_hci_send_cmd_async it never using such cast. !skb is more appropriate at those places. Reported-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
In case we are not able to read out the NDLC/NCI header, we do not consider this as an issue and we will give a later chance. The NDLC layer will handle errors thanks to its internal timers. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
Add support for ISO/IEC 15693 RF technology and Type 5 tags. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
In NFC Forum NCI specification, some RF Protocol values are reserved for proprietary use (from 0x80 to 0xfe). Some CLF vendor may need to use one value within this range for specific technology. Furthermore, some CLF may not becompliant with NFC Froum NCI specification 2.0 and therefore will not support RF Protocol value 0x06 for PROTOCOL_T5T as mention in a draft specification and in a recent push. Adding get_rf_protocol handle to the nci_ops structure will help to set the correct technology to target. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
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:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
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:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
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:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
After a unsuccessful call to nfc_hci_send_event the skb was not freed and might lead to memory leak. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Christophe Ricard authored
Fix few conding style issue such as useless line return or tab. Signed-off-by:
Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
- Sep 23, 2014
-
-
Mark A. Greer authored
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:
Mark A. Greer <mgreer@animalcreek.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Mark A. Greer authored
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:
Mark A. Greer <mgreer@animalcreek.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-