[PATCH] nfc: nci: non-static functions can not be inline

2015-10-26 Thread Robert Dolca
Signed-off-by: Robert Dolca <robert.do...@intel.com> --- include/net/nfc/nci_core.h | 8 net/nfc/nci/core.c | 16 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h index 530df66..1

[PATCH v4 10/10] nfc: Add Intel Fields Peak NFC solution driver

2015-10-22 Thread Robert Dolca
be enumerated using ACPI using the id INT339A. The 1st GPIO is the IRQ and the 2nd is the RESET pin. Signed-off-by: Robert Dolca <robert.do...@intel.com> --- drivers/nfc/Kconfig | 1 + drivers/nfc/Makefile | 1 + drivers/nfc/fdp/Kconfig | 23 ++ drivers/nfc/fdp/Makefile

[PATCH v4 09/10] nfc: nci: add nci_get_conn_info_by_id function

2015-10-22 Thread Robert Dolca
This functin takes as a parameter a pointer to the nci_dev struct and the first byte from the values of the first domain specific parameter that was used for the connection creation. Signed-off-by: Robert Dolca <robert.do...@intel.com> --- include/net/nfc/nci_core.h | 1 + net/nfc/nci/

[PATCH v4 05/10] nfc: nci: Introduce nci_core_cmd

2015-10-22 Thread Robert Dolca
This allows sending core commands from the driver. The driver should be able to send NCI core commands like CORE_GET_CONFIG_CMD. Signed-off-by: Robert Dolca <robert.do...@intel.com> --- include/net/nfc/nci_core.h | 1 + net/nfc/nci/core.c | 24 +++- 2 files c

[PATCH v4 03/10] nfc: nci: Introduce new core opcodes

2015-10-22 Thread Robert Dolca
Add NCI_OP_CORE_GET_CONFIG_CMD, NCI_OP_CORE_GET_CONFIG_RSP and NCI_OP_CORE_RESET_NTF. Signed-off-by: Robert Dolca <robert.do...@intel.com> --- include/net/nfc/nci.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/net/nfc/nci.h b/include/net/nfc/nci.h index 75d2e18..b

[PATCH v4 02/10] nfc: nci: Add function to get max packet size for conn

2015-10-22 Thread Robert Dolca
FDP driver needs to send the firmware as regular packets (not fragmented). The driver should have a way to get the max packet size for a given connection. Signed-off-by: Robert Dolca <robert.do...@intel.com> --- include/net/nfc/nci_core.h | 1 + net/nfc/nci/data.c | 12 +

[PATCH v4 07/10] nfc: nci: rename nci_prop_ops to nci_driver_ops

2015-10-22 Thread Robert Dolca
Initially it was used to create hooks in the driver for proprietary operations. Currently it is being used for hooks for both proprietary and generic operations. Signed-off-by: Robert Dolca <robert.do...@intel.com> --- drivers/nfc/s3fwrn5/nci.c | 4 ++-- drivers/nfc/st-nci/core.c

[PATCH v4 00/10] Add Intel FieldsPeak NFC solution driver

2015-10-22 Thread Robert Dolca
t the new connection ID - nci: Allow the driver to set handler for core nci ops Robert Dolca (10): nfc: nci: Export nci data send API nfc: nci: Add function to get max packet size for conn nfc: nci: Introduce new core opcodes nfc: nci: Do not call post_setup when setup fails nfc: nci:

[PATCH v4 01/10] nfc: nci: Export nci data send API

2015-10-22 Thread Robert Dolca
For the firmware update the driver may use nci_send_data. Signed-off-by: Robert Dolca <robert.do...@intel.com> --- net/nfc/nci/data.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/nfc/nci/data.c b/net/nfc/nci/data.c index 566466d..83acd18 100644 --- a/net/nfc/nci/data.c +++ b/n

[PATCH v2 3/9] nfc: nci: Introduce new core opcodes

2015-09-01 Thread Robert Dolca
Add NCI_OP_CORE_GET_CONFIG_CMD, NCI_OP_CORE_GET_CONFIG_RSP and NCI_OP_CORE_RESET_NTF. Signed-off-by: Robert Dolca <robert.do...@intel.com> --- include/net/nfc/nci.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/net/nfc/nci.h b/include/net/nfc/nci.h index 75d2e18..b

[PATCH v2 6/9] nfc: nci: Introduce nci_core_cmd

2015-09-01 Thread Robert Dolca
This allows sending core commands from the driver. The driver should be able to send NCI core commands like CORE_GET_CONFIG_CMD. Signed-off-by: Robert Dolca <robert.do...@intel.com> --- include/net/nfc/nci_core.h | 1 + net/nfc/nci/core.c | 24 +++- 2 files c

[PATCH v2 5/9] nfc: nci: Do not call post_setup when setup fails

2015-09-01 Thread Robert Dolca
The driver should know that it can continue with post setup where setup left off. Being able to execute post_setup when setup fails may force the developer to keep this state in the driver. Signed-off-by: Robert Dolca <robert.do...@intel.com> --- net/nfc/nci/core.c | 3 +-- 1 file chan

[PATCH v2 4/9] nfc: nci: Allow the driver to set handler for core nci ops

2015-09-01 Thread Robert Dolca
driver needs to take certain actions when a reset notification arrives (packet also not handled by the nfc core). The driver handlers do not interfere with the core and they are called after the core processes the packet. Signed-off-by: Robert Dolca <robert.do...@intel.com> --- include/n

[PATCH v2 7/9] nfc: nci: Use a separate mutex for nci open and close

2015-09-01 Thread Robert Dolca
in nci_request to allow calling the function during setup. Signed-off-by: Robert Dolca <robert.do...@intel.com> --- include/net/nfc/nci_core.h | 3 +++ net/nfc/nci/core.c | 30 -- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/include/n

[PATCH v2 2/9] nfc: nci: Add function to get max packet size for conn

2015-09-01 Thread Robert Dolca
FDP driver needs to send the firmware as regular packets (not fragmented). The driver should have a way to get the max packet size for a given connection. Signed-off-by: Robert Dolca <robert.do...@intel.com> --- include/net/nfc/nci_core.h | 1 + net/nfc/nci/data.c | 12 +

[PATCH v2 1/9] nfc: nci: Export nci data send API

2015-09-01 Thread Robert Dolca
For the firmware update the driver may use nci_send_data. Signed-off-by: Robert Dolca <robert.do...@intel.com> --- net/nfc/nci/data.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/nfc/nci/data.c b/net/nfc/nci/data.c index 566466d..83acd18 100644 --- a/net/nfc/nci/data.c +++ b/n

[PATCH v2 8/9] nfc: nci: Add a parameter to get the new connection id

2015-09-01 Thread Robert Dolca
nci_core_conn_create has a new parameter so it can return the id of the new connection. Also now you can't call nci_core_conn_create without waiting for the answer from the previous call. Signed-off-by: Robert Dolca <robert.do...@intel.com> --- drivers/nfc/st-nci/st-nci_se.c | 2 +- inclu

[PATCH v2 9/9] nfc: Add Intel Fields Peak NFC solution driver

2015-09-01 Thread Robert Dolca
be enumerated using ACPI using the id INT339A. The 1st GPIO is the IRQ and the 2nd is the RESET pin. Signed-off-by: Robert Dolca <robert.do...@intel.com> --- drivers/nfc/Kconfig | 1 + drivers/nfc/Makefile | 1 + drivers/nfc/fdp/Kconfig | 23 ++ drivers/nfc/fdp/Makefile

[PATCH v2 0/9] Adds Intel FieldsPeak NFC solution driver

2015-09-01 Thread Robert Dolca
nci: check the setup return code before callig post_setup - nci: add function to allow sending core commands from driver - nci: Use a separate mutex for nci open and close - nci: mutex for: Adds a way to get the new connection ID - nci: Allow the driver to set handler for core nci ops Rober

Re: [linux-nfc] [PATCH 1/8] NFC: NCI: Allow connection close with dev down

2015-08-28 Thread Robert Dolca
On Sun, May 24, 2015 at 8:07 PM, Samuel Ortiz sa...@linux.intel.com wrote: Hi Robert, On Tue, Mar 31, 2015 at 05:03:42PM +0300, Robert Dolca wrote: On Thu, Mar 26, 2015 at 2:29 AM, Samuel Ortiz sa...@linux.intel.com wrote: Hi Robert, On Tue, Feb 24, 2015 at 12:01:45PM +0200, Robert Dolca

Re: [linux-nfc] [PATCH 8/8] NFC: Add Intel FieldsPeak NFC solution driver

2015-04-01 Thread Robert Dolca
On Thu, Mar 26, 2015 at 2:30 AM, Samuel Ortiz sa...@linux.intel.com wrote: + /* If a patch was applied the new version is checked */ + if (patched) { + r = nci_init(ndev); + if (r) + goto error; + + r =

Re: [linux-nfc] [PATCH 4/8] NFC: NCI: Add a special nci_request for driver

2015-03-31 Thread Robert Dolca
On Thu, Mar 26, 2015 at 2:29 AM, Samuel Ortiz sa...@linux.intel.com wrote: Hi Robert, On Tue, Feb 24, 2015 at 12:01:48PM +0200, Robert Dolca wrote: This patch adds nci_request_driver and nci_req_complete_driver as a wrapper for __nci_request. When nci_req_complete_driver is called it also

Re: [linux-nfc] [PATCH 3/8] NFC: NCI: Adds NCI init and reset API for drivers

2015-03-31 Thread Robert Dolca
On Thu, Mar 26, 2015 at 2:29 AM, Samuel Ortiz sa...@linux.intel.com wrote: Hi Robert, On Tue, Feb 24, 2015 at 12:01:47PM +0200, Robert Dolca wrote: In order to communicate with the device during the setup phase, the driver may need to initialize the device. After the setup is done the driver

[PATCH 5/8] NFC: NCI: Don't call setup if previous NCI request failed

2015-02-24 Thread Robert Dolca
If the previous nci_request (NCI reset) failed the setup function was being called anyway. It shouldn't be called if the reset failed. The result of the setup function is taken into consideration. If it fails the init should fail. Signed-off-by: Robert Dolca robert.do...@intel.com --- net/nfc

[PATCH 1/8] NFC: NCI: Allow connection close with dev down

2015-02-24 Thread Robert Dolca
By calling __nci_request instead of nci_request allows the driver to use the function while initializing the device (setup stage) Signed-off-by: Robert Dolca robert.do...@intel.com --- net/nfc/nci/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/nfc/nci/core.c b/net

[PATCH 3/8] NFC: NCI: Adds NCI init and reset API for drivers

2015-02-24 Thread Robert Dolca
In order to communicate with the device during the setup phase, the driver may need to initialize the device. After the setup is done the driver should reset the device to leave it in the same state that it was before the setup function call. Signed-off-by: Robert Dolca robert.do...@intel.com

[PATCH 8/8] NFC: Add Intel FieldsPeak NFC solution driver

2015-02-24 Thread Robert Dolca
The device can be enumerated using ACPI using the id INT339A. The 1st GPIO is the IRQ and the 2nd is the RESET pin. I can be also enumerated using platform init. Signed-off-by: Robert Dolca robert.do...@intel.com --- drivers/nfc/Kconfig | 1 + drivers/nfc/fdp/Kconfig

[PATCH 6/8] NFC: NCI: Add function to get max packet size for conn

2015-02-24 Thread Robert Dolca
FDP driver needs to send the firmware as regular packets (not fragmented). That's whay the driver should have a way to get the max packet size for a given connection. Signed-off-by: Robert Dolca robert.do...@intel.com --- include/net/nfc/nci_core.h | 1 + net/nfc/nci/data.c | 12

[PATCH 7/8] NFC: NCI: Adds a way to get the new connection ID

2015-02-24 Thread Robert Dolca
nci_core_conn_create not has a new parameter so it can return the ID of the new connection. Also not you can't call nci_core_conn_create without waiting the answer for the previous call. Signed-off-by: Robert Dolca robert.do...@intel.com --- drivers/nfc/st21nfcb/st21nfcb_se.c | 2 +- include

[PATCH 4/8] NFC: NCI: Add a special nci_request for driver

2015-02-24 Thread Robert Dolca
exported in order to send commands to the device from the driver. It shouldn't be used without nci_req_complete_driver because cmd_cnt will have the wrong value. Signed-off-by: Robert Dolca robert.do...@intel.com --- include/net/nfc/nci_core.h | 4 net/nfc/nci/core.c | 19

[PATCH 2/8] NFC: NCI: Exporting NFC command and data send API

2015-02-24 Thread Robert Dolca
nci_send_cmd was exported in order to send commands to the device from the driver. For the firmware update the driver may use nci_send_data. Signed-off-by: Robert Dolca robert.do...@intel.com --- net/nfc/nci/core.c | 1 + net/nfc/nci/data.c | 1 + 2 files changed, 2 insertions(+) diff --git

[PATCH 0/8] Adds Intel FieldsPeak NFC solution driver

2015-02-24 Thread Robert Dolca
from the driver while the dev was down. The max packet size of a connection can be retrieved by the driver. The init, reset NCI functions can be called from the driver. The driver can also send command to the device using the NFC subsystem using the request - response blocking method. Robert Dolca

Re: [PATCH 8/8] NFC: Add Intel FieldsPeak NFC solution driver

2015-02-24 Thread Robert Dolca
On Tue, Feb 24, 2015 at 11:33:10AM +0100, Johannes Berg wrote: +config NFC_FDP + tristate Intel FDP NFC driver + depends on NFC_NCI + select CRC_CCITT + default n + ---help--- + Intel FDP core driver. + This is a driver based on the NCI NFC kernel layers. + +

Re: [PATCH v2 2/2] NFC: Add ACPI support for NXP PN544

2015-02-12 Thread Robert Dolca
Hi Uwe, On Thu, Feb 12, 2015 at 09:14:59AM +0100, Uwe Kleine-König wrote: On Mon, Jan 26, 2015 at 01:13:37PM +0200, Robert Dolca wrote: + /* Get EN GPIO from ACPI */ + gpiod_en = devm_gpiod_get_index(dev, PN544_GPIO_NAME_EN, 1); Actually devm_gpiod_get_index takes 4 arguments. In your

[RFC] NFC: PN544: Supply the right length to skb_trim

2015-01-28 Thread Robert Dolca
The 2nd parameter of skb_trim is the new length of the skb. pn544_hci_i2c_remove_len_crc used the tailroom for the 2nd parameter so the new length was 2 no metter how big the skb was. Now the length is (skb-len - PN544_I2C_FRAME_TAILROOM) Signed-off-by: Robert Dolca robert.do...@intel.com

[PATCH v2 1/2] NFC: PN544: GPIO access that may sleep

2015-01-26 Thread Robert Dolca
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.do...@intel.com --- drivers/nfc/pn544/i2c.c | 22 -- 1

[PATCH v2 2/2] NFC: Add ACPI support for NXP PN544

2015-01-26 Thread Robert Dolca
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.do...@intel.com --- drivers/nfc

[PATCH v2 0/2] Add ACPI support for NXP PN544

2015-01-26 Thread Robert Dolca
- Removed debug define and Kconfig include - Minor fixes to patch subjects Links to v1: - http://lkml.iu.edu/hypermail/linux/kernel/1501.1/00943.html - http://lkml.iu.edu/hypermail/linux/kernel/1501.1/00944.html Robert Dolca (2): NFC: PN544: GPIO access that may sleep NFC

[PATCH 2/2] nfc: NXP PN544 ACPI support

2015-01-09 Thread Robert Dolca
Device id: NXP5440 Pin mapping: - 0 IRQ pin - 1 enable pin - 2 firmware pin Signed-off-by: Robert Dolca robert.do...@intel.com --- drivers/nfc/Kconfig | 1 + drivers/nfc/pn544/i2c.c | 115 ++-- net/nfc/core.c | 1 + 3 files changed